/* public/css/restyling-fixes.css
 * Final cascade overrides for public UI polish.
 * Must load AFTER theme-arancio.css and nedate-unified.css.
 */

/* ===== Typography: tame ultra-bold H1 fighting legacy ===== */
html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page .faq-modern-title,
html body.nedate-public-standard .welcome-modern-page .faq-modern-title,
html body.nedate-ui-standard.nedate-public-standard .faq-modern-title,
html body.nedate-ui-standard.nedate-auth-standard .login-page__title,
html body.nedate-ui-standard.nedate-auth-standard .register-page h1,
html body.nedate-ui-standard.nedate-auth-standard .login-refresh-page .login-page__title,
html body.nedate-ui-standard.nedate-public-standard h1.faq-modern-title {
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page .faq-modern-title span,
html body.nedate-ui-standard.nedate-public-standard .welcome-modern-title-accent,
html body.nedate-ui-standard.nedate-auth-standard .login-page__title span {
  font-weight: 700 !important;
}

/* Slightly lighter secondary headings */
html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page h2,
html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page .faq-modern-eyebrow,
html body.nedate-ui-standard.nedate-auth-standard .login-page__eyebrow {
  font-weight: 600 !important;
}

/* ===== Navbar height closer to design token target ===== */
:root {
  --nav-h: 64px;
}

html body.nedate-ui-standard .navbar.spedire-navbar,
html body.nedate-ui-standard nav.navbar.fixed-top,
html body.nedate-ui-standard .navbar.nedate-navbar {
  min-height: var(--nav-h, 64px) !important;
}

/* ===== Images / icons: no overflow ===== */
html body.nedate-ui-standard.nedate-public-standard img,
html body.nedate-ui-standard.nedate-auth-standard img,
html body.nedate-ui-standard .welcome-modern-page img,
html body.nedate-ui-standard .shipping-page-wrapper img,
html body.nedate-ui-standard.nedate-public-standard .welcome-modern-parcel-visual,
html body.nedate-ui-standard.nedate-public-standard .welcome-modern-hero__content svg,
html body.nedate-ui-standard.nedate-auth-standard .login-page__brand-panel img {
  max-width: 100% !important;
  height: auto;
}

html body.nedate-ui-standard .welcome-modern-page .welcome-modern-parcel-visual {
  overflow: hidden;
  max-width: 100%;
}

/* Broken image placeholder hint */
html body.nedate-ui-standard.nedate-public-standard img:not([src]),
html body.nedate-ui-standard.nedate-public-standard img[src=""],
html body.nedate-ui-standard.nedate-auth-standard img:not([src]),
html body.nedate-ui-standard.nedate-auth-standard img[src=""] {
  min-width: 48px;
  min-height: 48px;
  background: color-mix(in srgb, var(--nd-brand-border, #e1e6eb) 70%, #fff);
  border: 1px dashed var(--nd-brand-border, #e1e6eb);
  border-radius: 8px;
  object-fit: contain;
}

/* ===== Quote form spacing / layout ===== */
html body.nedate-ui-standard .welcome-modern-hero-tool-card {
  max-width: 100% !important;
  overflow: visible;
}

html body.nedate-ui-standard .welcome-modern-hero-tool-card .tool-tabs {
  display: flex !important;
  gap: 0 !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html body.nedate-ui-standard .welcome-modern-page #qq_form,
html body.nedate-ui-standard .welcome-modern-page #track_form {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

html body.nedate-ui-standard .welcome-modern-page .country-select {
  min-width: 0; /* prevent flex/grid overflow */
}

html body.nedate-ui-standard .welcome-modern-page .log-input-group {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

html body.nedate-ui-standard .welcome-modern-page .log-dropdown {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Soften overly heavy log-labels from page-system (font-weight 900) */
html body.nedate-public-standard .welcome-modern-hero-tool-card .log-label {
  font-weight: 600 !important;
  font-size: 0.75rem !important;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ===== Shipping create form spacing ===== */
html body.nedate-ui-standard .shipping-page-wrapper {
  max-width: 100%;
}

html body.nedate-ui-standard .shipping-page-wrapper .card,
html body.nedate-ui-standard .shipping-page-wrapper .nedate-filter-panel {
  overflow-x: clip;
}

html body.nedate-ui-standard .shipping-page-wrapper .form-floating,
html body.nedate-ui-standard .shipping-page-wrapper .mb-3,
html body.nedate-ui-standard .shipping-page-wrapper .mb-2 {
  max-width: 100%;
}

@media (max-width: 767.98px) {
  html body.nedate-ui-standard .shipping-page-wrapper {
    padding-left: max(0.75rem, env(safe-area-inset-left)) !important;
    padding-right: max(0.75rem, env(safe-area-inset-right)) !important;
  }

  html body.nedate-ui-standard .shipping-page-wrapper .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* La colonna che chiede esplicitamente `p-0` deve restare a zero: e' il caso
     di mittente, destinatario e ritiro, che sulla larghezza del telefono
     stanno una sotto l'altra e devono filare con le card dei passaggi. Senza
     l'esclusione questa correzione vinceva sull'utilita' di Bootstrap e le
     lasciava 5,6px piu' strette per lato. */
  html body.nedate-ui-standard .shipping-page-wrapper [class*="col-"]:not(.p-0):not(.px-0) {
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
    min-width: 0;
  }

  html body.nedate-ui-standard .shipping-page-wrapper [class*="col-"] {
    min-width: 0;
  }

  html body.nedate-ui-standard .welcome-modern-page .pricing-modern-hero__grid {
    gap: 1.25rem !important;
  }

  html body.nedate-ui-standard .welcome-modern-hero-tool-card {
    margin-inline: 0 !important;
    width: 100% !important;
  }

  html body.nedate-ui-standard.nedate-auth-standard .login-page__inner,
  html body.nedate-ui-standard.nedate-auth-standard .register-refresh-page .container-xl {
    padding-left: max(0.85rem, env(safe-area-inset-left)) !important;
    padding-right: max(0.85rem, env(safe-area-inset-right)) !important;
  }
}

/* Kill the harmful 0.7rem shipping mobile override if still present earlier in cascade */
@media (max-width: 768px) {
  html body.nedate-ui-standard .shipping-page-wrapper :is(
    .form-control, .form-select, textarea.form-control, .input-group-text,
    input[type="text"], input[type="email"], input[type="password"],
    input[type="number"], input[type="tel"], input[type="url"],
    input[type="search"], input[type="date"], input[type="datetime-local"],
    input[type="time"], input[type="month"], input[type="week"]
  ) {
    font-size: 16px !important;
  }

  html body.nedate-ui-standard :is(
    .form-control, .form-select, input[type="text"], input[type="email"],
    input[type="password"], input[type="number"], input[type="tel"],
    input[type="url"], input[type="search"], input[type="date"],
    input[type="datetime-local"], input[type="time"], textarea, select
  ) {
    font-size: 16px !important;
  }
}

/* Button radius: nudge brand buttons toward modern without touching payment widgets */
html body.nedate-ui-standard.nedate-public-standard .btn-primary:not(.nedate-checkout-pay):not([data-payment]),
html body.nedate-ui-standard.nedate-auth-standard .btn-primary:not(.nedate-checkout-pay),
html body.nedate-ui-standard .welcome-modern-page .btn-action {
  border-radius: 10px !important;
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html body.nedate-ui-standard.nedate-public-standard *,
  html body.nedate-ui-standard.nedate-auth-standard * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* === sw-mobile-sticky-opaque === */
@media (max-width: 959.98px) {
  .navbar.sticky-top,
  .navbar.fixed-top,
  header.sticky-top,
  header.fixed-top,
  .public-navbar,
  .navbar-public,
  nav.navbar {
    background-color: var(--bs-body-bg, #fff) !important;
    background: var(--bs-body-bg, #fff) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
    z-index: 1050 !important;
  }
  [data-bs-theme="dark"] .navbar.sticky-top,
  [data-bs-theme="dark"] .navbar.fixed-top,
  [data-theme="dark"] .navbar.sticky-top,
  [data-theme="dark"] nav.navbar {
    background-color: var(--bs-body-bg, #121212) !important;
    background: var(--bs-body-bg, #121212) !important;
  }
}

/* ===== P2: Public sticky/fixed navbar — opaque + mobile clearance =====
 * Glass/translucent bar let scrolled text bleed through (faint) and clipped
 * tool-tabs under the sticky header on ~390px. Keep desktop layout intact:
 * only force solid surface/z-index globally; extra top clearance is mobile.
 */
html body.nedate-public-standard {
  --nav-h: 88px;
  --nd-public-sticky-nav-h: 88px;
}

html body.nedate-ui-standard.nedate-public-standard .navbar.navbar-azure.fixed-top,
html body.nedate-public-standard .navbar.navbar-azure.fixed-top,
html body.nedate-public-standard nav.navbar.fixed-top.navbar-azure,
html body.nedate-public-standard .navbar.spedire-navbar.fixed-top,
html body.nedate-public-standard .navbar.nedate-navbar.fixed-top {
  /* was #ffffff — the bar is navy in the 2026 system (spedireweb-pro.css) */
  /* era --sw-navy-950 fisso: identico nei due temi, e in dark la barra
     spariva dentro il canvas. Ora legge il token della navbar, che in tema
     scuro diventa una superficie piu' chiara della pagina. */
  background: var(--sw-nav-bg, var(--sw-navy-950, #070e1c)) !important;
  background-color: var(--sw-nav-bg, var(--sw-navy-950, #070e1c)) !important;
  background-image: none !important;
  /* Solid fill + light backdrop (no glass bleed-through of page text) */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
  z-index: 1040 !important;
  isolation: isolate;
  pointer-events: auto !important;
}

/* Kill leftover translucent pill shells from earlier cascade */
html body.nedate-public-standard .navbar-azure.fixed-top > .container-fluid,
html body.nedate-public-standard .navbar-azure.fixed-top > .container-fluid > .d-flex:first-child,
html body.nedate-public-standard .navbar-azure.fixed-top > .container-fluid > .d-flex:last-child {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body.nedate-public-standard .navbar-azure.fixed-top > .container-fluid > .d-flex:first-child,
html body.nedate-public-standard .navbar-azure.fixed-top > .container-fluid > .d-flex:last-child {
  background: transparent !important;
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Dark: solid shell (no rgba glass) */
:is(html[data-theme="dark"], html[data-bs-theme="dark"]) body.nedate-public-standard .navbar.navbar-azure.fixed-top,
body.dark-mode.nedate-public-standard .navbar.navbar-azure.fixed-top,
body.dark.nedate-public-standard .navbar.navbar-azure.fixed-top,
body.theme-dark.nedate-public-standard .navbar.navbar-azure.fixed-top {
  /* era #0b1526 fisso: quasi indistinguibile dal canvas (#070e1c), e la barra
     spariva dentro la pagina. Sul token diventa --sw-surface, piu' chiara del
     canvas, e si stacca. */
  background: var(--sw-nav-bg, #0b1526) !important;
  background-color: var(--sw-nav-bg, #0b1526) !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom-color: var(--sw-nav-line, rgba(148, 163, 184, .18)) !important;
}

/* Anchor / scroll padding so in-page jumps clear the sticky bar */
html body.nedate-public-standard {
  scroll-padding-top: calc(var(--nd-public-sticky-nav-h, 88px) + 12px);
}

@media (max-width: 767.98px) {
  html body.nedate-public-standard {
    --nav-h: 56px;
    --nd-public-sticky-nav-h: 56px;
  }

  /* Compact sticky bar on phone (~390px) */
  html body.nedate-public-standard .navbar.navbar-azure.fixed-top {
    height: var(--nd-public-sticky-nav-h, 56px) !important;
    min-height: var(--nd-public-sticky-nav-h, 56px) !important;
    max-height: var(--nd-public-sticky-nav-h, 56px) !important;
  }
  html body.nedate-public-standard .navbar-azure > .container-fluid,
  html body.nedate-public-standard .navbar-azure > .container-fluid > .d-flex:first-child,
  html body.nedate-public-standard .navbar-azure > .container-fluid > .d-flex:last-child {
    height: var(--nd-public-sticky-nav-h, 56px) !important;
    min-height: var(--nd-public-sticky-nav-h, 56px) !important;
  }
  html body.nedate-public-standard .navbar-azure .navbar-brand img {
    height: 28px !important;
    max-height: 28px !important;
  }

  /* Tight clearance under sticky bar (was 88+16) */
  html body.nedate-public-standard .welcome-modern-hero,
  html body.nedate-public-standard .pricing-modern-hero,
  html body.nedate-public-standard .contact-modern-hero,
  html body.nedate-public-standard .faq-modern-hero,
  html body.nedate-public-standard .tracking-page-shell {
    padding-top: calc(var(--nd-public-sticky-nav-h, 56px) + 8px + env(safe-area-inset-top, 0px)) !important;
  }

  /* Tool tabs must sit fully below the sticky bar (no partial clip) */
  html body.nedate-public-standard .welcome-modern-hero-tool-card .tool-tabs {
    position: relative;
    z-index: 1;
    margin-top: 0.15rem;
  }

  /* Public content wrappers that rely on content-with-navbar clearance */
  html body.nedate-public-standard:not(:has(.welcome-modern-page)):not(:has(.pricing-modern-hero)):not(:has(.contact-modern-hero)) .content-with-navbar {
    padding-top: calc(var(--nd-public-sticky-nav-h, 56px) + env(safe-area-inset-top, 0px)) !important;
  }
}


/* =========================================================================
   RETIRED 2026-09-12 — the "5px mobile gutter" campaign
   -------------------------------------------------------------------------
   Ten successive @media (max-width: 959.98px) blocks used to live here
   (sw-mobile-fullwidth-gutters, sw-mobile-shell-gap-5px, sw-mobile-navbar-
   gutter, sw-mobile-welcome-col-gutters, sw-mobile-hero-container-xl,
   sw-kill-88px-inset, sw-mobile-no-stack-gutters, sw-mobile-gutter-final,
   sw-beat-welcome-1rem, sw-no-tool-side-margin). Each one existed to beat the
   one before it — the last was literally selected with
   `html:not(#_):not(#__) body.nedate-ui-standard[class][class]…×8` — and the
   net result was a 5px side gutter on phones, too tight to read against.

   Mobile geometry now lives in one place: section 14 of spedireweb-pro.css,
   which also neutralises the `width: min(100% - 88px, 1660px)` inset that
   theme-arancio.css applies to the public containers and that this campaign
   was trying to undo.

   The previous content is kept at
   .ui-backup-20260912/css/restyling-fixes.css.before-gutter-retire
   ========================================================================= */


/* =========================================================================
   Home Tariffe / pricing stack on mobile (2026-09-12)
   -------------------------------------------------------------------------
   Cause: spedireweb-pro base rule forces a 2-col grid with
   minmax(340px, 440px) !important. At ~390px the card column cannot fit
   beside the intro and visually overlaps it. Desktop (≥992px) unchanged.
   ========================================================================= */
@media (max-width: 959.98px) {
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page .welcome-modern-pricing-layout,
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-pricing-section .welcome-modern-pricing-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    gap: 1.5rem !important;
    align-items: stretch !important;
    justify-items: stretch !important;
  }

  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page .welcome-modern-pricing-copy,
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-pricing-section .welcome-modern-pricing-copy {
    order: 1 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page .welcome-modern-pricing-main-card,
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-pricing-section .welcome-modern-pricing-main-card,
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-pricing-layout > .pricing-card {
    order: 2 !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page .welcome-modern-pricing-visual,
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-pricing-section .welcome-modern-pricing-visual {
    display: none !important;
  }
}

/* =========================================================================
   Home Tariffe / billing toggle: centered + directly above Base card (mobile)
   -------------------------------------------------------------------------
   DOM order inside .welcome-modern-pricing-copy is:
     kicker → h2 → p → .billing-toggle → small → .welcome-modern-pricing-points
   On mobile that left the toggle left-aligned and the benefits list between
   toggle and the Base card. Flex order moves benefits above the toggle and
   centers the segmented control; desktop (≥992px) unchanged.
   ========================================================================= */
@media (max-width: 959.98px) {
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page .welcome-modern-pricing-copy,
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-pricing-section .welcome-modern-pricing-copy {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-pricing-copy > .welcome-modern-section-kicker,
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-pricing-copy > h2,
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-pricing-copy > p {
    order: 1 !important;
  }

  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-pricing-copy > .welcome-modern-pricing-points {
    order: 2 !important;
    margin-top: 1rem !important;
  }

  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-pricing-copy > .billing-toggle {
    order: 3 !important;
    align-self: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 1.25rem !important;
  }

  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-pricing-copy > small {
    order: 4 !important;
    align-self: center !important;
    text-align: center !important;
  }
}

/* =========================================================================
   Home CTA "Pronto a semplificare…" — match how-section ("tre passaggi") width
   -------------------------------------------------------------------------
   Cause: nedate-page-system paints .welcome-modern-cta as an inset navy card
   (margin clamp(2.4rem…) + padding 2rem + .container 2.2rem), while
   .welcome-modern-how-section is a full-bleed navy band in the same shell
   frame. Result at 390px: CTA navy ~306px vs how band 390px.

   Fix: CTA section uses the same shell-gutter pullout / full-bleed band as
   how-section; navy moves onto the section; nested .cta-grid loses its own
   card chrome. Mobile keeps a ~5px shell gutter on both bands so they stay
   aligned. Desktop unchanged in content x (container centred as before).
   ========================================================================= */
html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page .welcome-modern-cta,
html body.nedate-ui-standard.nedate-public-standard .welcome-modern-cta.landing-cta-banner,
html body.nedate-ui-standard.nedate-public-standard section.welcome-modern-cta {
  display: block !important;
  margin-inline: calc(-1 * var(--sw-shell-gutter, 0px)) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  width: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  padding-inline: 0 !important;
  padding-block: var(--sw-section-y, clamp(2.5rem, 2rem + 2vw, 4.5rem)) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  background:
    radial-gradient(760px 420px at 88% 18%, rgba(240, 70, 81, .12), transparent 68%),
    linear-gradient(160deg, var(--sw-navy-950), var(--sw-navy-850) 62%, var(--sw-navy-800)) !important;
}

html body.nedate-ui-standard.nedate-public-standard .welcome-modern-cta > .container,
html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page .welcome-modern-cta > .container {
  width: 100% !important;
  /* Erano `max-width: 1268px` e 14px di lato: il contenuto della fascia
     finiva a 20px dal bordo mentre tutto il resto della home sta a 66.
     Ora rimette il gutter della scocca piu' quello del contenitore, come
     le altre fasce a tutta larghezza (2026-09-12). */
  max-width: none !important;
  margin-inline: auto !important;
  padding-inline: calc(var(--sw-gutter) + var(--sw-shell-gutter, 0px)) !important;
}

html body.nedate-ui-standard.nedate-public-standard .welcome-modern-cta .welcome-modern-cta-grid,
html body.nedate-ui-standard.nedate-public-standard .welcome-modern-cta-grid {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Mobile: la how-section ("tre passaggi") tiene il gutter ~5px; il CTA resta full-bleed come su desktop.
   Sotto i 768px la scocca .welcome-modern-page tiene 5px di padding fissi (nedate-page-system + sw-mobile-kill-welcome-8-25),
   quindi il CTA li compensa con margine -5px per arrivare esattamente ai bordi. */
@media (max-width: 959.98px) {
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-how-section {
    margin-inline: 5px !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page .welcome-modern-cta,
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-cta.landing-cta-banner,
  html body.nedate-ui-standard.nedate-public-standard section.welcome-modern-cta {
    margin-inline: calc(-1 * var(--sw-shell-gutter, 0px)) !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-cta > .container,
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page .welcome-modern-cta > .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}
@media (max-width: 767.98px) {
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-page .welcome-modern-cta,
  html body.nedate-ui-standard.nedate-public-standard .welcome-modern-cta.landing-cta-banner,
  html body.nedate-ui-standard.nedate-public-standard section.welcome-modern-cta {
    margin-inline: -5px !important;
  }
}

/* === sw-no-unit-divider: no vertical border before kg/cm === */
html body.nedate-ui-standard .welcome-modern-hero-tool-card .log-unit,
html body.nedate-ui-standard .welcome-modern-page .welcome-modern-hero-tool-card .log-unit,
html body.nedate-ui-standard[class][class][class] .welcome-modern-hero-tool-card :is(.log-unit, .input-group-text),
html body.nedate-ui-standard[class][class][class] .qq-parcel :is(.log-unit, .input-group-text) {
  border-left: 0 !important;
  border-right: 0 !important;
  box-shadow: none !important;
}


/* === sw-parcel-2x2: Peso|Altezza / Larghezza|Profondità === */
html body.nedate-ui-standard .welcome-modern-hero-tool-card .qq-parcel.qq-parcel-2x2,
html body.nedate-ui-standard .welcome-modern-hero-tool-card .qq-parcel {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}
html body.nedate-ui-standard .welcome-modern-hero-tool-card .qq-parcel > .log-input-group {
  min-width: 0 !important;
  width: 100% !important;
}
html body.nedate-ui-standard .welcome-modern-hero-tool-card .qq-parcel #qq_weight,
html body.nedate-ui-standard .welcome-modern-hero-tool-card .qq-parcel #qq_height,
html body.nedate-ui-standard .welcome-modern-hero-tool-card .qq-parcel #qq_width,
html body.nedate-ui-standard .welcome-modern-hero-tool-card .qq-parcel #qq_depth {
  padding: 26px var(--wmq-x, 16px) 8px var(--wmq-x, 16px) !important;
  text-align: left !important;
}

/* === sw-mobile-nav-gap: less space under navbar on phones === */
@media (max-width: 767.98px) {
  html body.nedate-public-standard,
  html body.nedate-admin-standard {
    --nav-h: 56px !important;
    --nd-public-sticky-nav-h: 56px !important;
    --sw-nav-height: 56px !important;
  }
  /* La barra dell'amministrazione, sul telefono, restava alta 62 mentre quella
     di tutto il resto del sito e' 56: sei pixel che spostavano in basso ogni
     pagina dell'amministrazione. Stessa altezza per tutti. */
  html body.nedate-public-standard .navbar.navbar-azure.fixed-top,
  html body.nedate-public-standard nav.navbar.fixed-top.navbar-azure,
  html body.nedate-admin-standard .navbar.navbar-azure.fixed-top,
  html body.nedate-admin-standard nav.navbar.fixed-top.navbar-azure {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
  }
  html body.nedate-public-standard .navbar-azure > .container-fluid,
  html body.nedate-public-standard .navbar-azure > .container-fluid > .d-flex,
  html body.nedate-admin-standard .navbar-azure > .container-fluid,
  html body.nedate-admin-standard .navbar-azure > .container-fluid > .d-flex {
    height: 56px !important;
    min-height: 56px !important;
  }
  html body.nedate-public-standard .welcome-modern-hero,
  html body.nedate-public-standard .pricing-modern-hero,
  html body.nedate-public-standard .contact-modern-hero,
  html body.nedate-public-standard .faq-modern-hero,
  html body.nedate-public-standard .tracking-page-shell {
    padding-top: calc(56px + 8px + env(safe-area-inset-top, 0px)) !important;
  }
  html body.nedate-public-standard .content-with-navbar {
    padding-top: 0 !important; /* hero owns the offset; avoid double gap */
  }
}

/* === sw-mobile-eyebrow-gap: navbar → "Tutto in un'unica piattaforma" === */
@media (max-width: 767.98px) {
  html body.nedate-public-standard:has(.welcome-modern-page) .welcome-modern-hero,
  html body.nedate-public-standard .welcome-modern-hero {
    padding-top: calc(56px + 6px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: 0.75rem !important;
    margin-top: 0 !important;
  }
  html body.nedate-public-standard:has(.welcome-modern-page) .content-with-navbar,
  html body.nedate-public-standard .content-with-navbar,
  html body.nedate-public-standard:has(.welcome-modern-page) #app3d,
  html body.nedate-public-standard #app3d,
  html body.nedate-public-standard main {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  /* kill extra space above the eyebrow pill */
  html body.nedate-public-standard .welcome-modern-hero .container-xl,
  html body.nedate-public-standard .welcome-modern-hero .container,
  html body.nedate-public-standard .welcome-modern-hero__content,
  html body.nedate-public-standard .welcome-modern-hero__content > *:first-child,
  html body.nedate-public-standard .welcome-modern-hero :is(
    .faq-modern-eyebrow,
    .welcome-modern-section-kicker,
    .welcome-modern-eyebrow,
    [class*="eyebrow"]
  ) {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

/* === sw-mobile-hero-stack: stop side-by-side centering gap above eyebrow === */
@media (max-width: 959.98px) {
  html body.nedate-public-standard .welcome-modern-page .pricing-modern-hero__grid,
  html body.nedate-public-standard .welcome-modern-hero .pricing-modern-hero__grid,
  html body.nedate-public-standard :is(.pricing-modern-hero__grid) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    align-items: start !important;
    align-content: start !important;
    justify-items: stretch !important;
    gap: 1.25rem !important;
  }
  html body.nedate-public-standard .welcome-modern-hero__content {
    order: 1 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    align-self: start !important;
  }
  html body.nedate-public-standard .welcome-modern-hero__tool {
    order: 2 !important;
    align-self: start !important;
    margin-top: 0 !important;
  }
  html body.nedate-public-standard .welcome-modern-parcel-visual {
    display: none !important;
  }
  html body.nedate-public-standard .welcome-modern-hero {
    padding-top: calc(56px + 8px + env(safe-area-inset-top, 0px)) !important;
  }
  html body.nedate-public-standard .welcome-modern-page .faq-modern-eyebrow {
    margin-top: 0 !important;
    margin-bottom: 0.75rem !important;
  }
}

/* === sw-mobile-kill-welcome-8-25: page pad was stacking under navbar === */
@media (max-width: 767.98px) {
  html body.nedate-public-standard:has(.welcome-modern-page) .welcome-modern-page {
    padding-top: 0 !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  html body.nedate-public-standard:has(.welcome-modern-page) .welcome-modern-hero {
    padding-top: calc(56px + 15px + env(safe-area-inset-top, 0px)) !important;
    margin-top: 0 !important;
  }
  html body.nedate-public-standard:has(.welcome-modern-page) .faq-modern-eyebrow {
    margin-top: 0 !important;
  }
}

/* === sw-footer-mobile-lang-first: su mobile il selettore lingua va SOPRA il copyright ===
   (richiesta 12/09: menu lingua sopra la riga del ©; global.css impila
   .nedate-footer-bottom in colonna mettendo prima il copyright — qui si inverte,
   il desktop resta in riga con la lingua a destra) */
@media (max-width: 959.98px) {
  html body.nedate-ui-standard .nedate-site-footer .nedate-footer-bottom {
    flex-direction: column-reverse !important;
  }
}

/* === sw-no-pink-wash: flat white home/hero (no pink/red glow) === */
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark) .welcome-modern-page,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page) .welcome-modern-page {
  background: #ffffff !important;
  background-image: none !important;
}
html body.nedate-public-standard :is(.welcome-modern-hero, .faq-modern-hero, .pricing-modern-hero, .tracking-login-hero) {
  background: #ffffff !important;
  background-image: none !important;
}
html body.nedate-public-standard :is(.welcome-modern-hero, .faq-modern-hero, .pricing-modern-hero, .tracking-login-hero)::before,
html body.nedate-public-standard :is(.welcome-modern-hero, .faq-modern-hero, .pricing-modern-hero, .tracking-login-hero)::after,
html body.nedate-public-standard .welcome-modern-hero::before,
html body.nedate-public-standard .welcome-modern-hero::after {
  content: none !important;
  display: none !important;
  background: none !important;
  opacity: 0 !important;
}

/* === sw-no-pink-wash-v2: kill every pink wash on home shell === */
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page),
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page) #scene,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page) #app3d,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page) main,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page) .content-with-navbar,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page) .welcome-modern-page,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page) .welcome-modern-page.nedate-public-page,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page) .welcome-modern-hero,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page) .welcome-modern-strip,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark) .welcome-modern-page {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}
html body.nedate-ui-standard.nedate-public-standard:has(.welcome-modern-page) .welcome-modern-page::before,
html body.nedate-ui-standard.nedate-public-standard:has(.welcome-modern-page) .welcome-modern-page::after,
html body.nedate-ui-standard.nedate-public-standard:has(.welcome-modern-page) .welcome-modern-hero::before,
html body.nedate-ui-standard.nedate-public-standard:has(.welcome-modern-page) .welcome-modern-hero::after {
  content: none !important;
  display: none !important;
  background: none !important;
  background-image: none !important;
  opacity: 0 !important;
}

/* === sw-no-pink-wash-v3: shell behind page (negative margins expose #app3d) === */
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page) {
  --nd-brand-public-bg: #ffffff !important;
  --nd-app-shell-bg: #ffffff !important;
  --nd-public-bg: #ffffff !important;
  --nd-page-bg: #ffffff !important;
  background: #ffffff !important;
  background-image: none !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page) :is(#scene, #app3d, main, .content-with-navbar, .welcome-modern-page, .welcome-modern-hero, .welcome-modern-strip, .welcome-modern-body-section) {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}

html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page) {
  --nd-public-bg: #ffffff !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) body.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.welcome-modern-page) :is(#scene, #app3d, main) {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}

/* === sw-no-pink-wash-v4: beat nedate-unified 8x[class] shell glow === */
html:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class]:not(.dark-mode):not(.dark):not(.theme-dark) :is(
  .welcome-modern-page, .shipping-page-wrapper, .tracking-page-shell,
  .pricing-modern-page, .faq-modern-page, .faq-redesign-page,
  .contact-modern-page, .contact-refresh-page
) {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}

/* === sw-no-pink-wash-shipping: flat white shipping create page ===
   Il guardiano del tema mancava, mentre il blocco gemello qui sopra ce l'ha:
   questa regola dipingeva di bianco il fondo di /spedizioni **anche in tema
   scuro**, e le card scure restavano appoggiate su una pagina bianca. Si
   vedeva solo dove non c'erano card sopra. */
html body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.shipping-page-wrapper),
html body.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.shipping-page-wrapper) {
  --nd-brand-hero-bg: #ffffff !important;
  --nd-public-shell-hero-bg: #ffffff !important;
  --nd-brand-public-bg: #ffffff !important;
  --nd-app-shell-bg: #ffffff !important;
  --nd-public-bg: #ffffff !important;
  --nd-page-bg: #ffffff !important;
  background: #ffffff !important;
  background-image: none !important;
}
html body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.shipping-page-wrapper) :is(#scene, #app3d, main, .content-with-navbar, .shipping-page-wrapper),
html body.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark):has(.shipping-page-wrapper) :is(#scene, #app3d, main, .content-with-navbar, .shipping-page-wrapper) {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}
html body.nedate-ui-standard.nedate-public-standard .shipping-page-wrapper .shipping-hero-panel,
html body.nedate-public-standard .shipping-page-wrapper .shipping-hero-panel {
  background: #ffffff !important;
  background-image: none !important;
}
html body.nedate-ui-standard.nedate-public-standard .shipping-page-wrapper .shipping-hero-panel::before,
html body.nedate-ui-standard.nedate-public-standard .shipping-page-wrapper .shipping-hero-panel::after,
html body.nedate-public-standard .shipping-page-wrapper .shipping-hero-panel::before,
html body.nedate-public-standard .shipping-page-wrapper .shipping-hero-panel::after {
  content: none !important;
  display: none !important;
  background: none !important;
  opacity: 0 !important;
}

/* === sw-no-pink-wash-shipping-v2: beat nedate-unified 8x[class] body #fbfcff === */
html:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class]:not(.dark-mode):not(.dark):not(.theme-dark):has(.shipping-page-wrapper),
html:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class]:not(.dark-mode):not(.dark):not(.theme-dark):has(.shipping-page-wrapper) :is(#scene, #app3d, .content-with-navbar, main) {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}

/* === sw-public-shell-tokens ===
   Shared flat-white public shell (light mode only). Loads last via
   data-nedate-restyling-fixes-cascade-last. Gradual consolidation: one token
   block + one selector list for all public marketing/auth shells. Dark mode
   deliberately untouched (every rule excludes .dark-mode / .dark / .theme-dark
   and does not target html[data-theme=dark]).
   ------------------------------------------------------------------------- */

/* Tokens on every light-mode public / marketing / auth body */
html body.nedate-ui-standard.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark),
html body.nedate-ui-standard.nedate-marketing-standard:not(.dark-mode):not(.dark):not(.theme-dark),
html body.nedate-ui-standard.nedate-auth-standard:not(.dark-mode):not(.dark):not(.theme-dark),
html body.nedate-public-standard:not(.dark-mode):not(.dark):not(.theme-dark),
html body.nedate-marketing-standard:not(.dark-mode):not(.dark):not(.theme-dark),
html body.nedate-auth-standard:not(.dark-mode):not(.dark):not(.theme-dark) {
  --nd-brand-hero-bg: #ffffff;
  --nd-public-shell-hero-bg: #ffffff;
  --nd-brand-public-bg: #ffffff;
  --nd-app-shell-bg: #ffffff;
  --nd-public-bg: #ffffff;
  --nd-page-bg: #ffffff;
  --wb-paper: #ffffff;
}

/* High-specificity token + flat shell on ALL public page families
   (welcome / shipping / tracking / pricing / faq / contact / login / register / forgot).
   Matches nedate-unified 8x[class] so this wins in the final cascade. */
html:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class]:not(.dark-mode):not(.dark):not(.theme-dark):has(
  .welcome-modern-page,
  .shipping-page-wrapper,
  .tracking-page-shell,
  .tracking-login-page,
  .pricing-modern-page,
  .pricing-login-page,
  .faq-modern-page,
  .faq-redesign-page,
  .faq-login-page,
  .contact-modern-page,
  .contact-refresh-page,
  .login-page,
  .login-refresh-page,
  .forgot-refresh-page,
  .register-page
) {
  --nd-brand-hero-bg: #ffffff !important;
  --nd-public-shell-hero-bg: #ffffff !important;
  --nd-brand-public-bg: #ffffff !important;
  --nd-app-shell-bg: #ffffff !important;
  --nd-public-bg: #ffffff !important;
  --nd-page-bg: #ffffff !important;
  --wb-paper: #ffffff !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}

html:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class]:not(.dark-mode):not(.dark):not(.theme-dark):has(
  .welcome-modern-page,
  .shipping-page-wrapper,
  .tracking-page-shell,
  .tracking-login-page,
  .pricing-modern-page,
  .pricing-login-page,
  .faq-modern-page,
  .faq-redesign-page,
  .faq-login-page,
  .contact-modern-page,
  .contact-refresh-page,
  .login-page,
  .login-refresh-page,
  .forgot-refresh-page,
  .register-page
) :is(#scene, #app3d, .content-with-navbar, main) {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}

/* ONE selector list: neutralize pink/red/purple radial washes on all public shells + heroes */
html:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class]:not(.dark-mode):not(.dark):not(.theme-dark) :is(
  .welcome-modern-page,
  .welcome-modern-hero,
  .welcome-modern-strip,
  .shipping-page-wrapper,
  .shipping-hero-panel,
  .tracking-page-shell,
  .tracking-login-page,
  .tracking-login-hero,
  .pricing-modern-page,
  .pricing-login-page,
  .pricing-modern-hero,
  .faq-modern-page,
  .faq-redesign-page,
  .faq-login-page,
  .faq-modern-hero,
  .faq-redesign-hero,
  .contact-modern-page,
  .contact-refresh-page,
  .contact-modern-hero,
  .login-page,
  .login-refresh-page,
  .login-page__brand-panel,
  .login-refresh-hero,
  .forgot-refresh-page,
  .register-page
) {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}

html:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class]:not(.dark-mode):not(.dark):not(.theme-dark) :is(
  .welcome-modern-hero,
  .shipping-hero-panel,
  .tracking-login-hero,
  .pricing-modern-hero,
  .faq-modern-hero,
  .faq-redesign-hero,
  .contact-modern-hero,
  .login-page__brand-panel,
  .login-refresh-hero
)::before,
html:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class]:not(.dark-mode):not(.dark):not(.theme-dark) :is(
  .welcome-modern-hero,
  .shipping-hero-panel,
  .tracking-login-hero,
  .pricing-modern-hero,
  .faq-modern-hero,
  .faq-redesign-hero,
  .contact-modern-hero,
  .login-page__brand-panel,
  .login-refresh-hero
)::after,
html:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class]:not(.dark-mode):not(.dark):not(.theme-dark) :is(
  .welcome-modern-page,
  .shipping-page-wrapper,
  .tracking-page-shell,
  .pricing-modern-page,
  .pricing-login-page,
  .faq-modern-page,
  .faq-redesign-page,
  .faq-login-page,
  .contact-modern-page,
  .login-page,
  .forgot-refresh-page,
  .register-page
)::before,
html:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class]:not(.dark-mode):not(.dark):not(.theme-dark) :is(
  .welcome-modern-page,
  .shipping-page-wrapper,
  .tracking-page-shell,
  .pricing-modern-page,
  .pricing-login-page,
  .faq-modern-page,
  .faq-redesign-page,
  .faq-login-page,
  .contact-modern-page,
  .login-page,
  .forgot-refresh-page,
  .register-page
)::after {
  content: none !important;
  display: none !important;
  background: none !important;
  background-image: none !important;
  opacity: 0 !important;
}

/* Auth ambient/gradient layers (same pattern as tracking-login-gradient kill) */
html:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class]:not(.dark-mode):not(.dark):not(.theme-dark) :is(
  .login-page__ambient,
  .login-page__gradient,
  .login-page__grid,
  .tracking-login-gradient,
  .tracking-login-ambient,
  .tracking-login-grid-bg
) {
  display: none !important;
  background: none !important;
  background-image: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* === sw-public-shell-tokens-dark: flat navy shell, no pink/purple wash ===
   Completes light-mode sw-public-shell-tokens for dark theme. */
:is(html[data-theme="dark"], html[data-bs-theme="dark"]) body.nedate-ui-standard,
:is(html[data-theme="dark"], html[data-bs-theme="dark"]) body.nedate-public-standard,
:is(html[data-theme="dark"], html[data-bs-theme="dark"]) body.nedate-marketing-standard,
:is(html[data-theme="dark"], html[data-bs-theme="dark"]) body.nedate-auth-standard,
body.dark-mode.nedate-ui-standard,
body.dark.nedate-ui-standard,
body.theme-dark.nedate-ui-standard,
body.dark-mode.nedate-public-standard,
body.dark.nedate-public-standard,
body.theme-dark.nedate-public-standard {
  --nd-brand-hero-bg: #111827 !important;
  --nd-public-shell-hero-bg: #111827 !important;
  --nd-brand-public-bg: #0f172a !important;
  --nd-app-shell-bg: #0f172a !important;
  --nd-public-bg: #0f172a !important;
  --nd-page-bg: #0f172a !important;
  --nd-public-shell-bg: #0f172a !important;
  --nd-dark-hero-bg: #111827 !important;
  --nd-dark-public-bg: #0f172a !important;
  --nd-dark-app-shell-bg: #0f172a !important;
  --wb-paper: #0b1220 !important;
  background: #0f172a !important;
  background-color: #0f172a !important;
  background-image: none !important;
}

:is(html[data-theme="dark"], html[data-bs-theme="dark"]) body.nedate-ui-standard :is(#scene, #app3d, .content-with-navbar, main),
body.dark-mode.nedate-ui-standard :is(#scene, #app3d, .content-with-navbar, main),
body.dark.nedate-ui-standard :is(#scene, #app3d, .content-with-navbar, main),
body.theme-dark.nedate-ui-standard :is(#scene, #app3d, .content-with-navbar, main) {
  background: #0f172a !important;
  background-color: #0f172a !important;
  background-image: none !important;
}

html[data-theme="dark"]:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .welcome-modern-page,
  .welcome-modern-hero,
  .welcome-modern-strip,
  .shipping-page-wrapper,
  .shipping-hero-panel,
  .tracking-page-shell,
  .tracking-login-page,
  .tracking-login-hero,
  .pricing-modern-page,
  .pricing-login-page,
  .pricing-modern-hero,
  .faq-modern-page,
  .faq-redesign-page,
  .faq-login-page,
  .faq-modern-hero,
  .faq-redesign-hero,
  .contact-modern-page,
  .contact-refresh-page,
  .contact-modern-hero,
  .login-page,
  .login-refresh-page,
  .login-page__brand-panel,
  .login-refresh-hero,
  .forgot-refresh-page,
  .register-page
),
html[data-bs-theme="dark"]:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .welcome-modern-page, .welcome-modern-hero, .welcome-modern-strip,
  .shipping-page-wrapper, .shipping-hero-panel,
  .tracking-page-shell, .tracking-login-page, .tracking-login-hero,
  .pricing-modern-page, .pricing-login-page, .pricing-modern-hero,
  .faq-modern-page, .faq-redesign-page, .faq-login-page, .faq-modern-hero, .faq-redesign-hero,
  .contact-modern-page, .contact-refresh-page, .contact-modern-hero,
  .login-page, .login-refresh-page, .login-page__brand-panel, .login-refresh-hero,
  .forgot-refresh-page, .register-page
),
html:not(#_):not(#__) body.dark-mode.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .welcome-modern-page, .welcome-modern-hero, .welcome-modern-strip,
  .shipping-page-wrapper, .shipping-hero-panel,
  .tracking-page-shell, .tracking-login-page, .tracking-login-hero,
  .pricing-modern-page, .pricing-login-page, .pricing-modern-hero,
  .faq-modern-page, .faq-redesign-page, .faq-login-page, .faq-modern-hero, .faq-redesign-hero,
  .contact-modern-page, .contact-refresh-page, .contact-modern-hero,
  .login-page, .login-refresh-page, .login-page__brand-panel, .login-refresh-hero,
  .forgot-refresh-page, .register-page
),
html:not(#_):not(#__) body.dark.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .welcome-modern-page, .welcome-modern-hero, .welcome-modern-strip,
  .shipping-page-wrapper, .shipping-hero-panel,
  .tracking-page-shell, .tracking-login-page, .tracking-login-hero,
  .pricing-modern-page, .pricing-login-page, .pricing-modern-hero,
  .faq-modern-page, .faq-redesign-page, .faq-login-page, .faq-modern-hero, .faq-redesign-hero,
  .contact-modern-page, .contact-refresh-page, .contact-modern-hero,
  .login-page, .login-refresh-page, .login-page__brand-panel, .login-refresh-hero,
  .forgot-refresh-page, .register-page
),
html:not(#_):not(#__) body.theme-dark.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .welcome-modern-page, .welcome-modern-hero, .welcome-modern-strip,
  .shipping-page-wrapper, .shipping-hero-panel,
  .tracking-page-shell, .tracking-login-page, .tracking-login-hero,
  .pricing-modern-page, .pricing-login-page, .pricing-modern-hero,
  .faq-modern-page, .faq-redesign-page, .faq-login-page, .faq-modern-hero, .faq-redesign-hero,
  .contact-modern-page, .contact-refresh-page, .contact-modern-hero,
  .login-page, .login-refresh-page, .login-page__brand-panel, .login-refresh-hero,
  .forgot-refresh-page, .register-page
) {
  background: #0f172a !important;
  background-color: #0f172a !important;
  background-image: none !important;
}

/* Heroes/cards in dark stay flat surface, not pink-tinted */
html[data-theme="dark"]:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .shipping-hero-panel, .welcome-modern-hero, .tracking-login-hero,
  .pricing-modern-hero, .faq-modern-hero, .faq-redesign-hero, .contact-modern-hero,
  .login-page__brand-panel, .login-refresh-hero
),
html[data-bs-theme="dark"]:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .shipping-hero-panel, .welcome-modern-hero, .tracking-login-hero,
  .pricing-modern-hero, .faq-modern-hero, .faq-redesign-hero, .contact-modern-hero,
  .login-page__brand-panel, .login-refresh-hero
),
html:not(#_):not(#__) body.dark-mode.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .shipping-hero-panel, .welcome-modern-hero, .tracking-login-hero,
  .pricing-modern-hero, .faq-modern-hero, .faq-redesign-hero, .contact-modern-hero,
  .login-page__brand-panel, .login-refresh-hero
) {
  background: #111827 !important;
  background-color: #111827 !important;
  background-image: none !important;
}

html[data-theme="dark"]:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .welcome-modern-hero, .shipping-hero-panel, .tracking-login-hero,
  .pricing-modern-hero, .faq-modern-hero, .faq-redesign-hero, .contact-modern-hero,
  .login-page__brand-panel, .login-refresh-hero,
  .welcome-modern-page, .shipping-page-wrapper, .tracking-page-shell,
  .pricing-modern-page, .faq-modern-page, .faq-redesign-page, .contact-modern-page,
  .login-page, .forgot-refresh-page, .register-page
)::before,
html[data-theme="dark"]:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .welcome-modern-hero, .shipping-hero-panel, .tracking-login-hero,
  .pricing-modern-hero, .faq-modern-hero, .faq-redesign-hero, .contact-modern-hero,
  .login-page__brand-panel, .login-refresh-hero,
  .welcome-modern-page, .shipping-page-wrapper, .tracking-page-shell,
  .pricing-modern-page, .faq-modern-page, .faq-redesign-page, .contact-modern-page,
  .login-page, .forgot-refresh-page, .register-page
)::after,
html[data-bs-theme="dark"]:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .welcome-modern-hero, .shipping-hero-panel, .tracking-login-hero,
  .pricing-modern-hero, .faq-modern-hero, .faq-redesign-hero, .contact-modern-hero,
  .login-page__brand-panel, .login-refresh-hero,
  .welcome-modern-page, .shipping-page-wrapper, .tracking-page-shell,
  .pricing-modern-page, .faq-modern-page, .faq-redesign-page, .contact-modern-page,
  .login-page, .forgot-refresh-page, .register-page
)::before,
html[data-bs-theme="dark"]:not(#_):not(#__) body.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .welcome-modern-hero, .shipping-hero-panel, .tracking-login-hero,
  .pricing-modern-hero, .faq-modern-hero, .faq-redesign-hero, .contact-modern-hero,
  .login-page__brand-panel, .login-refresh-hero,
  .welcome-modern-page, .shipping-page-wrapper, .tracking-page-shell,
  .pricing-modern-page, .faq-modern-page, .faq-redesign-page, .contact-modern-page,
  .login-page, .forgot-refresh-page, .register-page
)::after,
html:not(#_):not(#__) body.dark-mode.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .welcome-modern-hero, .shipping-hero-panel, .tracking-login-hero,
  .pricing-modern-hero, .faq-modern-hero, .faq-redesign-hero, .contact-modern-hero,
  .login-page__brand-panel, .login-refresh-hero,
  .welcome-modern-page, .shipping-page-wrapper, .tracking-page-shell,
  .pricing-modern-page, .faq-modern-page, .faq-redesign-page, .contact-modern-page,
  .login-page, .forgot-refresh-page, .register-page
)::before,
html:not(#_):not(#__) body.dark-mode.nedate-ui-standard[class][class][class][class][class][class][class][class] :is(
  .welcome-modern-hero, .shipping-hero-panel, .tracking-login-hero,
  .pricing-modern-hero, .faq-modern-hero, .faq-redesign-hero, .contact-modern-hero,
  .login-page__brand-panel, .login-refresh-hero,
  .welcome-modern-page, .shipping-page-wrapper, .tracking-page-shell,
  .pricing-modern-page, .faq-modern-page, .faq-redesign-page, .contact-modern-page,
  .login-page, .forgot-refresh-page, .register-page
)::after {
  content: none !important;
  display: none !important;
  background: none !important;
  background-image: none !important;
  opacity: 0 !important;
}

:is(html[data-theme="dark"], html[data-bs-theme="dark"]) body.nedate-ui-standard :is(
  .login-page__ambient, .login-page__gradient, .login-page__grid,
  .tracking-login-gradient, .tracking-login-ambient, .tracking-login-grid-bg
),
body.dark-mode.nedate-ui-standard :is(
  .login-page__ambient, .login-page__gradient, .login-page__grid,
  .tracking-login-gradient, .tracking-login-ambient, .tracking-login-grid-bg
) {
  display: none !important;
  background: none !important;
  background-image: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* === sw-flat-dark-shell-v2: kill remaining shipping/home dark washes === */
html[data-theme="dark"] body.nedate-ui-standard:has(.shipping-page-wrapper) .shipping-page-wrapper,
html[data-bs-theme="dark"] body.nedate-ui-standard:has(.shipping-page-wrapper) .shipping-page-wrapper,
body.dark-mode.nedate-ui-standard:has(.shipping-page-wrapper) .shipping-page-wrapper,
html[data-theme="dark"] body.nedate-ui-standard.nedate-user-ui #app3d > main > :is(.nedate-app-page, .nedate-main-container, .shipping-page-wrapper, .shipping-login-page),
html[data-bs-theme="dark"] body.nedate-ui-standard.nedate-user-ui #app3d > main > :is(.nedate-app-page, .nedate-main-container, .shipping-page-wrapper, .shipping-login-page),
body.dark-mode.nedate-ui-standard.nedate-user-ui #app3d > main > :is(.nedate-app-page, .nedate-main-container, .shipping-page-wrapper, .shipping-login-page),
html:not(#_):not(#__) body.nedate-ui-standard.nedate-user-ui[class][class][class][class][class][class][class][class]:is(.dark-mode, .dark, .theme-dark) #app3d > main > :is(.nedate-app-page, .nedate-main-container, .shipping-page-wrapper) {
  background: #0f172a !important;
  background-color: #0f172a !important;
  background-image: none !important;
}

/* Home dark: body must not stay white when theme is dark */
html[data-theme="dark"] body.nedate-ui-standard:has(.welcome-modern-page),
html[data-bs-theme="dark"] body.nedate-ui-standard:has(.welcome-modern-page),
body.dark-mode.nedate-ui-standard:has(.welcome-modern-page),
html[data-theme="dark"] body.nedate-ui-standard:has(.welcome-modern-page) :is(#scene, #app3d, main, .content-with-navbar, .welcome-modern-page),
html[data-bs-theme="dark"] body.nedate-ui-standard:has(.welcome-modern-page) :is(#scene, #app3d, main, .content-with-navbar, .welcome-modern-page),
body.dark-mode.nedate-ui-standard:has(.welcome-modern-page) :is(#scene, #app3d, main, .content-with-navbar, .welcome-modern-page) {
  background: #0f172a !important;
  background-color: #0f172a !important;
  background-image: none !important;
}
html[data-theme="dark"] body.nedate-ui-standard:has(.welcome-modern-page) :is(.welcome-modern-hero, .welcome-modern-strip),
html[data-bs-theme="dark"] body.nedate-ui-standard:has(.welcome-modern-page) :is(.welcome-modern-hero, .welcome-modern-strip),
body.dark-mode.nedate-ui-standard:has(.welcome-modern-page) :is(.welcome-modern-hero, .welcome-modern-strip) {
  background: #111827 !important;
  background-color: #111827 !important;
  background-image: none !important;
}

/* === sw-flat-dark-home: welcome page shells stay navy in dark === */
html[data-theme="dark"] body.nedate-ui-standard:has(.welcome-modern-page) :is(
  .welcome-modern-page, .welcome-modern-page.nedate-public-page, .welcome-modern-hero,
  /* `[id*="welcome" i]` non sta piu' qui. Prendeva qualunque elemento con
     «welcome» nell'id, e sulla home erano due: `#welcomePage` — che e' gia'
     nominato qui accanto, quindi non aggiungeva niente — e `#welcome-title`,
     cioe' il titolo grande dell'apertura. Al buio il titolo si ritrovava
     addosso un rettangolo pieno #0f172a di 570x165 (misurato); in chiaro era
     trasparente. */
  .welcome-modern-strip, .welcome-modern-body-section, #welcomePage
),
html[data-bs-theme="dark"] body.nedate-ui-standard:has(.welcome-modern-page) :is(
  .welcome-modern-page, .welcome-modern-page.nedate-public-page, .welcome-modern-hero,
  /* `[id*="welcome" i]` non sta piu' qui. Prendeva qualunque elemento con
     «welcome» nell'id, e sulla home erano due: `#welcomePage` — che e' gia'
     nominato qui accanto, quindi non aggiungeva niente — e `#welcome-title`,
     cioe' il titolo grande dell'apertura. Al buio il titolo si ritrovava
     addosso un rettangolo pieno #0f172a di 570x165 (misurato); in chiaro era
     trasparente. */
  .welcome-modern-strip, .welcome-modern-body-section, #welcomePage
),
body.dark-mode.nedate-ui-standard:has(.welcome-modern-page) :is(
  .welcome-modern-page, .welcome-modern-page.nedate-public-page, .welcome-modern-hero,
  /* `[id*="welcome" i]` non sta piu' qui. Prendeva qualunque elemento con
     «welcome» nell'id, e sulla home erano due: `#welcomePage` — che e' gia'
     nominato qui accanto, quindi non aggiungeva niente — e `#welcome-title`,
     cioe' il titolo grande dell'apertura. Al buio il titolo si ritrovava
     addosso un rettangolo pieno #0f172a di 570x165 (misurato); in chiaro era
     trasparente. */
  .welcome-modern-strip, .welcome-modern-body-section, #welcomePage
) {
  background: #0f172a !important;
  background-color: #0f172a !important;
  background-image: none !important;
}
