@charset "UTF-8";
/* ==========================================================================
   Fixith – tema "Livith"
   Caricato DOPO styles.css: sovrascrive Bootstrap 3.3.7 e le personalizzazioni
   storiche senza toccare markup, ID o comportamento (postback, UpdatePanel,
   overflowContainer). Direzione: cornice scura (navbar, barre di sezione,
   login), area di lavoro chiara, arancione solo come accento.
   ========================================================================== */

:root {
  /* cornice scura */
  --chrome: #111110;
  --chrome-2: #1c1b19;
  --chrome-3: #2a2825;
  --chrome-ink: #f3efe9;
  --chrome-muted: #a39d94;

  /* accento */
  --accent: #f36e21;
  --accent-hover: #db3e00;
  --accent-ink: #c9521a;
  --accent-soft: rgba(243, 110, 33, 0.12);
  --accent-ring: rgba(243, 110, 33, 0.28);

  /* area di lavoro */
  --bg: #f4f2ee;
  --surface: #ffffff;
  --surface-2: #ebe7e1;
  --surface-3: #f7f5f1;
  --line: #dfd9d1;
  --line-strong: #c9c1b7;
  --ink: #1b1916;
  --ink-2: #4a4640;
  --muted: #77716a;

  /* stati */
  --ok: #4f9d3a;
  --ok-soft: rgba(79, 157, 58, 0.14);
  --bad: #c42323;
  --bad-soft: rgba(196, 35, 35, 0.12);
  --warn: #b7791f;
  --warn-soft: rgba(183, 121, 31, 0.14);
  --info-soft: rgba(39, 144, 207, 0.12);

  /* misure */
  --radius-s: 6px;
  --radius-m: 8px;
  --radius-l: 12px;
  --shadow: 0 1px 2px rgba(27, 25, 22, 0.06), 0 8px 24px -12px rgba(27, 25, 22, 0.18);
  --shadow-lg: 0 24px 64px -24px rgba(0, 0, 0, 0.6);
  --nav-h: 64px;

  /* tipografia */
  --font-display: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Open Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --text-base: 15px;
  --text-data: 14px;
  --text-small: 13px;

  /* derivati */
  --field-edit: #fff8f3;
  --field-edit-border: rgba(243, 110, 33, 0.45);
  --hover-surface: rgba(255, 255, 255, 0.6);
  --ok-ink: #2f6b22;
  --bad-ink: #8f1b1b;
  --warn-ink: #7a5012;
  --info: #2790cf;
  --info-ink: #1b5f8a;
  --select-arrow: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2377716a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: light;
}

/* --------------------------------------------------------------------------
   Tema scuro: stessi token, valori diversi. Si attiva
   - automaticamente se il sistema e' in modalita' scura (senza scelta esplicita)
   - con data-theme="dark" sull'elemento <html> (interruttore in navbar, theme.js)
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --chrome: #0a0a09;
    --chrome-2: #141312;
    --chrome-3: #1f1d1b;
    --chrome-ink: #f3efe9;
    --chrome-muted: #a39d94;
    --accent: #f58238;
    --accent-hover: #ff9a5c;
    --accent-ink: #ff9a5c;
    --accent-soft: rgba(245, 130, 56, 0.16);
    --accent-ring: rgba(245, 130, 56, 0.35);
    --bg: #0f0e0d;
    --surface: #181715;
    --surface-2: #26231f;
    --surface-3: #1e1c1a;
    --line: #2e2b28;
    --line-strong: #433e39;
    --ink: #ece8e1;
    --ink-2: #c9c3ba;
    --muted: #9a938a;
    --ok: #72bd5c;
    --ok-soft: rgba(114, 189, 92, 0.18);
    --bad: #e36b6b;
    --bad-soft: rgba(227, 107, 107, 0.16);
    --warn: #e2ad52;
    --warn-soft: rgba(226, 173, 82, 0.16);
    --info-soft: rgba(80, 160, 220, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 28px -14px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 24px 64px -24px rgba(0, 0, 0, 0.9);
    --field-edit: #2a211b;
    --field-edit-border: rgba(245, 130, 56, 0.5);
    --hover-surface: rgba(255, 255, 255, 0.06);
    --ok-ink: #a8dc98;
    --bad-ink: #f2a3a3;
    --warn-ink: #f0cf8e;
    --info: #50a0dc;
    --info-ink: #9fcdf0;
    --select-arrow: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239a938a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --chrome: #0a0a09;
  --chrome-2: #141312;
  --chrome-3: #1f1d1b;
  --chrome-ink: #f3efe9;
  --chrome-muted: #a39d94;
  --accent: #f58238;
  --accent-hover: #ff9a5c;
  --accent-ink: #ff9a5c;
  --accent-soft: rgba(245, 130, 56, 0.16);
  --accent-ring: rgba(245, 130, 56, 0.35);
  --bg: #0f0e0d;
  --surface: #181715;
  --surface-2: #26231f;
  --surface-3: #1e1c1a;
  --line: #2e2b28;
  --line-strong: #433e39;
  --ink: #ece8e1;
  --ink-2: #c9c3ba;
  --muted: #9a938a;
  --ok: #72bd5c;
  --ok-soft: rgba(114, 189, 92, 0.18);
  --bad: #e36b6b;
  --bad-soft: rgba(227, 107, 107, 0.16);
  --warn: #e2ad52;
  --warn-soft: rgba(226, 173, 82, 0.16);
  --info-soft: rgba(80, 160, 220, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 28px -14px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 24px 64px -24px rgba(0, 0, 0, 0.9);
  --field-edit: #2a211b;
  --field-edit-border: rgba(245, 130, 56, 0.5);
  --hover-surface: rgba(255, 255, 255, 0.06);
  --ok-ink: #a8dc98;
  --bad-ink: #f2a3a3;
  --warn-ink: #f0cf8e;
  --info: #50a0dc;
  --info-ink: #9fcdf0;
  --select-arrow: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239a938a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html {
  font-family: var(--font-body);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  padding-top: var(--nav-h);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-ink);
}
a:hover,
a:focus {
  color: var(--accent-hover);
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3,
.h1, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.2;
}
h4, h5, h6,
.h4, .h5, .h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
h1, .h1 { font-size: 28px; }
h2, .h2 { font-size: 22px; }
h3, .h3 { font-size: 18px; }
h4, .h4 { font-size: 15px; text-transform: none; }
h5, .h5 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
h6, .h6 { font-size: 13px; text-transform: none; font-weight: 600; }

b, strong {
  font-weight: 600;
}

hr {
  border-top-color: var(--line);
}

small,
.small {
  font-size: 86%;
}

::selection {
  background: var(--accent-soft);
}

/* scrollbar sottili nelle colonne a scorrimento interno */
.overflowContainerSX,
.overflowContainerDX,
.overflow-modal-container,
.dropdown-menu {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.overflowContainerSX::-webkit-scrollbar,
.overflowContainerDX::-webkit-scrollbar,
.overflow-modal-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.overflowContainerSX::-webkit-scrollbar-thumb,
.overflowContainerDX::-webkit-scrollbar-thumb,
.overflow-modal-container::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Navbar (cornice scura)
   -------------------------------------------------------------------------- */
.navbar {
  min-height: var(--nav-h);
  margin-bottom: 0;
}
.navbar-inverse {
  background-color: var(--chrome);
  border: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px -16px rgba(0, 0, 0, 0.6);
}
.navbar .container,
.project-navbar .container {
  border-bottom: none;
}
.navbar-header {
  display: flex;
  align-items: center;
  min-height: var(--nav-h);
}
@media (max-width: 767px) {
  .navbar-header {
    display: block;
  }
}

/* logo: marchio Livith su scuro + wordmark prodotto */
.header-logo {
  display: inline-block;
  height: var(--nav-h);
  width: auto;
  margin: 0 !important;
  padding: 0 0 0 116px !important;
  background-image: url(../images/logo-livith.svg);
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 92px auto;
  font: 0/0 a; /* il testo "LIVITH" dell'ancora resta nascosto: il marchio e' l'immagine */
  color: transparent;
  text-shadow: none;
  text-decoration: none;
  white-space: nowrap;
  line-height: var(--nav-h);
}
.header-logo::after {
  content: "Fixith";
  display: inline-block;
  font: 600 17px/var(--nav-h) var(--font-display);
  color: var(--chrome-ink);
  letter-spacing: 0.01em;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  vertical-align: top;
}
.header-logo:hover::after,
.header-logo:focus::after {
  color: #fff;
}
@media (max-width: 767px) {
  .header-logo {
    margin-left: 0 !important;
  }
}

.navbar-nav {
  display: flex;
  align-items: center;
  min-height: var(--nav-h);
  gap: 4px;
}
.navbar-nav > li {
  float: none;
}
.navbar-nav > li > a,
.navbar-inverse .navbar-nav > li > a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--chrome-muted);
  padding: 8px 12px;
  line-height: 20px;
  border-radius: var(--radius-m);
  transition: background-color 0.15s, color 0.15s;
}
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.12);
}
.nav > li.nav-iconitem > a {
  display: inline-block;
  width: 40px;
  height: 40px;
  padding: 0;
  line-height: 40px;
  text-align: center;
  font-size: 17px;
}
.nav > li.nav-iconitem > a .fa {
  line-height: 40px;
}
.navbar-inverse .navbar-toggle {
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-m);
  margin-top: 15px;
  margin-bottom: 15px;
}
.navbar-inverse .navbar-toggle:hover,
.navbar-inverse .navbar-toggle:focus {
  background-color: rgba(255, 255, 255, 0.08);
}
.navbar-inverse .navbar-toggle .icon-bar {
  background-color: var(--chrome-ink);
}
.navbar-inverse .navbar-collapse,
.navbar-inverse .navbar-form {
  border-color: rgba(255, 255, 255, 0.08);
}
@media (max-width: 767px) {
  .navbar-nav {
    display: block;
    min-height: 0;
    margin: 8px -15px;
  }
  .navbar-nav > li {
    display: block;
  }
  .navbar-nav > li > a,
  .nav > li.nav-iconitem > a {
    display: block;
    width: auto;
    height: auto;
    padding: 10px 15px;
    text-align: left;
    line-height: 24px;
    border-radius: 0;
  }
  .nav > li.nav-iconitem > a .fa {
    line-height: 24px;
    width: 24px;
    text-align: center;
    margin-right: 8px;
  }
}

/* --------------------------------------------------------------------------
   Contenitori
   -------------------------------------------------------------------------- */
.content {
  background: transparent;
  padding: 16px 0;
  margin-bottom: 0;
}
.content > div {
  margin-bottom: 16px;
}
.colonnaSX,
.colonnaDX {
  padding-left: 12px;
  padding-right: 12px;
}
.sub-content-container,
.pagina-scheda .sub-content-container {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
}
.sub-content {
  margin: 12px;
}
.cat-content {
  margin: 0;
}
.cat-content .editor,
.cat-content .feature-editor,
.cat-content .project {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
  text-align: left;
}
.cat-content .feature-editor * {
  color: inherit !important;
}
.cat-content .feature-editor {
  color: var(--ink-2);
}
.overlay {
  background-color: transparent;
}

/* indicatori di attesa (UpdateProgress) */
div[id*="udp_progress"] {
  display: inline-block;
  margin: 8px 0;
  padding: 6px 12px;
  font-size: var(--text-small);
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Barra di sezione (Tavola / Dispositivi / Verifiche) e barra azioni DX
   -------------------------------------------------------------------------- */
.project-navbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 4px;
  min-height: 0;
  margin: 0 0 12px;
  padding: 4px;
  border: none;
  border-radius: 10px;
}
.project-navbar:before,
.project-navbar:after {
  display: none;
}
.project-navbar > div {
  float: none;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  padding: 0;
  border: none !important;
  background: transparent;
}
.project-navbar-voice {
  display: block;
  width: 100%;
  padding: 9px 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  text-decoration: none;
  opacity: 1;
  border-radius: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.15s, color 0.15s;
}
.project-navbar-voice:hover,
.project-navbar-voice:focus {
  text-decoration: none;
  opacity: 1;
}

/* SX: controllo segmentato chiaro */
.colonnaSX .project-navbar {
  background: var(--surface-2);
}
.colonnaSX .project-navbar-voice {
  color: var(--muted);
  text-align: center;
}
.colonnaSX .project-navbar-voice:hover,
.colonnaSX .project-navbar-voice:focus {
  color: var(--ink);
  background: var(--hover-surface);
}
.colonnaSX .project-navbar .active,
.colonnaSX .project-navbar .active > a {
  background: transparent;
}
.colonnaSX .project-navbar .active .project-navbar-voice,
.colonnaSX .project-navbar-voice.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* DX: barra strumenti scura con azioni */
.colonnaDX .project-navbar {
  background: var(--chrome);
}
.colonnaDX .project-navbar > div {
  background: transparent;
}
.colonnaDX .project-navbar-voice {
  color: var(--chrome-ink);
  background: rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-align: center;
}
.colonnaDX .project-navbar-voice:hover,
.colonnaDX .project-navbar-voice:focus {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
/* "active" nel markup storico significa solo "abilitato": resta traslucido;
   l'azione principale della barra porta la classe "primary" (arancione) */
.colonnaDX .project-navbar .active > .project-navbar-voice,
.colonnaDX .project-navbar-voice.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--chrome-ink);
}
.colonnaDX .project-navbar .active > .project-navbar-voice:hover,
.colonnaDX .project-navbar-voice.active:hover,
.colonnaDX .project-navbar-voice.active:focus {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.colonnaDX .project-navbar-voice.primary,
.colonnaDX .project-navbar .active > .project-navbar-voice.primary {
  background: var(--accent);
  color: #fff;
}
.colonnaDX .project-navbar-voice.primary:hover,
.colonnaDX .project-navbar-voice.primary:focus {
  background: var(--accent-hover);
  color: #fff;
}
.colonnaDX .project-navbar-voice.aspNetDisabled,
.colonnaDX .project-navbar-voice.aspNetDisabled:hover {
  opacity: 0.4;
  cursor: default;
  background: rgba(255, 255, 255, 0.06);
  color: var(--chrome-ink);
}
.colonnaDX .project-navbar .dropdown > .project-navbar-voice {
  background: rgba(255, 255, 255, 0.06);
}
.project-navbar-voice.a_simulato {
  cursor: default;
}
.project-navbar.verifiche {
  background-color: var(--ok);
}
/* sotto-tab "Dispositivo: Tipo X" (Tavola): controllo segmentato chiaro,
   il selezionato porta la classe "active" dal code-behind */
.colonnaDX .voce-dettaglio .project-navbar {
  background: var(--surface-2);
}
.colonnaDX .voce-dettaglio .project-navbar > div {
  background: transparent;
}
.colonnaDX .voce-dettaglio .project-navbar-voice {
  color: var(--muted);
  background: transparent;
  text-transform: none;
  font-size: 14px;
  letter-spacing: 0.01em;
}
.colonnaDX .voce-dettaglio .project-navbar-voice:hover,
.colonnaDX .voce-dettaglio .project-navbar-voice:focus {
  color: var(--ink);
  background: var(--hover-surface);
}
.colonnaDX .voce-dettaglio .project-navbar-voice.active,
.colonnaDX .voce-dettaglio .project-navbar-voice.active:hover {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.voce-dettaglio .project-navbar .active {
  background-color: transparent;
}
.voce-dettaglio > h4 {
  margin: 6px 0 10px;
}

/* pulsanti-icona inline (ricalcola / ripristina in Verifiche);
   il colore va forzato perché .cat-content .feature-editor * ha !important */
.feature-editor .project-navbar-voice,
.cat-content .feature-editor .project-navbar-voice,
.cat-content .feature-editor .project-navbar-voice * {
  display: inline-block;
  width: auto;
  padding: 6px 10px;
  font-size: 14px;
  color: #fff !important;
  background: var(--accent);
  border-radius: var(--radius-s);
}
.cat-content .feature-editor .project-navbar-voice * {
  padding: 0;
  background: transparent;
}
.feature-editor .project-navbar-voice:hover {
  background: var(--accent-hover);
}
/* avviso "effettua una nuova verifica" */
.cat-content .feature-editor span[id*="lbl_messaggio"] {
  color: var(--warn) !important;
  font-size: 12px !important;
  font-weight: 600;
}

/* menu a discesa "Impostazione materiale" (yamm) */
.dropdown-menu {
  font-size: var(--text-data);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  margin-top: 6px;
}
.yamm .yamm-content {
  padding: 4px;
  background: var(--surface); /* styles.css lo fa arancione pieno */
  color: var(--ink);
}
.dropdown-menu .table-feature.inverse,
.dropdown-menu .table-feature.inverse td {
  background: transparent;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Elenco dispositivi (colonna SX di Dispositivi / Verifiche)
   -------------------------------------------------------------------------- */
.cat-list-icon,
.tabs-left.cat-list-icon {
  background-color: var(--surface-3);
  border-right: 1px solid var(--line);
  border-radius: var(--radius-l) 0 0 var(--radius-l);
}
.tabs-left > li > a {
  padding: 16px 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition: background-color 0.15s, color 0.15s;
}
.tabs-left.cat-list-icon > li:not(.active) > a:focus,
.tabs-left.cat-list-icon > li:not(.active) > a:hover {
  border-color: var(--line);
  background-color: var(--surface-2);
  color: var(--ink);
}
.tabs-left.cat-list-icon > li.active > a,
.tabs-left.cat-list-icon > li.active > a:focus,
.tabs-left.cat-list-icon > li.active > a:hover {
  border: none;
  border-bottom: 1px solid var(--line);
  background-color: var(--surface);
  color: var(--accent-ink);
  box-shadow: inset 3px 0 0 var(--accent);
}

.cat-list {
  border-right: none;
}
.cat-list > li > a,
.cat-list > li > a:not(.action-link) {
  border-bottom: 1px solid var(--line);
}
.cat-list > li i {
  background-color: var(--surface-3);
  border-bottom: 1px solid var(--line);
}
.cat-list.secondary > li a:not(.action-link),
.cat-list.secondary > li i {
  color: var(--ink);
}
.cat-list.secondary > li i {
  border-bottom-color: var(--line);
  border-right-color: var(--line);
}
.cat-list.secondary .category-title {
  background-color: var(--surface);
  font-size: 1em;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.cat-list.secondary .category-title a {
  border: none;
  padding: 14px 52px 14px 44px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  color: var(--ink);
  background: transparent;
  transition: background-color 0.15s;
}
.cat-list.secondary .category-title a:hover,
.cat-list.secondary .category-title a:focus {
  background: var(--surface-3);
  border-color: transparent;
}
.cat-list.secondary .category-title a:not(.action-link),
.cat-list.secondary .category-title i {
  color: var(--ink);
}
.cat-list.secondary .category-title .fa {
  color: var(--accent);
  left: 18px;
  font-size: 14px;
}
.cat-list.secondary .category-title .fa.fa-check-circle-o {
  color: var(--ok) !important;
  font-size: 18px;
}
.cat-list.secondary .category-title .fa.fa-times-circle-o {
  color: var(--bad) !important;
  font-size: 18px;
}
.cat-list.secondary > li .fa {
  right: 16px;
}

/* pannello di dettaglio dentro l'accordion */
.feature-container {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin: 0 12px 12px 44px !important;
  overflow: hidden;
}
.feature {
  background-color: var(--surface);
  font-size: var(--text-small) !important;
}
.feature .add-feature > *,
.feature .description > *,
.feature .quote > * {
  color: var(--ink-2);
}
.feature .add-feature .title,
.feature .description .title,
.feature .quote .title,
.feature-container .title {
  background-color: var(--surface-3) !important;
  color: var(--ink-2) !important;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
}
.feature .op,
.feature .quote {
  background-color: var(--surface);
}
.feature .op *,
.feature .quote * {
  color: var(--ink-2);
}
.feature .op {
  background-color: var(--accent-soft);
}
.feature .row {
  border-bottom: 1px solid var(--line);
}
.feature .row > div {
  border-right-color: var(--line);
}
.feature h5 {
  color: var(--ink-2) !important;
}
.feature p.info img {
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: #fff;
}
.feature .fa-info-circle {
  color: var(--accent-ink);
  font-size: 16px;
}

.cat-list-title {
  color: var(--ink-2);
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   Tabelle "feature" (form a tabella), campi e select
   -------------------------------------------------------------------------- */
.table-container {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.table-feature {
  color: var(--ink-2);
  background-color: var(--surface);
  font-size: var(--text-data);
}
.table,
.table .table,
.table-feature table,
.table-feature .table-feature,
.feature-editor table,
.corpo-tabella table table {
  background-color: transparent;
}
/* fondi bianchi fissi ereditati da styles.css che devono seguire il tema */
.cat-list.secondary > li,
.feature .op div,
.feature .quote div,
.feature-container .op,
.action .action-link {
  background-color: var(--surface) !important;
}
.feature .quote input,
.feature .op input {
  background-color: var(--surface-3);
  color: var(--ink);
}
.yamm .dropdown-menu {
  color: var(--ink);
}
.table > thead > tr > th,
.table > thead > tr > td,
.table > tbody > tr > th,
.table > tbody > tr > td,
.table > tfoot > tr > th,
.table > tfoot > tr > td {
  border-top-color: var(--line);
}
.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > th,
.table-bordered > tbody > tr > td {
  border-color: var(--line);
}
.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: var(--surface-3);
}
.table-hover > tbody > tr:hover {
  background-color: var(--surface-2);
}
legend {
  color: var(--ink);
  border-bottom-color: var(--line);
}
.close {
  color: var(--ink);
  text-shadow: none;
  opacity: 0.6;
}
.table-feature.inverse {
  background-color: var(--chrome-2);
  color: var(--chrome-ink);
}
.table-feature td,
.table-feature th {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: middle;
}
.table-feature th,
.table-feature thead td {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-3);
}
.table-feature tr .cat-title {
  background-color: var(--surface-3);
}
.table-feature .tab-note {
  background-color: var(--surface-3);
  color: var(--muted);
  font-size: var(--text-small);
}
.table-feature h4 {
  font-size: 15px;
  margin: 4px 0 6px;
}
.table-feature h5 {
  margin: 6px 0 4px;
}
.table-feature h6 {
  margin: 4px 0;
}
.table-feature b {
  color: var(--ink);
}
.table-feature .feature-setting {
  font-size: var(--text-small);
}
.table-feature .feature-group td {
  border-bottom: 0;
}
.table-feature sub,
.table-feature sup {
  font-size: 70%;
}

/* campi dentro le tabelle feature */
.table-feature input:not([type="radio"]):not([type="checkbox"]),
.table-feature select,
.table-feature textarea {
  width: 100%;
  min-height: 32px;
  padding: 5px 10px;
  font-family: var(--font-body);
  font-size: var(--text-data);
  line-height: 1.4;
  color: var(--ink);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  text-align: right;
  font-variant-numeric: tabular-nums;
  box-shadow: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.table-feature textarea {
  text-align: left;
  line-height: 1.45;
}
.table-feature input:not([type="radio"]):not([type="checkbox"]):focus,
.table-feature select:focus,
.table-feature textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.table-feature input[readonly]:not([type="radio"]):not([type="checkbox"]),
.table-feature input[disabled]:not([type="radio"]):not([type="checkbox"]),
.table-feature select[disabled],
.table-feature textarea[readonly] {
  background-color: var(--surface-3);
  color: var(--ink-2);
  border-color: var(--line);
}
.table-feature input:not([type="radio"]):not([type="checkbox"]).grey,
.table-feature select.grey,
.table-feature textarea.grey {
  background-color: var(--surface-3);
}
/* campi editabili della verifica (evidenza leggera invece del verde/pesca) */
.feature-editor .table-feature input:not([type="radio"]):not([type="checkbox"]),
.feature-editor .table-feature select,
.feature-editor .table-feature textarea {
  background-color: var(--field-edit);
  border-color: var(--field-edit-border);
}
.inverse .table-feature input:not([type="radio"]):not([type="checkbox"]),
.inverse .table-feature select,
.inverse .table-feature textarea,
.table-feature.inverse input:not([type="radio"]):not([type="checkbox"]),
.table-feature.inverse select,
.table-feature.inverse textarea {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--chrome-ink);
  border-color: rgba(255, 255, 255, 0.18);
}

/* select con freccia vettoriale */
.table-feature select,
.inverse .table-feature select,
.dropdown-menu .table-feature.inverse select,
select.form-control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-left: 10px;
  padding-right: 30px;
  text-align: left;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 8px;
}
.inverse .table-feature select,
.table-feature.inverse select {
  background-color: rgba(255, 255, 255, 0.08);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f3efe9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.dropdown-menu .table-feature.inverse select,
.dropdown-menu .table-feature.inverse input:not([type="radio"]):not([type="checkbox"]),
.dropdown-menu .table-feature.inverse textarea {
  background-color: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  background-image: var(--select-arrow);
}
.dropdown-menu .table-feature.inverse input:not([type="radio"]):not([type="checkbox"]),
.dropdown-menu .table-feature.inverse textarea {
  background-image: none;
}
.table-feature select::-ms-expand {
  display: none;
}

/* "tabella" risultati (Dettaglio dispositivi, ancoranti) */
.tabella {
  padding: 4px 0 0;
}
.tabella table {
  color: var(--ink-2);
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  font-size: var(--text-data) !important; /* inline "font-size: 1.1em" nel markup */
}
.tabella table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2); /* neutralizza "color: grey" inline sulle righe di intestazione */
  font-variant-numeric: tabular-nums;
}
.tabella table tbody > tr:first-of-type > td,
.tabella table tbody > tr[style*="grey"] > td,
.tabella table tbody > tr[style*="gray"] > td {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background-color: var(--surface-2);
}
.tabella table tbody > tr:first-of-type > td.selector,
.tabella table tbody > tr:first-of-type > td[style*="text-align:left"] {
  font-family: var(--font-body);
  font-size: var(--text-data);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.tabella table tr:last-child td {
  border-bottom: 0;
}
.tabella table td:not(.selector) {
  font-size: var(--text-data);
}
.tabella table tr:nth-child(even) {
  background-color: var(--surface);
}
.tabella table tr:nth-child(odd) {
  background-color: var(--surface-3);
}
.tabella table tr:first-of-type td {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background-color: var(--surface-2);
}
.tabella table tr:nth-child(even) .tot,
.tabella table tr:nth-child(odd) .tot {
  background-color: var(--accent-soft);
  color: var(--accent-ink);
}
.tabella table .others {
  background-color: var(--surface) !important;
}
.tabella table .others .tot-label {
  background-color: var(--surface-3);
}
.tabella table .others .tot {
  background-color: var(--accent) !important;
  color: #fff;
}
.tabella table select,
.tabella table input:not([type="radio"]):not([type="checkbox"]) {
  min-height: 30px;
  padding: 4px 8px;
  font-size: var(--text-data);
  color: var(--ink);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
}

/* celle di esito verifica: pillola leggibile invece della cella piena */
.cella-corretto,
.cella-errore,
.tabella table td.cella-corretto,
.tabella table td.cella-errore {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cella-corretto,
.tabella table td.cella-corretto {
  background-color: var(--ok-soft);
  color: var(--ok);
}
.cella-corretto a,
.cella-corretto span {
  color: var(--ok) !important;
}
.cella-errore,
.tabella table td.cella-errore {
  background-color: var(--bad-soft);
  color: var(--bad);
}
.cella-errore a,
.cella-errore span {
  color: var(--bad) !important;
}
.cella-corretto a,
.cella-errore a {
  text-decoration: none;
}
.cella-corretto a:hover,
.cella-errore a:hover {
  text-decoration: underline;
}

/* semafori */
.semafori-verifiche .semaforo {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-right-color: var(--line);
  padding: 8px 12px;
}
.semafori-verifiche .semaforo.active {
  color: var(--ok);
}

/* --------------------------------------------------------------------------
   Pulsanti
   -------------------------------------------------------------------------- */
.btn {
  width: auto;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  box-shadow: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn .fa {
  margin-right: 2px;
}
.btn-lg {
  font-size: 16px;
  padding: 11px 20px;
  border-radius: var(--radius-m);
}
.btn-sm,
.btn-xs {
  font-size: 13px;
  padding: 5px 10px;
}
.btn-primary,
.btn-primary:focus,
.btn-primary.focus {
  color: #fff;
  background-color: var(--accent);
  border-color: var(--accent);
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
  color: #fff;
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-primary:focus {
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.btn-default,
.btn-default:focus {
  color: var(--ink);
  background-color: var(--surface);
  border-color: var(--line-strong);
}
.btn-default:hover,
.btn-default:active,
.btn-default.active {
  color: var(--ink);
  background-color: var(--surface-2);
  border-color: var(--line-strong);
}
.btn-success {
  background-color: var(--ok);
  border-color: var(--ok);
}
.btn-danger {
  background-color: var(--bad);
  border-color: var(--bad);
}
.btn-link {
  color: var(--accent-ink);
}
.btn.with-icon {
  font-size: 14px;
}
.btn-group-justified > .btn,
.btn-group-justified > .btn-group > .btn {
  border-radius: 0;
}
.btn-group-justified > .btn:first-child,
.btn-group-justified > .btn-group:first-child > .btn {
  border-radius: var(--radius-s) 0 0 var(--radius-s);
}
.btn-group-justified > .btn:last-child,
.btn-group-justified > .btn-group:last-child > .btn {
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
.btn-square {
  border: 1px solid var(--line);
  border-radius: 10px;
}
.btn-square:hover,
.btn-square.active {
  border-color: var(--accent);
}

/* pulsanti rotondi a fondo modale (conferma / annulla) */
.graphic-button {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-3);
  border-top: 1px solid var(--line);
}
.graphic-button .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-2);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.graphic-button .button:hover,
.graphic-button .button:focus {
  background-color: var(--surface-2);
  color: var(--ink);
}
.graphic-button .button:has(.fa-check-circle-o),
.graphic-button .button:has(.fa-send-o),
.graphic-button .button:has(.fa-send),
.graphic-button .button:has(.fa-save),
.graphic-button .button:has(.fa-floppy-o) {
  color: #fff;
  background-color: var(--accent);
  border-color: var(--accent);
}
.graphic-button .button:has(.fa-check-circle-o):hover,
.graphic-button .button:has(.fa-send-o):hover,
.graphic-button .button:has(.fa-send):hover,
.graphic-button .button:has(.fa-save):hover,
.graphic-button .button:has(.fa-floppy-o):hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.graphic-button .button i {
  width: auto;
  height: auto;
}

/* --------------------------------------------------------------------------
   Form Bootstrap (controlli r*, Profilo, Registrazione)
   -------------------------------------------------------------------------- */
.form-control {
  height: 36px;
  padding: 6px 10px;
  font-size: var(--text-data);
  color: var(--ink);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  box-shadow: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.form-control[readonly],
.form-control[disabled] {
  background-color: var(--surface-3);
}
textarea.form-control {
  height: auto;
}
.control-label {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--muted);
  padding-top: 9px;
}
.help-block {
  font-size: 12px;
  color: var(--muted);
}
.has-error .help-block,
.has-error .control-label {
  color: var(--bad);
}
.has-error .form-control {
  border-color: var(--bad);
  box-shadow: none;
}
.input-group-addon {
  font-size: var(--text-data);
  color: var(--muted);
  background-color: var(--surface-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
}
.input-group .form-control:first-child,
.input-group-addon:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.input-group .form-control:last-child,
.input-group-addon:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.form-text,
.text-muted {
  color: var(--muted);
}

/* checkbox e radio personalizzati */
.checkbox label::before {
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background-color: var(--surface);
  width: 1.2em;
  height: 1.2em;
  margin-top: 0.1em;
}
.checkbox label::after {
  width: 1.2em;
  height: 1.2em;
  padding-left: 2px;
  padding-top: 1px;
  font-size: 0.8em;
  color: #fff;
}
.radio label::before {
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  width: 1.2em;
  height: 1.2em;
  margin-top: 0.1em;
}
.radio label::after {
  width: 0.7em;
  height: 0.7em;
  left: 0.25em;
  top: 0.35em;
  margin-left: 0;
  background-color: var(--accent);
}
.checkbox input[type="checkbox"]:checked + label::before,
.checkbox input[type="radio"]:checked + label::before,
.checkbox-verifiche input[type="checkbox"]:checked + label::before,
.checkbox-verifiche input[type="radio"]:checked + label::before {
  background-color: var(--accent);
  border-color: var(--accent);
}
.checkbox input[type="checkbox"]:checked + label::after,
.checkbox input[type="radio"]:checked + label::after,
.checkbox-verifiche input[type="checkbox"]:checked + label::after,
.checkbox-verifiche input[type="radio"]:checked + label::after {
  color: #fff;
}
.radio input[type="radio"]:checked + label::before,
.radio-verifiche input[type="radio"]:checked + label::before {
  border-color: var(--accent);
}
.radio input[type="radio"] + label::after,
.radio input[type="radio"]:checked + label::after,
.radio-verifiche input[type="radio"] + label::after,
.radio-verifiche input[type="radio"]:checked + label::after {
  background-color: var(--accent);
}
.checkbox input[type="checkbox"]:focus + label::before,
.radio input[type="radio"]:focus + label::before {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.checkbox label,
.radio label {
  font-size: var(--text-data);
  color: var(--ink-2);
}

/* messaggi */
.alert {
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: var(--text-data);
  border: 1px solid transparent;
  border-left-width: 4px;
  border-radius: var(--radius-m);
}
.alert-danger {
  background-color: var(--bad-soft);
  border-color: var(--bad);
  color: var(--bad-ink);
}
.alert-success {
  background-color: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ok-ink);
}
.alert-warning {
  background-color: var(--warn-soft);
  border-color: var(--warn);
  color: var(--warn-ink);
}
.alert-info {
  background-color: var(--info-soft);
  border-color: var(--info);
  color: var(--info-ink);
}
.label {
  font-weight: 600;
  border-radius: 999px;
  padding: 0.25em 0.7em;
}

/* --------------------------------------------------------------------------
   Modali
   -------------------------------------------------------------------------- */
.modal-backdrop {
  background-color: #0a0a09;
}
.modal-backdrop.in {
  opacity: 0.6;
}
.modal-content {
  background-color: var(--surface);
  color: var(--ink);
  border: none;
  border-top: 4px solid var(--accent);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
}
.content-modal {
  background: var(--surface);
}
.corpo-tabella {
  background: var(--surface);
  padding: 8px 16px 12px;
}
/* le tabelle-form delle modali hanno font-size inline (16px): si uniforma ai dati */
.content-modal table.table-feature[style*="font-size"] {
  font-size: var(--text-data) !important;
}
.corpo-tabella > .row:first-child h4,
.corpo-tabella > .row:first-child .h4 {
  font-size: 18px;
  margin: 10px 0 6px;
}
.corpo-tabella > .row:first-child h5 {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-data);
  color: var(--muted);
  margin: 0 0 10px;
}
.body-tabella .content {
  background: var(--surface);
  padding: 16px;
}
.voce-dettaglio .title {
  background: var(--surface-2);
  color: var(--ink);
  border-radius: var(--radius-s);
}
.overflow-modal-container {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Splash: Login, Home, Registrazione, Profilo
   -------------------------------------------------------------------------- */
body.splash {
  background:
    radial-gradient(720px 420px at 85% -10%, rgba(243, 110, 33, 0.28), transparent 65%),
    radial-gradient(520px 360px at 0% 100%, rgba(243, 110, 33, 0.12), transparent 60%),
    var(--chrome);
  text-align: center;
}
.splash .content,
.splash .container.content {
  background: transparent;
}
.splash .overlay {
  position: static;
  height: auto;
}
.splash-logo {
  /* in flusso (non più fixed): non si sovrappone alla navbar e scorre su schermi bassi */
  position: relative;
  left: auto;
  width: 436px;
  max-width: 100%;
  margin: 32px auto 40px;
  padding: 24px 28px 28px;
  background: var(--surface) !important;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.splash-logo > a:first-child,
.splash-logo > .btn:first-child {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  text-align: left;
}
.splash-logo > a:first-child:hover,
.splash-logo > .btn:first-child:hover {
  background: transparent;
}
.splash-logo h1 {
  display: block;
  width: 100%;
  height: 124px;
  margin: 0 0 58px;
  position: relative;
  border-radius: 12px;
  background-color: var(--chrome);
  background-image:
    radial-gradient(260px 160px at 100% 0%, rgba(243, 110, 33, 0.35), transparent 70%),
    url(../images/logo-livith.svg);
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: auto, 190px auto;
}
.splash-logo h1::after {
  content: "Fixith \00b7  Verifica fissaggi";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 16px;
  font: 700 20px/1.2 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-transform: none;
  text-shadow: none;
}
.splash-logo .row {
  margin-left: 0;
  margin-right: 0;
}
.splash-logo .row > [class^="col-"] {
  padding-left: 0;
  padding-right: 0;
}
.splash-logo input {
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  font-size: var(--text-base);
  color: var(--ink);
  text-align: left;
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.splash-logo input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.splash-logo .btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 16px;
  font-size: 15px;
}
.splash-logo .btn .fa {
  margin-right: 6px;
}
/* Registrati e le voci secondarie della Home come pulsanti "ghost" */
.splash-logo #btnRegistrati,
.splash-logo .btn-home .btn {
  color: var(--ink);
  background-color: var(--surface);
  border-color: var(--line-strong);
}
.splash-logo #btnRegistrati:hover,
.splash-logo .btn-home .btn:hover,
.splash-logo #btnRegistrati:focus,
.splash-logo .btn-home .btn:focus {
  color: var(--ink);
  background-color: var(--surface-2);
  border-color: var(--line-strong);
}
.splash-logo > .row:first-of-type .btn-home .btn,
.splash-logo > .row:first-of-type .btn-home .btn:focus {
  color: #fff;
  background-color: var(--accent);
  border-color: var(--accent);
}
.splash-logo > .row:first-of-type .btn-home .btn:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}
.splash-logo .btn-home .btn {
  text-align: left;
}
.splash-logo .btn-home .btn .fa {
  width: 20px;
  text-align: center;
  margin-right: 8px;
  color: var(--accent-ink);
}
.splash-logo > .row:first-of-type .btn-home .btn .fa {
  color: #fff;
}
.splash-logo .psw-recover,
.splash-logo .nav-iconitem a {
  display: inline-block;
  margin-top: 12px;
  font-size: var(--text-small);
  color: var(--muted);
}
.splash-logo .nav-iconitem a:hover {
  color: var(--accent-ink);
}
.splash-logo .alert {
  margin: 12px 0 0;
}
.splash-logo .help-block {
  margin: 4px 0 0;
}
@media (max-width: 480px) {
  .splash-logo {
    width: calc(100% - 24px);
    margin: 16px auto 24px;
    padding: 20px;
  }
}

/* Registrazione / Profilo: scheda larga su fondo scuro */
.splash .profile {
  max-width: 980px;
  margin: 24px auto;
  padding: 20px 24px 0;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  text-align: left;
  overflow: hidden;
}
.splash .profile h1 {
  font-size: 22px;
  margin: 4px 0 16px;
}
.splash .profile .graphic-button {
  margin: 16px -24px 0;
}

/* --------------------------------------------------------------------------
   Pagina errore e pagine di servizio
   -------------------------------------------------------------------------- */
.content > h1 {
  margin: 8px 0 16px;
}

/* popover (webui-popover) */
.webui-popover {
  border-radius: var(--radius-l);
  border-color: var(--line);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-small);
}
.webui-popover-title {
  font-family: var(--font-display);
  font-weight: 600;
  background: var(--surface-3);
  border-bottom-color: var(--line);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
}

/* tooltip Bootstrap */
.tooltip-inner {
  background-color: var(--chrome);
  border-radius: var(--radius-s);
  font-size: 12px;
  padding: 6px 10px;
}
.tooltip.top .tooltip-arrow {
  border-top-color: var(--chrome);
}

/* --------------------------------------------------------------------------
   Stati impostati dal code-behind (al posto degli stili inline)
   -------------------------------------------------------------------------- */
/* rail dispositivi: voce in errore */
.tabs-left.cat-list-icon > li.errore > a,
.tabs-left.cat-list-icon > li.errore > a:hover,
.tabs-left.cat-list-icon > li.errore > a:focus {
  color: var(--bad);
  box-shadow: inset 3px 0 0 var(--bad);
}
.tabs-left.cat-list-icon > li.errore.active > a {
  background-color: var(--bad-soft);
}
/* spunta "verificato" nell'elenco dispositivi (Verifiche) */
.cat-list.secondary .category-title .fa.verifica-ok {
  color: var(--ok) !important;
}
.cat-list.secondary .category-title .fa.verifica-ko {
  color: var(--bad) !important;
}
/* percentuale di avanzamento della stampa (Stampa_Relazione) */
.perc-ok { color: var(--ok) !important; }
.perc-warn { color: var(--warn) !important; }
.perc-ko { color: var(--bad) !important; }
/* modale "Verifica dispositivo" (Stampa_Relazione): stato elaborazione centrato */
.coda-stato {
  text-align: center;
}
.coda-stato h4 {
  margin: 6px 0;
}
.coda-stato h4.alert-danger {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-m);
}
.coda-stato img {
  display: block;
  margin: 12px auto;
}
.coda-stato .button {
  display: inline-block;
  margin: 4px 0 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  background-color: var(--accent);
  border-radius: var(--radius-s);
  text-decoration: none;
}
.coda-stato .button:hover,
.coda-stato .button:focus {
  background-color: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}
.coda-stato .button + br {
  display: none;
}
.coda-stato .ora {
  display: block;
  margin-top: 4px;
  font-size: var(--text-small);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* avviso di ricalcolo */
.msg-warn {
  color: var(--warn) !important;
  font-size: 12px !important;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Utility (sostituiscono gli stili inline storici del markup)
   -------------------------------------------------------------------------- */
.w-1 { width: 1%; }
.w-5 { width: 5%; }
.w-10 { width: 10%; }
.w-15 { width: 15%; }
.w-20 { width: 20%; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-35 { width: 35%; }
.w-40 { width: 40%; }
.w-50 { width: 50%; }
.w-60 { width: 60%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-90 { width: 90%; }
.w-95 { width: 95%; }
.w-100 { width: 100%; }
.w-1px { width: 1px; }
.w-50px { width: 50px; }
.w-150px { width: 150px; }
.pt-0 { padding-top: 0; }
.pt-10 { padding-top: 10px; }
.pt-12 { padding-top: 12px; }
.pt-20 { padding-top: 20px; }
.pt-25 { padding-top: 25px; }
.pt-30 { padding-top: 30px; }
.pt-50 { padding-top: 50px; }
.pt-60 { padding-top: 60px; }
.pb-10 { padding-bottom: 10px; }
.pb-12 { padding-bottom: 12px; }
.pl-10 { padding-left: 10px; }
.pl-30 { padding-left: 30px; }
.pl-40 { padding-left: 40px; }
.pr-5 { padding-right: 5px; }
.pr-10 { padding-right: 10px; }
.pr-50 { padding-right: 50px; }
.mb-0 { margin-bottom: 0 !important; }
.mt-15 { margin-top: 15px; }
.h-30 { height: 30px; }
.nowrap { white-space: nowrap; }
.overflow-auto { overflow: auto; }
.d-inline { display: inline; }
.pos-rel { position: relative; }
.br-0 { border-right: 0 !important; }
.bl-2 { border-left: 2px solid var(--line-strong); }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px !important; }
.fs-14 { font-size: 14px; }
.fs-15 { font-size: 15px; }
.fs-16 { font-size: 16px; }
.fs-18 { font-size: 18px; }
.fw-normal { font-weight: 400; }
.bold { font-weight: 600; }
.bg-muted { background-color: var(--surface-2); }
.text-accent { color: var(--accent-ink); }
.text-warn { color: var(--warn); }
.sub-label { vertical-align: sub; text-transform: lowercase; }
.hr-error { border-color: var(--bad); }
hr.hr-error { border-top: 1px solid var(--bad); }

/* --------------------------------------------------------------------------
   Interruttore tema (inserito in navbar da javascripts/theme.js)
   -------------------------------------------------------------------------- */
.navbar .container {
  position: relative;
}
.theme-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--chrome-muted);
  border-radius: var(--radius-m);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.theme-toggle:hover,
.theme-toggle:focus {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}
.theme-toggle .fa-sun-o {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .fa-sun-o {
  display: inline-block;
}
:root[data-theme="dark"] .theme-toggle .fa-moon-o {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .fa-sun-o {
    display: inline-block;
  }
  :root:not([data-theme="light"]) .theme-toggle .fa-moon-o {
    display: none;
  }
}
@media (min-width: 768px) {
  .navbar-nav.navbar-right {
    margin-right: 36px;
  }
}
@media (max-width: 767px) {
  .theme-toggle {
    right: 64px; /* lascia spazio al pulsante del menu */
  }
}

/* --------------------------------------------------------------------------
   Contenuti che non passano dai token: disegni SVG e immagini prodotto
   restano su una piastrella bianca in entrambi i temi
   -------------------------------------------------------------------------- */
.feature .description svg,
.description svg,
.feature p.info img {
  background: #fff;
  border-radius: var(--radius-m);
}
.description svg {
  padding: 8px;
  max-width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   Dialoghi "smoke" (conferme/alert JS) e popover
   -------------------------------------------------------------------------- */
.smoke-base {
  background: rgba(10, 10, 9, 0.6);
  z-index: 1060;
}
.smoke-base .dialog {
  top: 18%;
  left: 50%;
  width: 480px;
  max-width: 92vw;
  margin-left: -240px;
}
@media (max-width: 520px) {
  .smoke-base .dialog {
    left: 4vw;
    margin-left: 0;
  }
}
.smoke {
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
}
.smoke-base .dialog-inner {
  margin: 0;
  padding: 20px 24px 18px;
  background: var(--surface);
  color: var(--ink);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-lg);
}
.smoke-base .dialog-inner:before {
  content: none;
}
.dialog-prompt {
  text-align: left;
}
.dialog-prompt input {
  width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  font-size: var(--text-data);
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
}
.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 18px 0 0;
}
.dialog-buttons button,
.dialog-buttons button:nth-child(2) {
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.dialog-buttons button:hover {
  background-color: var(--surface-2);
}
.dialog-buttons button:nth-child(2),
.dialog-buttons button:only-child {
  color: #fff;
  background-color: var(--accent);
  border-color: var(--accent);
}
.dialog-buttons button:nth-child(2):hover,
.dialog-buttons button:only-child:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}
.smoke button + button {
  margin-left: 0;
}

.webui-popover,
.webui-popover-content {
  background-color: var(--surface);
  color: var(--ink-2);
}
.webui-popover.top > .webui-popover-arrow:after,
.webui-popover.top-right > .webui-popover-arrow:after,
.webui-popover.top-left > .webui-popover-arrow:after {
  border-top-color: var(--surface);
}
.webui-popover.bottom > .webui-popover-arrow:after,
.webui-popover.bottom-right > .webui-popover-arrow:after,
.webui-popover.bottom-left > .webui-popover-arrow:after {
  border-bottom-color: var(--surface);
}
.webui-popover.left > .webui-popover-arrow:after,
.webui-popover.left-top > .webui-popover-arrow:after,
.webui-popover.left-bottom > .webui-popover-arrow:after {
  border-left-color: var(--surface);
}
.webui-popover.right > .webui-popover-arrow:after,
.webui-popover.right-top > .webui-popover-arrow:after,
.webui-popover.right-bottom > .webui-popover-arrow:after {
  border-right-color: var(--surface);
}
.webui-popover-title {
  color: var(--ink);
}
.webui-popover .close {
  color: var(--muted);
  opacity: 1;
  text-shadow: none;
}

/* --------------------------------------------------------------------------
   Tablet (768-1199 px): le due colonne restano affiancate da 992 px,
   qui si guadagna spazio senza cambiare struttura
   -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1199px) {
  .colonnaSX,
  .colonnaDX {
    padding-left: 8px;
    padding-right: 8px;
  }
  .project-navbar {
    gap: 3px;
    padding: 3px;
  }
  .project-navbar-voice {
    padding: 8px 8px;
    font-size: 13px;
    white-space: normal;
    line-height: 1.25;
    min-height: 38px;
  }
  .colonnaDX .project-navbar-voice {
    font-size: 11.5px;
    letter-spacing: 0.04em;
  }
  .sub-content {
    margin: 8px;
  }
  .fixed-width {
    width: 60px;
  }
  .row-fluid {
    margin-left: 60px;
  }
  .tabs-left > li > a {
    padding: 14px 4px;
    font-size: 12px;
  }
  .cat-list.secondary .category-title a {
    padding: 12px 44px 12px 36px;
    font-size: 13px;
  }
  .cat-list.secondary .category-title .fa {
    left: 12px;
  }
  .feature-container {
    margin: 0 8px 10px 28px !important;
  }
  .table-feature td,
  .table-feature th {
    padding: 5px 6px;
  }
  .table-feature input:not([type="radio"]):not([type="checkbox"]),
  .table-feature select,
  .table-feature textarea {
    padding: 4px 8px;
    min-height: 30px;
  }
  .table-feature select {
    padding-right: 26px;
  }
  .cat-content .editor,
  .cat-content .feature-editor,
  .cat-content .project {
    padding: 10px;
  }
  .graphic-button {
    padding: 10px 12px;
  }
  .modal-lg {
    width: 94vw;
  }
}
/* portrait tablet: colonne impilate, pannelli con respiro minimo */
@media (min-width: 768px) and (max-width: 991px) {
  .colonnaSX {
    margin-bottom: 16px;
  }
  .feature-container {
    margin-left: 44px !important;
  }
}
/* tocco: bersagli di almeno 40 px */
@media (pointer: coarse) {
  .project-navbar-voice,
  .tabs-left > li > a,
  .cat-list.secondary .category-title a,
  .btn,
  .graphic-button .button {
    min-height: 40px;
  }
  .table-feature input:not([type="radio"]):not([type="checkbox"]),
  .table-feature select,
  .form-control {
    min-height: 38px;
  }
}

/* --------------------------------------------------------------------------
   Movimento: poche transizioni, brevi, disattivabili
   -------------------------------------------------------------------------- */
@keyframes fx-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.feature-container,
.cat-content .feature-editor,
.open > .dropdown-menu,
.webui-popover.in {
  animation: fx-reveal 0.18s ease-out both;
}
.sub-content-container,
.cat-content .feature-editor,
.cat-content .project,
.modal-content,
.splash-logo {
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
body {
  transition: background-color 0.2s, color 0.2s;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Stampa: sempre su chiaro
   -------------------------------------------------------------------------- */
@media print {
  :root,
  :root[data-theme="dark"] {
    --bg: #fff;
    --surface: #fff;
    --surface-2: #eee;
    --surface-3: #f5f5f5;
    --line: #ccc;
    --line-strong: #aaa;
    --ink: #000;
    --ink-2: #222;
    --muted: #555;
    --chrome: #fff;
    --chrome-ink: #000;
    --chrome-muted: #333;
    --shadow: none;
    --shadow-lg: none;
    color-scheme: light;
  }
  body {
    background: #fff;
    padding-top: 0;
  }
  .sub-content-container,
  .cat-content .feature-editor,
  .cat-content .project {
    box-shadow: none;
    border-color: #bbb;
  }
}
