
.operix-preferences-account-card,
.operix-preferences-save-card {
  grid-column: 1 / -1;
}
.operix-preferences-select:focus {
  border-color: var(--operix-green);
  box-shadow: 0 0 0 3px rgba(31, 143, 58, 0.09);
}
.operix-theme-preview span {
  display: block;
  border-radius: 5px;
}
.operix-theme-preview-light {
  background: #f4f7f4;
}
.operix-theme-preview-light span:first-child {
  background: #ffffff;
}
.operix-theme-preview-light span:last-child {
  background: linear-gradient(#ffffff 0 44%, #e8eee9 44% 54%, #ffffff 54%);
}
.operix-theme-preview-dark {
  border-color: #303a33;
  background: #111713;
}
.operix-theme-preview-system {
  background: linear-gradient(90deg, #f4f7f4 0 50%, #111713 50%);
}
.operix-preferences-save-card {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}
html[data-operix-theme="dark"] body {
  background: #0e1310;
  color: #f2f5f2;
}
html[data-operix-theme="dark"] #clientDashboard {
  background: linear-gradient(180deg, #111813 0%, #0d120f 100%);
}
html[data-operix-theme="dark"] .operix-admin-panel {
  background: linear-gradient(180deg, #111813 0%, #0d120f 55%, #111813 100%);
  color: #f2f5f2;
}
html[data-operix-theme="dark"] .operix-admin-header h1,
html[data-operix-theme="dark"] .operix-admin-content h2,
html[data-operix-theme="dark"] .operix-client-section h3,
html[data-operix-theme="dark"] .operix-admin-card strong,
html[data-operix-theme="dark"] .operix-management-card strong,
html[data-operix-theme="dark"] .operix-preferences-card-title strong {
  color: #f2f5f2;
}
html[data-operix-theme="dark"] .operix-admin-header p,
html[data-operix-theme="dark"] .operix-admin-content p,
html[data-operix-theme="dark"] .operix-management-card small,
html[data-operix-theme="dark"] .operix-preferences-card-title small {
  color: #9ba79f;
}
html[data-operix-theme="dark"] .operix-admin-card,
html[data-operix-theme="dark"] .operix-admin-content,
html[data-operix-theme="dark"] .operix-management-card,
html[data-operix-theme="dark"] .operix-preferences-card,
html[data-operix-theme="dark"] .card,
html[data-operix-theme="dark"] .hero-card,
html[data-operix-theme="dark"] .operix-home-card {
  border-color: #29332c;
  background: #161e18;
  color: #f2f5f2;
  box-shadow: none;
}
html[data-operix-theme="dark"] .operix-admin-header .exp-btn,
html[data-operix-theme="dark"] .operix-back-link,
html[data-operix-theme="dark"] .operix-secondary-btn {
  border-color: #344139;
  background: #18211b;
  color: #e9eeea;
}
html[data-operix-theme="dark"] .operix-preferences-icon {
  background: #202a22;
  color: #a7b2aa;
}
html[data-operix-theme="dark"] .operix-preferences-select {
  border-color: #303b33;
  background: #111713;
  color: #eef2ef;
}
html[data-operix-theme="dark"] .operix-theme-choice {
  border-color: #303b33;
  background: #111713;
  color: #c0c9c2;
}
html[data-operix-theme="dark"] .operix-theme-choice.active {
  border-color: #43b649;
  color: #ffffff;
}
html[data-operix-theme="dark"] #clientDashboard .operix-topbar,
html[data-operix-theme="dark"] #clientDashboard .operix-filter-panel,
html[data-operix-theme="dark"] #clientDashboard .operix-main-nav,
html[data-operix-theme="dark"] #clientDashboard .operix-dashboard-status {
  border-color: #29332c;
  background: #161e18;
  color: #f2f5f2;
}
html[data-operix-theme="light"] {
  /* Filtri / spinner: colori semantici unificati */
  --operix-drawer-bg: #f5f8f5;
  --operix-drawer-surface: #ffffff;
  --operix-drawer-control: #f8faf8;
  --operix-drawer-border: #dce7de;
  --operix-drawer-text: #18231c;
  --operix-drawer-muted: #536158;
  --operix-drawer-accent: #1f7a3d;
  --operix-drawer-active: #1f7a3d;
  --operix-drawer-active-text: #ffffff;
  --operix-drawer-hover: #eaf4ed;
  --operix-filters-bar-start: #102117;
  --operix-filters-bar-end: #173d24;
  --operix-loading-backdrop: rgba(244, 247, 244, 0.78);
  --operix-loading-card: #ffffff;
  --operix-loading-border: #dce7de;
  --operix-loading-title: #18231c;
  --operix-loading-detail: #647368;
  --operix-loading-spinner-track: #e8f4eb;
  --operix-loading-spinner-active: #1f7a3d;
  --operix-loading-shadow: 0 18px 50px rgba(11, 42, 22, 0.12);

  --bg: #f5f7f5;
  --bg2: #eef2ef;
  --card: #ffffff;
  --text: #111713;
  --text2: #3d4a42;
  --text3: #6f7b74;
  --border: #dfe6e1;
  --operix-dark: #18231c;
  --operix-green: #2f8f4e;
  --operix-green-soft: #e7f4eb;
  --red: #176b36;
  --red-bg: #e7f4eb;
  --amber: #5e9f70;
  --amber-bg: #eef7f0;
  color-scheme: light;
}
html[data-operix-theme="dark"] {
  /* Token semantici per la pagina multisede (nessun secondo tema). */
  --paper: #1b251e;
  --line: #34463a;
  --secondary: #bdcbc0;
  --mint: #253e2d;
  --green2: #75ce8c;
  --ms-control: #18221c;
  --ms-soft: #222f26;
  --ms-soft-hover: #2a3c30;
  --ms-note-bg: #233b2b;
  --ms-note-border: #3a5844;
  --ms-note-error-bg: #442727;
  --ms-note-error-text: #ffc0bb;
  --ms-note-error-border: #694040;
  --ms-chart-grid: #374c3d;
  --ms-chart-label: #c5d2c8;
  --ms-chart-zero: #83b493;
  /* Filtri / spinner: variante dark in un unico punto */
  --operix-drawer-bg: #101813;
  --operix-drawer-surface: #1b251e;
  --operix-drawer-control: #1e2921;
  --operix-drawer-border: #344238;
  --operix-drawer-text: #f4f7f5;
  --operix-drawer-muted: #b5c2b8;
  --operix-drawer-accent: #79d596;
  --operix-drawer-active: #55bd78;
  --operix-drawer-active-text: #102117;
  --operix-drawer-hover: #293a2e;
  --operix-filters-bar-start: #182a1e;
  --operix-filters-bar-end: #112017;
  --operix-loading-backdrop: rgba(6, 11, 8, 0.8);
  --operix-loading-card: #1b251e;
  --operix-loading-border: #35483a;
  --operix-loading-title: #f4f7f5;
  --operix-loading-detail: #b5c2b8;
  --operix-loading-spinner-track: #2d4634;
  --operix-loading-spinner-active: #78d995;
  --operix-loading-shadow: 0 22px 65px rgba(0, 0, 0, 0.55);

  --bg: #0f1511;
  --bg2: #151e18;
  --surface: #1b251e;
  --surface2: #202c23;
  --card: #1b251e;
  --border: rgba(255, 255, 255, 0.1);
  --border-operix: #334239;
  --text: #f4f7f5;
  --text1: #f4f7f5;
  --text2: #c5cec8;
  --text3: #8e9a92;
  --operix-dark: #f4f7f5;
  --operix-deep: #163b22;
  --operix-green: #64c47d;
  --operix-green-bright: #7bd191;
  --operix-green-soft: #24382a;
  --operix-green-pale: #121914;
  --green: #64c47d;
  --green-bg: #203426;
  --blue: #7ac98d;
  --blue-bg: #25392b;
  --amber: #91d19f;
  --amber-bg: #2a3c2f;
  --red: #4aa767;
  --red-bg: #203126;
  --tav: #64c47d;
  --imm: #78cb8c;
  --asp: #8fd69f;
  --dom: #a8dfb4;
  color-scheme: dark;
}
html[data-operix-theme="dark"] body,
html[data-operix-theme="dark"] #clientDashboard,
html[data-operix-theme="dark"] #operixAdminPanel {
  background: var(--bg) !important;
  color: var(--text);
}
html[data-operix-theme="dark"] .card,
html[data-operix-theme="dark"] .hero-card,
html[data-operix-theme="dark"] .kpi,
html[data-operix-theme="dark"] .serv-card,
html[data-operix-theme="dark"] .vend-card,
html[data-operix-theme="dark"] .operix-home-card,
html[data-operix-theme="dark"] .operix-client-row,
html[data-operix-theme="dark"] .operix-preferences-card,
html[data-operix-theme="dark"] .operix-admin-card,
html[data-operix-theme="dark"] .operix-panel,
html[data-operix-theme="dark"] .operix-modal-card {
  background: var(--card) !important;
  border-color: var(--border) !important;
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
html[data-operix-theme="dark"] input,
html[data-operix-theme="dark"] select,
html[data-operix-theme="dark"] textarea,
html[data-operix-theme="dark"] button.cf-btn,
html[data-operix-theme="dark"] .filter-btn,
html[data-operix-theme="dark"] .anno-btn,
html[data-operix-theme="dark"] .operix-preferences-select {
  background: var(--bg2);
  border-color: var(--border);
  color: var(--text);
}
html[data-operix-theme="dark"] input::placeholder,
html[data-operix-theme="dark"] textarea::placeholder {
  color: var(--text3);
}
html[data-operix-theme="dark"] table,
html[data-operix-theme="dark"] th,
html[data-operix-theme="dark"] td {
  color: var(--text);
  border-color: var(--border) !important;
}
html[data-operix-theme="dark"] thead,
html[data-operix-theme="dark"] tfoot {
  background: var(--bg2);
}
html[data-operix-theme="dark"] .bar-bg {
  background: #2b382f;
}
html[data-operix-theme="dark"] .empty,
html[data-operix-theme="dark"] .hc-sub,
html[data-operix-theme="dark"] .s-sub,
html[data-operix-theme="dark"] .vc-sub,
html[data-operix-theme="dark"] .sl,
html[data-operix-theme="dark"] .sub,
html[data-operix-theme="dark"] small {
  color: var(--text3);
}
html[data-operix-theme="dark"] canvas {
  filter: none;
}
.operix-preferences-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 860px;
}
.operix-preferences-card {
  min-width: 0;
  box-shadow: 0 8px 24px rgba(18, 60, 28, 0.04);
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card, #fff);
}
.operix-preferences-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.operix-preferences-card-title > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.operix-preferences-card-title strong {
  display: block;
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}
.operix-preferences-card-title small {
  display: block;
  margin-top: 3px;
  color: var(--text3);
  font-size: 11.5px;
}
.operix-preferences-icon {
  flex: 0 0 auto;
  font-size: 18px;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--operix-green-soft);
  color: var(--operix-green);
  font-weight: 700;
}
.operix-preferences-select {
  font-family: inherit;
  font-size: 13px;
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.operix-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.operix-theme-choice {
  min-height: 116px;
  font-family: inherit;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}
.operix-theme-choice:hover {
  border-color: #a8b8ab;
  transform: translateY(-1px);
}
.operix-theme-choice.active {
  color: var(--operix-dark);
  border-color: var(--operix-green);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--operix-green) 18%, transparent);
}
.operix-theme-choice strong {
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}
.operix-theme-preview {
  gap: 6px;
  padding: 7px;
  position: relative;
  display: grid;
  grid-template-columns: 32% 1fr;
  overflow: hidden;
  height: 58px;
  border: 1px solid rgba(128, 128, 128, 0.22);
  border-radius: 8px;
}
.operix-theme-preview span:first-child {
  background: #253029;
}
.operix-theme-preview span:last-child {
  background: #f4f7f5;
}
.operix-theme-preview-dark span:first-child {
  background: #101612;
}
.operix-theme-preview-dark span:last-child {
  background: #202a23;
}
.operix-theme-preview-system span:first-child {
  background: linear-gradient(180deg, #253029 0 50%, #101612 50% 100%);
}
.operix-theme-preview-system span:last-child {
  background: linear-gradient(180deg, #f4f7f5 0 50%, #202a23 50% 100%);
}
.operix-preferences-feedback {
  flex: 1;
  min-height: 20px;
  margin-bottom: 8px;
  color: var(--text3);
  font-size: 12px;
}
.operix-preferences-feedback.success {
  color: var(--operix-green);
}
.operix-preferences-feedback.error {
  color: var(--red);
}
.operix-preferences-save {
  min-width: 170px;
  width: 100%;
}
@media (min-width: 760px) {
  .operix-preferences-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .operix-preferences-account-card,
  .operix-preferences-save-card {
    grid-column: 1 / -1;
  }
}
@media (max-width: 560px) {
  .operix-theme-grid {
    grid-template-columns: 1fr;
  }
  .operix-theme-choice {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
  }
  .operix-theme-choice strong {
    text-align: left;
  }
}
html[data-operix-theme="light"] #clientDashboard,
html:not([data-operix-theme="dark"]) #clientDashboard {
  --text: #111111;
  --text1: #111111;
  --text2: #202820;
  --text3: #59645c;
  --green: #1f7a3d;
  --blue: #35a85a;
  --amber: #63ad78;
  --red: #14532d;
  --tav: #14532d;
  --imm: #1f7a3d;
  --asp: #35a85a;
  --dom: #63ad78;
}
html[data-operix-theme="light"] #clientDashboard .kpi .value,
html[data-operix-theme="light"] #clientDashboard .hero-card .hc-val,
html[data-operix-theme="light"] #clientDashboard .vc-val,
html[data-operix-theme="light"] #clientDashboard .serv-card .s-val,
html[data-operix-theme="light"] #clientDashboard .serv-card .s-totale,
html[data-operix-theme="light"] #clientDashboard .operix-home-card-value,
html:not([data-operix-theme="dark"]) #clientDashboard .kpi .value,
html:not([data-operix-theme="dark"]) #clientDashboard .hero-card .hc-val,
html:not([data-operix-theme="dark"]) #clientDashboard .vc-val,
html:not([data-operix-theme="dark"]) #clientDashboard .serv-card .s-val,
html:not([data-operix-theme="dark"]) #clientDashboard .serv-card .s-totale,
html:not([data-operix-theme="dark"]) #clientDashboard .operix-home-card-value {
  color: #111111;
}
html[data-operix-theme="light"] #clientDashboard .kpi.green .value,
html[data-operix-theme="light"] #clientDashboard .kpi.blue .value,
html[data-operix-theme="light"] #clientDashboard .kpi.amber .value,
html[data-operix-theme="light"] #clientDashboard .kpi.red .value,
html[data-operix-theme="light"] #clientDashboard .hero-card.green .hc-val,
html[data-operix-theme="light"] #clientDashboard .hero-card.blue .hc-val,
html[data-operix-theme="light"] #clientDashboard .hero-card.amber .hc-val,
html[data-operix-theme="light"] #clientDashboard .hero-card.red .hc-val,
html:not([data-operix-theme="dark"]) #clientDashboard .kpi.green .value,
html:not([data-operix-theme="dark"]) #clientDashboard .kpi.blue .value,
html:not([data-operix-theme="dark"]) #clientDashboard .kpi.amber .value,
html:not([data-operix-theme="dark"]) #clientDashboard .kpi.red .value,
html:not([data-operix-theme="dark"]) #clientDashboard .hero-card.green .hc-val,
html:not([data-operix-theme="dark"]) #clientDashboard .hero-card.blue .hc-val,
html:not([data-operix-theme="dark"]) #clientDashboard .hero-card.amber .hc-val,
html:not([data-operix-theme="dark"]) #clientDashboard .hero-card.red .hc-val {
  color: #111111;
}
html[data-operix-theme="dark"] #clientDashboard .operix-notification-button {
  border: 1px solid #63ad78;
  background: #173d24;
  color: #ffffff;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-notification-button:hover,
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-notification-button.has-notifications {
  border-color: #8cc79a;
  background: #1f7a3d;
  color: #ffffff;
}
html[data-operix-theme="dark"] #clientDashboard .operix-notification-icon,
html[data-operix-theme="dark"] #clientDashboard .operix-notification-icon svg {
  color: #ffffff;
}
html[data-operix-theme="dark"] #clientDashboard .operix-logout-btn {
  border: 1px solid #63ad78;
  background: #1f7a3d;
  color: #ffffff;
}
html[data-operix-theme="dark"] #clientDashboard .operix-logout-btn:hover {
  border-color: #8cc79a;
  background: #35a85a;
  color: #111111;
}
html[data-operix-theme="dark"] #clientDashboard .operix-home-anomaly-link {
  border: 1px solid #63ad78;
  background: #1f7a3d;
  color: #ffffff;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-home-anomaly-link:hover {
  border-color: #8cc79a;
  background: #35a85a;
  color: #111111;
}
html[data-operix-theme="dark"] #clientDashboard .operix-notification-panel {
  border-color: #355b41;
  background: #16271c;
  color: #ffffff;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-notification-panel-head {
  border-bottom-color: #355b41;
  background: #173d24;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-notification-panel-head
  strong,
html[data-operix-theme="dark"] #clientDashboard .operix-notification-close {
  color: #ffffff;
}
html[data-operix-theme="dark"] #clientDashboard .operix-notification-close {
  border-color: #355b41;
  background: #102117;
}
html[data-operix-theme="dark"] #clientDashboard .operix-notification-item {
  border-bottom-color: #2d4835;
  background: #16271c;
  color: #ffffff;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-notification-item:hover {
  background: #1b3322;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-notification-item-copy
  strong {
  color: #ffffff;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-notification-item-copy
  span {
  color: #dfe9e1;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-notification-item-copy
  small,
html[data-operix-theme="dark"] #clientDashboard .operix-notification-empty {
  color: #a9b9ad;
}
html[data-operix-theme="dark"] #clientDashboard .operix-notification-view-all {
  border-top-color: #355b41;
  background: #1f7a3d;
  color: #ffffff;
}
@media (max-width: 700px) {
  .operix-preferences-layout {
    grid-template-columns: 1fr;
  }
  .operix-preferences-account-card,
  .operix-preferences-save-card {
    grid-column: auto;
  }
  .operix-theme-grid {
    grid-template-columns: 1fr;
  }
  .operix-theme-choice {
    min-height: 92px;
    flex-direction: row;
    align-items: center;
  }
  .operix-theme-preview {
    width: 94px;
    height: 64px;
    flex: 0 0 auto;
  }
  .operix-preferences-save-card {
    align-items: stretch;
    flex-direction: column;
  }
  .operix-preferences-save {
    width: 100%;
  }
}
html[data-operix-theme="dark"] .login-screen {
  --operix-dark: #102117;
  --operix-deep: #173d24;
  --operix-green: #1f7a3d;
  --operix-green-bright: #35a85a;
  --operix-green-soft: #e8f4eb;
  --operix-green-pale: #f6faf7;

  --bg: #f4f7f4;
  --bg2: #edf2ee;
  --surface: #ffffff;
  --surface2: #f4f7f4;
  --card: #ffffff;
  --border: rgba(16, 33, 23, 0.1);

  --text: #111111;
  --text1: #111111;
  --text2: #313a33;
  --text3: #667067;

  color: #111111 !important;
  color-scheme: light;
}
html[data-operix-theme="dark"] .login-screen .login-showcase-copy h1,
html[data-operix-theme="dark"] .login-screen .login-card-heading h2,
html[data-operix-theme="dark"] .login-screen .login-service-copy h3,
html[data-operix-theme="dark"] .login-screen .login-field label {
  color: #102117 !important;
}
html[data-operix-theme="dark"] .login-screen .login-showcase-copy p,
html[data-operix-theme="dark"] .login-screen .login-card-heading p,
html[data-operix-theme="dark"] .login-screen .login-service-copy p,
html[data-operix-theme="dark"] .login-screen .login-security-note {
  color: #647368 !important;
}
html[data-operix-theme="dark"] .login-screen .login-card,
html[data-operix-theme="dark"] .login-screen .login-service-slide {
  border-color: #dce9dd !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #111111 !important;
}
html[data-operix-theme="dark"] .login-screen .login-field input {
  border-color: #dce5dd !important;
  background: #f8faf8 !important;
  color: #102117 !important;
}
html[data-operix-theme="dark"] .login-screen .login-field input::placeholder {
  color: #a4aea6 !important;
}
html[data-operix-theme="dark"] .login-screen .login-field input:focus {
  border-color: #35a85a !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(53, 168, 90, 0.1) !important;
}
html[data-operix-theme="dark"] .login-screen .login-submit {
  border-color: #102117 !important;
  background: #102117 !important;
  color: #ffffff !important;
}
html[data-operix-theme="dark"]
  .login-screen
  .login-submit:hover:not(:disabled) {
  background: #1f7a3d !important;
  color: #ffffff !important;
}
html[data-operix-theme="dark"] .login-screen .login-brand-tag,
html[data-operix-theme="dark"] .login-screen .login-eyebrow,
html[data-operix-theme="dark"] .login-screen .login-card-eyebrow,
html[data-operix-theme="dark"] .login-screen .login-service-kicker,
html[data-operix-theme="dark"] .login-screen .login-suite-note {
  color: #1f7a3d !important;
}
html[data-operix-theme="dark"]
  #clientDashboard
  #catStats
  [class^="cat-arrow-"]::before,
html[data-operix-theme="dark"]
  #clientDashboard
  #catStats
  [class*=" cat-arrow-"]::before {
  border-left-color: #8e9a92;
}
html[data-operix-theme="dark"] #clientDashboard #catSearch,
html[data-operix-theme="dark"] #clientDashboard #piattiSearch,
html[data-operix-theme="dark"] #clientDashboard #meteoCity,
html[data-operix-theme="dark"] #clientDashboard #operixDocNumero,
html[data-operix-theme="dark"] #clientDashboard input[type="search"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6.5' fill='none' stroke='%238e9a92' stroke-width='1.8'/%3E%3Cpath d='m16 16 4 4' fill='none' stroke='%238e9a92' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}
html[data-operix-theme="dark"] #clientDashboard .operix-document-search-btn,
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-document-search-btn:hover,
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-document-search-btn:focus,
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-document-search-btn:focus-visible,
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-document-search-btn:active {
  color: #ffffff !important;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-document-search-btn:hover,
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-document-search-btn:focus,
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-document-search-btn:focus-visible {
  background: #1f7a3d !important;
  border-color: #63ad78 !important;
}
html[data-operix-theme="dark"] #clientDashboard .operix-anomaly-export-btn {
  border-color: #355b41;
  background: #16271c;
  color: #ffffff;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-anomaly-export-btn:hover,
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-anomaly-export-btn:focus-visible {
  border-color: #63ad78;
  background: #1f7a3d;
  color: #ffffff;
}
html[data-operix-theme="dark"] #clientDashboard .operix-page-filterbar {
  border-color: #2d4835;
  background: #16271c;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-page-filter-store
  select,
html[data-operix-theme="dark"] #clientDashboard .operix-page-filter-date input,
html[data-operix-theme="dark"] #clientDashboard .operix-page-filter-time input,
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-page-filter-buttons
  button,
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-page-filter-actions
  button {
  border-color: #355b41;
  background: #102117;
  color: #dfe9e1;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-page-filter-buttons
  button.active,
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-page-filter-actions
  .operix-page-filter-apply {
  border-color: #63ad78;
  background: #1f7a3d;
  color: #ffffff;
}
html[data-operix-theme="dark"] #clientDashboard .operix-page-contip-toggle {
  border-color: #355b41;
  background: #102117;
  color: #ffffff;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-page-contip-toggle:hover,
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-page-contip-toggle:focus-visible {
  border-color: #63ad78;
  background: #173d24;
  color: #ffffff;
}
html[data-operix-theme="dark"]
  #clientDashboard
  .operix-home-kpi-card.operix-contip-kpi {
  border-color: #355b41;
  background: #173d24;
}
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  > [data-operix-page-filterbar] {
  border-color: #2d4835;
  background: #16271c;
  box-shadow: none;
}
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #operixCfrPeriodCompareFilters:not([style*="display: none"]),
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #operixCfrRecurringFilters:not([style*="display: none"]) {
  border-color: #2d4835;
  background: #132219;
}
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #operixCfrSimpleFilters
  > div:first-child
  > div,
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #operixCfrPeriodCompareFilters
  > span[aria-hidden="true"] {
  border-color: #355b41;
  background: #102117;
}
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #operixCfrPeriodCompareFilters
  > label:first-child
  select,
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #operixCfrMonthSelect,
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #operixCfrPrimaryPeriodHost
  .operix-page-filter-date
  input,
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #operixCfrComparePeriodHost
  .operix-page-filter-date
  input,
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #operixCfrDaysButtons
  .cf-btn,
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #cfrAnni
  .cf-btn {
  border-color: #355b41;
  background: #102117;
  color: #dfe9e1;
}
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #operixCfrModePeriodo.active,
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #operixCfrModeRicorrente.active,
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #operixCfrDaysButtons
  .cf-btn.active,
html[data-operix-theme="dark"]
  #clientDashboard
  #page-confronto
  #cfrAnni
  .cf-btn.active {
  border-color: #63ad78;
  background: #1f7a3d;
  color: #ffffff;
}
@media (max-width: 768px) {
  html[data-operix-theme="dark"] #clientDashboard .operix-more-nav-menu {
    background: #1b251e !important;

    border-color: rgba(255, 255, 255, 0.1) !important;

    color: #f4f7f5 !important;

    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38) !important;
  }
  html[data-operix-theme="dark"] #clientDashboard .operix-more-nav-menu button {
    background: #1b251e !important;

    color: #f4f7f5 !important;

    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  }
  html[data-operix-theme="dark"]
    #clientDashboard
    .operix-more-nav-menu
    button:hover,
  html[data-operix-theme="dark"]
    #clientDashboard
    .operix-more-nav-menu
    button:focus {
    background: #243128 !important;

    color: #ffffff !important;
  }
}

/* Impostazioni rapide utente in testata (mobile-friendly) */
.operix-prefs-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex: 0 1 auto;
  min-width: 0;
}
.operix-prefs-quick label {
  display: block;
  margin: 0;
  min-width: 0;
}
.operix-prefs-quick select {
  max-width: 132px;
  min-height: 34px;
  border: 1px solid var(--border, #cbd9ce);
  border-radius: 9px;
  padding: 5px 24px 5px 8px;
  background: var(--card, #fff);
  color: var(--text, #18241b);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
}
.operix-prefs-quick select:focus-visible {
  outline: 2px solid var(--operix-green, #398f50);
  outline-offset: 2px;
}
@media (max-width: 700px) {
  #clientDashboard .operix-topbar-actions {
    flex-wrap: wrap;
    gap: 6px;
  }
  .operix-prefs-quick {
    flex: 1 1 100%;
    order: 3;
    justify-content: flex-end;
  }
  .operix-prefs-quick select {
    max-width: min(145px, 43vw);
  }
}

/* Super Admin, componenti: superfici coerenti anche per selettori specifici */
html[data-operix-theme="dark"] .operix-admin-label,
html[data-operix-theme="dark"] .operix-home-section-head h2,
html[data-operix-theme="dark"] .operix-home-card-head h3,
html[data-operix-theme="dark"] .operix-topbar-title h1 {
  color: var(--text, #f4f7f5);
}
html[data-operix-theme="dark"] .operix-topbar,
html[data-operix-theme="dark"] .topbar,
html[data-operix-theme="dark"] .operix-page-filterbar,
html[data-operix-theme="dark"] .operix-home-anomaly-kpi,
html[data-operix-theme="dark"] .operix-service-card {
  background: var(--card, #1b251e);
  color: var(--text, #f4f7f5);
  border-color: var(--border, rgba(255, 255, 255, 0.1));
}
html[data-operix-theme="dark"] .operix-preferences-card-title,
html[data-operix-theme="dark"] .operix-preferences-card-title strong {
  color: var(--text, #f4f7f5);
}
/* Multisede: usa gli stessi token definiti dal tema, senza un secondo sistema */
html[data-operix-theme="dark"] .ms-pay-card,
html[data-operix-theme="dark"] .ms-compare-summary,
html[data-operix-theme="dark"] .ms-compare-donut-wrap,
html[data-operix-theme="dark"] .ms-products-store,
html[data-operix-theme="dark"] .ms-product-card,
html[data-operix-theme="dark"] .filters,
html[data-operix-theme="dark"] .feedback {
  background: var(--paper, #1b251e);
  color: var(--text, #f4f7f5);
  border-color: var(--line, #34463a);
}
html[data-operix-theme="dark"] .ms-compare-donut::after {
  background: var(--paper, #1b251e);
  box-shadow: inset 0 0 0 1px var(--line, #34463a);
}
html[data-operix-theme="dark"] .ms-products-note,
html[data-operix-theme="dark"] .ms-compare-donut-item,
html[data-operix-theme="dark"] .ms-product-bar-parts {
  background: var(--bg2, #202c23);
  border-color: var(--line, #34463a);
}
html[data-operix-theme="dark"] .ms-store-picker select,
html[data-operix-theme="dark"] .ms-compare-controls select,
html[data-operix-theme="dark"] .ms-products-sort select,
html[data-operix-theme="dark"] .date-row input[type="date"] {
  background: var(--bg2, #202c23);
  color: var(--text, #f4f7f5);
  border-color: var(--line, #34463a);
}

/* Multisede: focus e contrasti accessibili su tutte le modalità. */
html[data-operix-theme="dark"] .ms-compare-graphic text { fill: var(--ms-chart-label); }
html[data-operix-theme="dark"] .ms-product-bar-value,
html[data-operix-theme="dark"] .ms-products-table .ms-winner { color: var(--green); }
html[data-operix-theme="dark"] .presets button,
html[data-operix-theme="dark"] .ms-compare-controls select,
html[data-operix-theme="dark"] .ms-products-sort select,
html[data-operix-theme="dark"] .ms-store-picker select,
html[data-operix-theme="dark"] .date-row input[type="date"] {
  background: var(--ms-control);
  color: var(--text);
  border-color: var(--line);
}
html[data-operix-theme="dark"] .presets button.active {
  background: #2d8f4d;
  border-color: #58c47a;
  color: #ffffff;
}
html[data-operix-theme="dark"] .feedback:not(.error) {
  background: var(--ms-note-bg);
  border-color: var(--ms-note-border);
  color: var(--green);
}
html[data-operix-theme="dark"] tbody tr:hover { background: var(--ms-soft-hover); }
html[data-operix-theme="dark"] .ms-compare-graphic { scrollbar-color: var(--line) var(--ms-soft); }


/* Multisede: rifiniture tema per header, dettaglio e tabelle */
html[data-operix-theme="dark"] .topbar,
html[data-operix-theme="dark"] .intro,
html[data-operix-theme="dark"] .summary-head,
html[data-operix-theme="dark"] .card,
html[data-operix-theme="dark"] .kpi,
html[data-operix-theme="dark"] .filters,
html[data-operix-theme="dark"] .feedback,
html[data-operix-theme="dark"] .count-pill {
  color: var(--text, #f4f7f5);
}
html[data-operix-theme="dark"] .topbar {
  background: var(--paper, #1b251e);
  border-bottom-color: var(--line, #34463a);
}
html[data-operix-theme="dark"] .count-pill {
  background: var(--mint, #263c2c);
  border-color: var(--line, #34463a);
}
html[data-operix-theme="dark"] .muted,
html[data-operix-theme="dark"] .small,
html[data-operix-theme="dark"] .disclaimer,
html[data-operix-theme="dark"] .intro p:last-child,
html[data-operix-theme="dark"] th,
html[data-operix-theme="dark"] .kpi-label,
html[data-operix-theme="dark"] .kpi-sub,
html[data-operix-theme="dark"] .ms-pay-card-sub,
html[data-operix-theme="dark"] .ms-compare-note,
html[data-operix-theme="dark"] .ms-products-footnote {
  color: var(--secondary, #bdcbc0);
}
html[data-operix-theme="dark"] table,
html[data-operix-theme="dark"] th,
html[data-operix-theme="dark"] td {
  border-color: var(--line, #34463a);
  color: var(--text, #f4f7f5);
}
html[data-operix-theme="dark"] tbody tr:hover {
  background: rgba(255,255,255,0.03);
}
html[data-operix-theme="dark"] tfoot td {
  background: var(--bg2, #202c23);
}
html[data-operix-theme="dark"] .track,
html[data-operix-theme="dark"] .ms-product-bar-parts {
  background: var(--bg2, #202c23);
}
html[data-operix-theme="dark"] .presets button {
  background: var(--bg2, #202c23);
  color: var(--text, #f4f7f5);
  border-color: var(--line, #34463a);
}
html[data-operix-theme="dark"] .presets button.active,
html[data-operix-theme="dark"] .primary {
  color: #fff;
}
html[data-operix-theme="dark"] .feedback.error {
  background: rgba(132, 43, 43, 0.18);
  color: #ffb7b7;
  border-color: rgba(255, 146, 146, 0.25);
}
html[data-operix-theme="dark"] .table-scroll {
  scrollbar-color: var(--line, #34463a) transparent;
}

/* Contrasto dei riepiloghi multisede in modalità scura. */
html[data-operix-theme="dark"] #clientDashboard .operix-home-summary-card {
  --operix-summary-text: #f4f7f5;
  --operix-summary-muted: #c2d1c5;
  --operix-summary-accent: #8ee3a5;
  color: var(--operix-summary-text);
}

html[data-operix-theme="dark"] #clientDashboard .operix-home-summary-card :is(div, article, section)[style*="background: #fff"],
html[data-operix-theme="dark"] #clientDashboard .operix-home-summary-card :is(div, article, section)[style*="background:#fff"],
html[data-operix-theme="dark"] #clientDashboard .operix-home-summary-card :is(div, article, section)[style*="background-color: #fff"],
html[data-operix-theme="dark"] #clientDashboard .operix-home-summary-card :is(div, article, section)[style*="background: rgb(255, 255, 255)"],
html[data-operix-theme="dark"] #clientDashboard .operix-home-summary-card :is(div, article, section)[style*="background: #f"],
html[data-operix-theme="dark"] #clientDashboard .operix-home-summary-card :is(div, article, section)[style*="background:#f"] {
  background: #23352a !important;
  border-color: #3a5944 !important;
  color: #f4f7f5 !important;
}

html[data-operix-theme="dark"] #clientDashboard .operix-home-summary-card :is(h2, h3, h4, strong, b) {
  color: #f4f7f5;
}

html[data-operix-theme="dark"] #clientDashboard .operix-home-summary-card :is(p, small, label) {
  color: #c2d1c5;
}

html[data-operix-theme="dark"] #clientDashboard .operix-home-summary-card :is([class*="total"], [class*="totale"], [class*="summary-value"]) {
  color: #8ee3a5;
}

html[data-operix-theme="dark"] #clientDashboard .operix-home-summary-card :is([class*="track"], [class*="bar-bg"]) {
  background: #304b39 !important;
}

html[data-operix-theme="dark"] #clientDashboard .operix-home-summary-card :is([class*="fill"], [class*="bar-part"]) {
  filter: saturate(1.25) brightness(1.13);
}

/* Correzione mirata: riepiloghi interni della pagina multisede standalone. */
html[data-operix-theme="dark"] body .shell .card :is(div, article, section)[style*="background: #fff"],
html[data-operix-theme="dark"] body .shell .card :is(div, article, section)[style*="background:#fff"],
html[data-operix-theme="dark"] body .shell .card :is(div, article, section)[style*="background: #f"],
html[data-operix-theme="dark"] body .shell .card :is(div, article, section)[style*="background:#f"],
html[data-operix-theme="dark"] body .shell .card :is(div, article, section)[style*="background-color: #fff"],
html[data-operix-theme="dark"] body .shell .card :is(div, article, section)[style*="background-color:#fff"],
html[data-operix-theme="dark"] body .shell .card :is(div, article, section)[style*="background: rgb(255"],
html[data-operix-theme="dark"] body .shell .card :is(div, article, section)[style*="background: linear-gradient"] {
  background: #24382b !important;
  border-color: #49624f !important;
  color: #f4f8f5 !important;
}

html[data-operix-theme="dark"] body .shell .card :is(div, article, section)[style*="background: #f"] :is(h2, h3, h4, strong, b, p, small, label, span),
html[data-operix-theme="dark"] body .shell .card :is(div, article, section)[style*="background:#f"] :is(h2, h3, h4, strong, b, p, small, label, span),
html[data-operix-theme="dark"] body .shell .card :is(div, article, section)[style*="background: linear-gradient"] :is(h2, h3, h4, strong, b, p, small, label, span) {
  color: #f1f8f3 !important;
}

html[data-operix-theme="dark"] body .shell .card .ms-product-bar-value,
html[data-operix-theme="dark"] body .shell .card .bar-top span,
html[data-operix-theme="dark"] body .shell .card .ms-compare-number {
  color: #9eeab3 !important;
}

html[data-operix-theme="dark"] body .shell .card .track,
html[data-operix-theme="dark"] body .shell .card .ms-product-bar-parts {
  background: #304b39 !important;
}
