.nora-shell-v2 {
  display: grid;
  grid-template-columns: 240px 1fr;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--ink-900);
  overflow: hidden;
}
.nora-shell-v2__col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.nora-shell-v2__main {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
}

/* Full-bleed: form dettaglio e altre pagine registrate in layoutConfig.js */
.nora-shell-v2__main--flush {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nora-shell-v2__main--flush > .nora-page--flush {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ============ SIDEBAR ============ */
.nora-side {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}
.nora-side__group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}
.nora-side__group-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
  padding: 8px 10px 4px;
}
.nora-side__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.nora-side__item:hover {
  background: var(--surface-3);
  color: var(--ink-900);
}
.nora-side__item.is-active {
  background: var(--primary-tint);
  color: var(--primary-700);
}
[data-theme='dark'] .nora-side__item.is-active { color: var(--primary-muted); }
.nora-side__item.is-active > svg { color: var(--primary); }
[data-theme='dark'] .nora-side__item.is-active > svg { color: var(--primary-muted-sub); }
.nora-side__item-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: visible;
  text-overflow: ellipsis;
}
.nora-side__item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 10.5px;
  font-weight: 700;
}
.nora-side__item.is-active .nora-side__item-badge { background: var(--primary); }

/* ============ TOP BAR (smaller, breadcrumb-style) ============ */
.nora-burger {
  color: var(--ink-700);
}
.nora-page-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -.01em;
}
.nora-siap-logo {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-700);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
}

.nora-page__crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-500);
  margin-bottom: 6px;
}
.nora-page__crumbs strong {
  color: var(--ink-700);
  font-weight: 600;
}
.nora-page__crumbs > svg { color: var(--ink-300); }

/* ============ TOP BAR ============ */
.nora-topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nora-topbar__left,
.nora-topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nora-topbar__right { gap: 10px; }
.nora-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--primary);
}
.nora-brand__sub {
  font-size: 10px;
  color: var(--ink-500);
  font-weight: 500;
}
.nora-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-500);
  font-size: 13px;
}
.nora-crumbs > svg { color: var(--ink-300); }
.nora-crumbs strong {
  color: var(--ink-900);
  font-weight: 600;
}
.nora-society {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink-700);
  font-size: 12.5px;
  font-weight: 500;
}
.nora-society::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
}
.nora-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Toggle tema sole/luna: thumb scorrevole con icona del tema attivo dentro. */
.nora-theme-switch {
  position: relative;
  width: 56px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.nora-theme-switch:hover {
  border-color: var(--primary);
}

.nora-theme-switch:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.nora-theme-switch.is-dark {
  background: var(--primary);
  border-color: var(--primary);
}

.nora-theme-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--warning);
  box-shadow: 0 1px 2px rgba(17, 20, 42, 0.18);
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.nora-theme-switch.is-dark .nora-theme-switch__thumb {
  transform: translateX(26px);
  background: var(--surface-2);
  color: var(--moon-icon);
}

.nora-theme-switch__thumb i {
  font-size: 12px;
  line-height: 1;
}
.nora-icon-btn {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--ink-700);
  cursor: pointer;
}
.nora-icon-btn:hover { background: var(--surface-3); }
.nora-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-700);
  font-size: 12.5px;
}
.nora-lang__flag {
  width: 16px; height: 12px;
  border-radius: 2px;
  background: linear-gradient(90deg, #009246 33%, #fff 33% 66%, #ce2b37 66%);
}
.nora-lang-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9;
}
.nora-lang-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 10;
  overflow: hidden;
  min-width: 100px;
}
.nora-lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink-900);
  font-family: var(--font-family);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.nora-lang-option:hover,
.nora-lang-option.is-selected {
  background: var(--surface-3);
}
.nora-lang-option__flag {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
}
.nora-theme {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--warning);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nora-ver {
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--success-tint);
  color: var(--success);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
}
.nora-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--primary-tint-strong);
}
[data-theme='dark'] .nora-avatar { color: var(--primary-muted); }

/* ============ SIDE RAIL ============ */
.nora-rail {
  width: 64px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
}
.nora-rail__sep {
  width: 28px;
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
.nora-rail__item {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-500);
  cursor: pointer;
  position: relative;
}
.nora-rail__item:hover {
  background: var(--surface-3);
  color: var(--ink-900);
}
.nora-rail__item.is-active {
  background: var(--ink-900);
  color: white;
}
[data-theme='dark'] .nora-rail__item.is-active {
  background: var(--primary);
  color: white;
}
.nora-rail__item .nora-rail__badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
}
.nora-rail__push { flex: 1; }
.nora-rail__logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

/* =========================================================================
   PAGE LAYOUT
   ========================================================================= */
.nora-page {
  padding: 24px 28px;
  max-width: 1600px;
  margin: 0 auto;
}
.nora-page--flush {
  padding: 0;
  max-width: none;
  margin: 0;
}

.nora-page__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.nora-page__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}
.nora-page__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-500);
}
.nora-page__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nora-page__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =========================================================================
   BUTTONS (mirror gigi-form)
   ========================================================================= */
.nbtn {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-900);
  cursor: pointer;
  transition: all .12s ease;
  white-space: nowrap;
}
.nbtn:hover:not(:disabled) { border-color: var(--border-strong); }
.nbtn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.nbtn--primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.nbtn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-700);
}
.nbtn--ghost:hover { background: var(--surface-3); }
.nbtn--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}
.nbtn--sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.nbtn--icon { width: 36px; padding: 0; justify-content: center; }
.nbtn--sm.nbtn--icon { width: 30px; }

/* =========================================================================
   CARD (mirror .gf-card)
   ========================================================================= */
.ncard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-family: var(--font-family);
  color: var(--ink-900);
}
.ncard__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.ncard__ico {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ncard__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-900);
}
.ncard__sub {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 400;
}
.ncard__head-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ncard__body { padding: 22px; }
.ncard__body--flush { padding: 0; }

/* =========================================================================
   BADGES & PILLS
   ========================================================================= */
.nbadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  background: var(--surface-3);
  color: var(--ink-700);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.nbadge--ok   { background: var(--success-tint); color: var(--success); }
.nbadge--err  { background: var(--danger-tint);  color: var(--danger);  }
.nbadge--warn { background: var(--warning-tint); color: var(--warning); }
.nbadge--ai {
  background: var(--ai-tint); color: var(--primary-700);
  border: 1px solid var(--ai-border);
}
[data-theme='dark'] .nbadge--ai { color: var(--primary-muted); }
.nbadge--info { background: var(--primary-tint); color: var(--primary-700); }
[data-theme='dark'] .nbadge--info { color: var(--primary-muted); }
.nbadge__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.npill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-700);
  cursor: pointer;
  transition: all .12s;
}
.npill:hover { background: var(--surface-3); }
.npill.is-active {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: white;
}
[data-theme='dark'] .npill.is-active {
  background: var(--pill-active-bg);
  border-color: var(--pill-active-bg);
  color: var(--pill-active-fg);
}
.npill__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--surface-3);
  color: var(--ink-700);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
}
.npill.is-active .npill__count {
  background: rgba(255,255,255,.2);
  color: white;
}
[data-theme='dark'] .npill.is-active .npill__count {
  background: rgba(17, 20, 42, 0.18);
  color: var(--pill-active-fg);
}

/* =========================================================================
   INPUTS (visual mirror — non-interactive)
   ========================================================================= */
.ninput {
  height: 40px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink-900);
  display: inline-flex;
  align-items: center;
  width: 100%;
}
.ninput.is-placeholder { color: var(--ink-400); }
.ninput__icon { color: var(--ink-400); }
.ninput-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ninput-wrap > label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-700);
}
.ninput-wrap__req { color: var(--danger); }

.nsearch {
  height: 40px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-500);
  font-size: 13.5px;
  min-width: 260px;
}
.nsearch input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink-900);
}

.nselect {
  height: 40px;
  padding: 0 36px 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-900);
  min-width: 160px;
}
.nselect::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--ink-500);
  border-bottom: 1.5px solid var(--ink-500);
  transform: translateY(-70%) rotate(45deg);
}

/* =========================================================================
   TABLE
   ========================================================================= */
.ntable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.ntable thead th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.ntable tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-900);
  vertical-align: middle;
}
.ntable tbody tr:hover td {
  background: var(--surface-2);
}
.ntable tbody tr:last-child td { border-bottom: 0; }
.ntable__num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-700);
}
.ntable__meta {
  font-size: 11.5px;
  color: var(--ink-500);
}

.ntable-paginator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--ink-500);
}
.ntable-paginator__pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ntable-paginator__page {
  min-width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.ntable-paginator__page.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* =========================================================================
   KPI tinted variants for Statistics (red / green / blue card)
   ========================================================================= */
.nkpi-card { position: relative; overflow: hidden; }
.nkpi-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--ink-300);
}
.nkpi-card--red::before   { background: var(--danger);  }
.nkpi-card--green::before { background: var(--success); }
.nkpi-card--blue::before  { background: var(--info); }

/* =========================================================================
   KPI CARDS
   ========================================================================= */
.nkpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.nkpi__label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nkpi__value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.nkpi__unit {
  font-size: 16px;
  color: var(--ink-500);
  font-weight: 500;
}
.nkpi__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}
.nkpi__delta--up   { color: var(--success); }
.nkpi__delta--down { color: var(--danger);  }
.nkpi__foot {
  font-size: 11.5px;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nkpi__spark {
  height: 36px;
  margin-top: 4px;
}

/* =========================================================================
   SECTION (form-like card with icon header)
   ========================================================================= */
.nsec {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.nsec__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
}
.nsec__ico {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nsec__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nsec__body { padding: 22px; }
.nsec__body--flush { padding: 0; }

.nrow {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  align-items: end;
}
.ngrid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ngrid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ngrid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ngrid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

/* =========================================================================
   TABS (Performance dashboard 3 tabs)
   ========================================================================= */
.nora-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
}
.nora-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  margin-bottom: -2px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--ink-500);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.nora-tab:hover { color: var(--ink-700); }
.nora-tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
[data-theme='dark'] .nora-tab.is-active { color: var(--primary-muted-sub); border-bottom-color: var(--primary-muted-sub); }

/* =========================================================================
   FAB
   ========================================================================= */
.nora-fab {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--primary);
  color: white;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 25px -4px rgba(91, 79, 217, 0.45), 0 4px 10px rgba(17, 20, 42, 0.12);
}
.nora-fab:hover { background: var(--primary-600); }

/* =========================================================================
   FILTER BAR (mirrors GigiList FilterBar)
   ========================================================================= */
.nora-filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 14px;
}
.nora-filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.nora-filters__head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-700);
}
.nora-filters__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-900);
}
.nora-filters__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-tint);
  color: var(--primary-700);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
[data-theme='dark'] .nora-filters__badge { color: var(--primary-muted); }
.nora-filters__reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-700);
  cursor: pointer;
  font-family: inherit;
}
.nora-filters__reset:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.nora-filters__row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* =========================================================================
   STATUS pill — neutral variant for canceled/ignored
   ========================================================================= */
.nora-status--neutral {
  background: var(--surface-3);
  color: var(--ink-700);
}
.nora-status--neutral .nora-status__dot { background: var(--ink-500); }
.nora-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(90deg, var(--primary-tint) 0%, var(--surface) 90%);
  border: 1px solid var(--primary-tint-strong);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}
[data-theme='dark'] .nora-banner {
  background: linear-gradient(90deg, var(--ai-tint) 0%, var(--surface) 90%);
  border-color: var(--ai-border);
}
.nora-banner__ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary-tint-strong);
}
[data-theme='dark'] .nora-banner__ico { color: var(--primary-muted-sub); }
.nora-banner__text { flex: 1; min-width: 0; }
.nora-banner__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-900);
}
.nora-banner__detail {
  font-size: 12.5px;
  color: var(--ink-500);
  margin-top: 2px;
}

/* =========================================================================
   STATUS BADGE (rich, for table rows)
   ========================================================================= */
.nora-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  background: var(--surface-3);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-700);
}
.nora-status__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-500);
}
.nora-status--waiting {
  background: var(--warning-tint);
  color: var(--warning);
}
.nora-status--waiting .nora-status__dot { background: var(--warning); animation: nora-pulse 1.6s ease-in-out infinite; }
.nora-status--ended {
  background: var(--success-tint);
  color: var(--success);
}
.nora-status--ended .nora-status__dot { background: var(--success); }
.nora-status--error {
  background: var(--danger-tint);
  color: var(--danger);
}
.nora-status--error .nora-status__dot { background: var(--danger); }
.nora-status--running {
  background: var(--primary-tint);
  color: var(--primary-700);
}
[data-theme='dark'] .nora-status--running { color: var(--primary-muted); }
.nora-status--running .nora-status__dot {
  background: var(--primary);
  animation: nora-pulse 1.6s ease-in-out infinite;
}
@keyframes nora-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.15); }
}

/* =========================================================================
   CHIPS (filters)
   ========================================================================= */
.nchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 500;
}
.nchip__x {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ink-400);
  color: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  cursor: pointer;
}

/* =========================================================================
   ACTIONS DOTS (table actions)
   ========================================================================= */
.naction-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.naction-btn:hover {
  background: var(--surface-3);
  color: var(--ink-900);
  border-color: var(--border);
}
.naction-btn--primary {
  color: var(--primary);
  background: var(--primary-tint);
}
.naction-btn--primary:hover { background: var(--primary-tint-strong); }

/* =========================================================================
   AVATAR
   ========================================================================= */
.navatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  flex-shrink: 0;
  border: 1px solid var(--primary-tint-strong);
}
.navatar--sm { width: 26px; height: 26px; font-size: 10.5px; }
[data-theme='dark'] .navatar { color: var(--primary-muted); }
.navatar--blue   { background: var(--info-tint); color: #2658c7; border-color: #c8d8f6; }
.navatar--green  { background: var(--success-tint); color: var(--success); border-color: #b6e6cf; }
.navatar--orange { background: var(--warning-tint); color: var(--warning); border-color: #f3d8a6; }
.navatar--pink   { background: #fde4ee; color: #c2387a; border-color: #f6c2d8; }
[data-theme='dark'] .navatar--blue   { background: var(--info-tint); color: #93b3f6; border-color: #2b4279; }
[data-theme='dark'] .navatar--green  { background: #142e22; color: #5fd5a4; border-color: #235a40; }
[data-theme='dark'] .navatar--orange { background: #3a2a14; color: #f5b061; border-color: #5e421f; }
[data-theme='dark'] .navatar--pink   { background: #3a1f2a; color: #ed87b6; border-color: #5e2f44; }

/* =========================================================================
   CHANNEL ICONS
   ========================================================================= */
.nchannel {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

/* =========================================================================
   FORM / FIELDS row
   ========================================================================= */
.nfield {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.nfield > label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-700);
}
.nfield > label .nfield__req { color: var(--danger); }
.nfield__hint {
  font-size: 11px;
  color: var(--ink-400);
  margin-top: 2px;
}
.nfield--err > .ninput,
.nfield--err > .nselect {
  border-color: var(--danger);
  background: var(--danger-tint);
}

.nora-page .TableSignatures thead input {
  margin-top: 0;
  background-color: transparent;
  border-radius: var(--radius-md);
}

.nora-page .TableSignatures thead .p-dropdown {
  height: 38px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  border-radius: var(--radius-md);
}

/* =========================================================================
   SHARED DATATABLE (TableSignatures) — stili comuni per tabelle nora-page
   ========================================================================= */
.nora-page .TableSignatures {
  border: none;
  background: transparent;
}

.nora-page .TableSignatures .p-datatable-thead > tr > th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  border-top: none;
  border-left: none;
  border-right: none;
}

.nora-page .TableSignatures .p-datatable-tbody > tr {
  background: var(--surface);
  transition: background-color 0.12s ease;
}

.nora-page .TableSignatures .p-datatable-tbody > tr:hover td,
.nora-page .TableSignatures .p-datatable-tbody > tr:hover > td {
  background: var(--surface-2);
}

.nora-page .TableSignatures .p-datatable-tbody > tr > td {
  color: var(--ink-900);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  font-size: 13px;
  vertical-align: middle;
  border-left: none;
  border-right: none;
}

.nora-page .TableSignatures .p-paginator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--ink-500);
}

.nora-page .TableSignatures .p-paginator .p-paginator-element {
  min-width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-700);
  padding: 0 8px;
  margin: 0 2px;
  font-weight: 500;
  font-size: 12.5px;
}

.nora-page .TableSignatures .p-paginator .p-paginator-element:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
  color: var(--ink-900);
}

.nora-page .TableSignatures .p-paginator .p-paginator-element.p-highlight {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.nora-page .TableSignatures .p-datatable-emptymessage td {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-500);
  font-size: 14px;
}

.nora-page .TableSignatures thead .p-column-filter-row {
  align-items: center;
  gap: 4px;
}

/* filterDisplay="row" + etichette nei placeholder: nasconde la riga titoli vuota (es. solo "Azioni") */
.TableSignatures .p-datatable-thead > tr:first-child:has(+ tr .p-column-filter) {
  display: none;
}

.nora-page .TableSignatures thead .p-column-filter-element {
  display: flex !important;
  align-items: stretch;
  height: 38px;
  box-sizing: border-box;
}

.nora-page .TableSignatures thead .p-inputtext:not(.p-dropdown-label),
.nora-page .TableSignatures thead .p-dropdown {
  height: 38px;
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
}

.nora-page .TableSignatures thead .p-inputtext:not(.p-dropdown-label) {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius-md);
}

.nora-page .TableSignatures thead .p-dropdown {
  width: 100%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

/* =========================================================================
   SHARED DATE-FIELD & FILTER DROPDOWN — utility .nora-date-field
   ========================================================================= */
.nora-date-field .inputTxt {
  background: var(--surface) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  padding: 0 !important;
  width: 100% !important;
  height: 40px;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
}

.nora-date-field .p-calendar {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  background: transparent !important;
}

.nora-date-field .p-calendar .p-inputtext {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: var(--ink-900) !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 12px !important;
  height: 100% !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.nora-date-field .p-calendar .p-datepicker-trigger,
.nora-date-field .p-calendar .p-datepicker-trigger:hover {
  position: static !important;
  transform: none !important;
  width: 36px !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  color: var(--ink-500) !important;
  box-shadow: none !important;
  padding: 0 !important;
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.nora-date-field .p-calendar .p-datepicker-trigger:hover {
  color: var(--primary) !important;
}

.nora-date-field .p-calendar .p-datepicker-trigger .p-button-icon {
  font-size: 14px !important;
  color: inherit !important;
}

.nora-filters .p-dropdown {
  background: var(--surface) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  height: 40px;
  box-shadow: none !important;
  font-family: var(--font-family) !important;
}

.nora-filters .p-dropdown:not(.p-disabled):hover {
  border-color: var(--ink-400) !important;
}

.nora-filters .p-dropdown:not(.p-disabled).p-focus {
  border-color: var(--primary) !important;
  box-shadow: var(--focus-ring) !important;
}

.nora-filters .p-dropdown .p-dropdown-label {
  color: var(--ink-900) !important;
  font-size: 13.5px !important;
  font-family: var(--font-family) !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.nora-filters .p-dropdown .p-dropdown-trigger {
  background: transparent !important;
  border: none !important;
  color: var(--ink-500) !important;
}

.nora-filters .p-dropdown .p-dropdown-clear-icon {
  color: var(--ink-500) !important;
}

/* =========================================================================
   TOGGLE / SWITCH (visual)
   ========================================================================= */
.ntoggle {
  width: 36px; height: 20px;
  background: var(--ink-300);
  border-radius: 999px;
  position: relative;
  display: inline-block;
}
.ntoggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  transition: left .15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.ntoggle.is-on { background: var(--primary); }
.ntoggle.is-on::after { left: 18px; }

/* =========================================================================
   STEP / TIMELINE (process steps)
   ========================================================================= */
.nstep {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.nstep:last-child { border-bottom: 0; }
.nstep__dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}
.nstep--done .nstep__dot {
  background: var(--success);
  color: white;
  box-shadow: 0 0 0 1px var(--success);
}
.nstep--active .nstep__dot {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 3px var(--primary-tint);
}
.nstep--error .nstep__dot {
  background: var(--danger);
  color: white;
  box-shadow: 0 0 0 1px var(--danger);
}
.nstep__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0 0 2px;
}
.nstep__detail {
  font-size: 12px;
  color: var(--ink-500);
}
.nstep__time {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-500);
  white-space: nowrap;
}

/* =========================================================================
   LOGIN (simple — matches src-web/Pages/Login content: logo + form + powered by)
   ========================================================================= */
.nlogin-v2 {
  width: 100%;
  height: 100%;
  position: relative;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.nlogin-v2__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 500px at 30% 30%, var(--primary-tint) 0%, transparent 60%),
    radial-gradient(500px 400px at 80% 80%, var(--primary-tint-strong) 0%, transparent 60%),
    var(--bg);
}
[data-theme='dark'] .nlogin-v2__bg {
  background:
    radial-gradient(700px 500px at 30% 30%, rgba(122,109,240,0.18) 0%, transparent 60%),
    radial-gradient(500px 400px at 80% 80%, rgba(122,109,240,0.12) 0%, transparent 60%),
    var(--bg);
}
.nlogin-v2__card {
  position: relative;
  width: 420px;
  max-width: calc(100% - 32px);
  padding: 40px 36px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}
.nlogin-v2__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}
.nlogin-v2__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-align: center;
  margin: 0 0 24px;
  color: var(--ink-900);
}
.nlogin-v2__powered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--ink-500);
}

/* =========================================================================
   CHAT bubbles
   ========================================================================= */
.nora-chat-bubble {
  border-radius: 10px;
  width: 95%;
  padding: 10px;
  margin-top: 15px;
  border: 1px solid var(--border);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.nora-chat-bubble--nora {
  background-color: var(--surface-2);
}
.nora-chat-bubble--user {
  background-color: var(--surface-3);
}
.nora-chat-link {
  color: var(--link);
  text-decoration: underline;
  word-break: break-all;
}

/* =========================================================================
   ATTACHMENT CHIPS (chat file previews)
   ========================================================================= */
.nora-writer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.nora-writer__bar {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.nora-writer__bar--gigi .gf-chat-composer {
  flex: 1;
  min-width: 0;
}
.nora-attach-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-500);
  cursor: pointer;
  transition: all 0.12s ease;
  font-size: 16px;
}
.nora-attach-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-tint);
}
.nora-attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.nora-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  max-width: min(280px, 100%);
  padding: 0 6px 0 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(17, 20, 42, 0.06);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-700);
}
.nora-attach-chip__icon {
  color: var(--primary);
  font-size: 14px;
  flex-shrink: 0;
}
.nora-attach-chip__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-family);
}
.nora-attach-chip__remove {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--ink-400);
  cursor: pointer;
  padding: 0;
  font-size: 10px;
  flex-shrink: 0;
  transition: all 0.12s ease;
}
.nora-attach-chip__remove:hover {
  background: var(--danger-tint);
  color: var(--danger);
}

/* =========================================================================
   CHART placeholders (we don't draw real charts in mocks)
   ========================================================================= */
.nchart {
  width: 100%;
  height: 220px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}
.nchart__caption {
  position: absolute;
  bottom: 8px; left: 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-400);
}

/* =========================================================================
   DARK adjustments specific to mocks
   ========================================================================= */
[data-theme='dark'] .ntable thead th { background: var(--surface-2); color: var(--ink-500); }
[data-theme='dark'] .ntable tbody tr:hover td { background: var(--surface-2); }
[data-theme='dark'] .nchart__caption { color: var(--ink-500); }

/* =========================================================================
   Artboard background (the design-canvas viewport)
   ========================================================================= */
.nora-mock {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--ink-900);
  font-family: var(--font-family);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.nora-mock > .nora-shell {
  flex: 1;
  min-height: 0;
  height: auto;
}
.nora-mock[data-theme='dark'] {
  /* Triggers the [data-theme='dark'] selectors */
}

/* =========================================================================
   PrimeReact component overrides — allinea al design system Nora
   ========================================================================= */

.p-inputtext {
  font-family: var(--font-family) !important;
  font-size: var(--font-size-md) !important;
  color: var(--ink-900) !important;
  background: var(--surface) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  padding: 8px 12px !important;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast) !important;
}
.p-inputtext:focus {
  border-color: var(--primary) !important;
  box-shadow: var(--focus-ring) !important;
}
.p-inputtext::placeholder {
  color: var(--ink-400) !important;
}

.p-inputtextarea {
  font-family: var(--font-family) !important;
  font-size: var(--font-size-md) !important;
  color: var(--ink-900) !important;
  background: var(--surface) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
}
.p-inputtextarea:focus {
  border-color: var(--primary) !important;
  box-shadow: var(--focus-ring) !important;
}

.p-dropdown {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface) !important;
}
.p-dropdown:not(.p-disabled):hover {
  border-color: var(--primary) !important;
}
.p-dropdown:not(.p-disabled).p-focus {
  border-color: var(--primary) !important;
  box-shadow: var(--focus-ring) !important;
}
/* La label interna del Dropdown porta anche la classe .p-inputtext: senza
   questo reset eredita bordo/sfondo dell'input e crea un doppio bordo. */
.p-dropdown .p-dropdown-label {
  color: var(--ink-900) !important;
  font-family: var(--font-family) !important;
  font-size: var(--font-size-md) !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
.p-dropdown .p-dropdown-trigger {
  background: transparent !important;
  border: none !important;
  color: var(--ink-500) !important;
}
.p-dropdown-panel {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
}
.p-dropdown-panel .p-dropdown-items .p-dropdown-item {
  color: var(--ink-900) !important;
  font-family: var(--font-family) !important;
  font-size: var(--font-size-md) !important;
}
.p-dropdown-panel .p-dropdown-items .p-dropdown-item:hover {
  background: var(--surface-3) !important;
}
.p-dropdown-panel .p-dropdown-items .p-dropdown-item.p-highlight {
  background: var(--primary-tint) !important;
  color: var(--primary-700) !important;
}

.p-inputnumber .p-inputtext {
  border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
}
.p-inputnumber .p-inputnumber-button {
  background: var(--surface-3) !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--ink-700) !important;
}
.p-inputnumber .p-inputnumber-button:hover {
  background: var(--surface-2) !important;
  color: var(--ink-900) !important;
}

.p-calendar .p-inputtext {
  border-radius: var(--radius-md) !important;
}
/* Default integrato: l'icona calendario vive *dentro* l'input, senza il
   "pulsantino" staccato con sfondo/bordo. Le pagine che vogliono un
   trigger evidenziato (es. GigiForm con la pillola viola in section-shell.css)
   hanno selettori più specifici e continuano a vincere. */
.p-calendar .p-datepicker-trigger,
.p-calendar .p-datepicker-trigger:hover {
  background: transparent !important;
  border: none !important;
  color: var(--ink-500) !important;
  box-shadow: none !important;
}
.p-calendar .p-datepicker-trigger:hover {
  color: var(--primary) !important;
}
.p-calendar .p-datepicker-trigger:focus {
  box-shadow: none !important;
}
.p-datepicker {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  font-family: var(--font-family) !important;
}
.p-datepicker .p-datepicker-header {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--ink-900) !important;
}
.p-datepicker table td > span.p-highlight {
  background: var(--primary) !important;
  color: white !important;
  border-radius: var(--radius-sm) !important;
}
.p-datepicker table td > span:focus {
  box-shadow: var(--focus-ring) !important;
}

.p-inputswitch .p-inputswitch-slider {
  border-radius: var(--radius-pill) !important;
  background: var(--ink-300) !important;
  border: 1px solid var(--border) !important;
}
.p-inputswitch .p-inputswitch-slider:before {
  background: var(--surface) !important;
}
.p-inputswitch.p-inputswitch-checked .p-inputswitch-slider {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}
.p-inputswitch.p-inputswitch-checked .p-inputswitch-slider:before {
  background: var(--color-text-on-accent) !important;
}
.p-inputswitch.p-focus .p-inputswitch-slider {
  box-shadow: var(--focus-ring) !important;
}
.p-inputswitch:not(.p-disabled):hover .p-inputswitch-slider {
  background: var(--surface-3) !important;
}
.p-inputswitch.p-inputswitch-checked:not(.p-disabled):hover .p-inputswitch-slider {
  background: var(--primary-600) !important;
}

.p-password .p-inputtext {
  border-radius: var(--radius-md) !important;
}

.p-datatable .p-datatable-thead > tr > th {
  font-family: var(--font-family) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--ink-500) !important;
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
  padding: 12px 16px !important;
}
.p-datatable .p-datatable-tbody > tr > td {
  font-family: var(--font-family) !important;
  font-size: 13px !important;
  color: var(--ink-900) !important;
  border-color: var(--border) !important;
  padding: 12px 16px !important;
}
.p-datatable .p-datatable-tbody > tr:hover > td {
  background: var(--surface-2) !important;
}
.p-datatable .p-datatable-tbody > tr.p-highlight > td {
  background: var(--primary-tint) !important;
  color: var(--primary-700) !important;
}
.p-paginator {
  background: transparent !important;
  border: none !important;
  padding: 12px 0 !important;
  font-family: var(--font-family) !important;
}
.p-paginator .p-paginator-page,
.p-paginator .p-paginator-first,
.p-paginator .p-paginator-prev,
.p-paginator .p-paginator-next,
.p-paginator .p-paginator-last {
  min-width: 32px !important;
  height: 32px !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  color: var(--ink-700) !important;
}
.p-paginator .p-paginator-page.p-highlight {
  background: var(--primary) !important;
  color: var(--color-text-on-accent) !important;
  border-color: var(--primary) !important;
}
.p-paginator .p-paginator-page:not(.p-highlight):hover,
.p-paginator .p-paginator-first:hover,
.p-paginator .p-paginator-prev:hover,
.p-paginator .p-paginator-next:hover,
.p-paginator .p-paginator-last:hover {
  background: var(--surface-2) !important;
}

.p-multiselect {
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface) !important;
}
.p-multiselect-panel {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
}

.p-autocomplete .p-inputtext {
  border-radius: var(--radius-md) !important;
}
.p-autocomplete-panel {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
}
.p-autocomplete-panel .p-autocomplete-items .p-autocomplete-item {
  color: var(--ink-900) !important;
  font-family: var(--font-family) !important;
}
.p-autocomplete-panel .p-autocomplete-items .p-autocomplete-item:hover {
  background: var(--surface-3) !important;
}

.p-dialog {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--border) !important;
}
.p-dialog .p-dialog-header {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  color: var(--ink-900) !important;
  font-family: var(--font-family) !important;
}
.p-dialog .p-dialog-content {
  background: var(--surface) !important;
  color: var(--ink-900) !important;
}
.p-dialog .p-dialog-footer {
  background: var(--surface) !important;
  border-top: 1px solid var(--border) !important;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
}

.p-tooltip .p-tooltip-text {
  background: var(--ink-900) !important;
  color: white !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-family) !important;
  font-size: var(--font-size-xs) !important;
}

/* InputNumber increment/decrement — bordo tema-specifico */
[data-theme='light'] .incrementNumberButton,
[data-theme='light'] .decrementNumberButton {
  border-left: 1px solid var(--border);
}

[data-theme='dark'] .incrementNumberButton,
[data-theme='dark'] .decrementNumberButton {
  border: 0;
}

.recharts-text {
  fill: var(--ink-900);
}
