/* CentralAuth login shell — runtime overlay (layout via skin CSS variables) */

html.ca-auth-active,
html.ca-auth-active body {
  min-height: 100%;
}

/* Gerarchia dei controlli: il CTA precede sempre le azioni secondarie. */
html.ca-auth-active .ca-login-card .login-form,
html.ca-auth-active .ca-login-card form { display: flex; flex-direction: column; }
html.ca-auth-active .ca-login-card .login-button-box { order: 80; margin-bottom: 0 !important; }
html.ca-auth-active .ca-login-card .login-secondary-actions { order: 90; width: 100%; }
html.ca-auth-active .ca-login-card .login-button-box,
html.ca-auth-active .ca-login-card .login-secondary-actions {
  transform: translateY(-30px);
}
html.ca-auth-active .ca-login-card .login-forget-password {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center !important;
  gap: 12px;
  width: 100% !important;
  margin: 8px 0 0 !important;
  font-size: 12px;
  line-height: 1.25;
}
html.ca-auth-active .ca-login-card .login-forget-password > :first-child { justify-self: start; text-align: left; }
html.ca-auth-active .ca-login-card .login-forget-password > :last-child { justify-self: end; align-self: center; text-align: right; }
html.ca-auth-active .ca-login-card .login-forget-password .login-auto-signin,
html.ca-auth-active .ca-login-card .login-forget-password a {
  font-size: inherit !important;
  line-height: 1.25 !important;
}
html.ca-auth-active .ca-login-card .login-forget-password .login-auto-signin {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}
html.ca-auth-active .ca-login-card .login-forget-password .ant-checkbox { top: 0; }

html.ca-auth-active body {
  margin: 0;
  font-family: var(--ca-font-stack);
  color: var(--ca-color-ink, var(--ca-ink));
  background: var(--ca-page-bg, #f5f7fb);
}

/* niente zoom doppio-tap / inflate testo: la pagina resta a scala 1 */
html.ca-auth-active,
html.ca-auth-active body {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html.ca-auth-active body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 22vh;
  background: var(--ca-page-wave, transparent);
  display: var(--ca-page-wave-display, none);
  clip-path: polygon(0 45%, 15% 20%, 29% 55%, 44% 32%, 60% 55%, 75% 28%, 100% 42%, 100% 100%, 0 100%);
  pointer-events: none;
  z-index: 0;
}

html.ca-auth-active .login-footer,
html.ca-auth-active footer,
html.ca-auth-active a[href*="casdoor.io"],
html.ca-auth-active a[href*="casbin.com"],
html.ca-auth-active .side-logo-link,
html.ca-auth-active .github-corner,
html.ca-auth-active .ant-layout-footer,
html.ca-auth-active .nf-login-header,
html.ca-auth-active .side-image {
  display: none !important;
}

html.ca-auth-active .loginBackground,
html.ca-auth-active .loginBackgroundDark {
  min-height: 100vh;
  flex-direction: column;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  background-image: none !important;
}

html.ca-auth-active .login-content {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: auto;
  display: grid;
  place-items: center;
  padding: var(--ca-shell-padding, 12px);
}

html.ca-auth-active .ca-auth-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: var(--ca-shell-max-width, min(720px, 66vw));
  gap: 8px;
}

html.ca-auth-active .login-content.ca-auth-layout {
  position: relative;
  display: grid;
  width: 100%;
  max-width: var(--ca-shell-max-width, min(720px, 66vw));
  min-height: var(--ca-shell-min-height, auto);
  max-height: none;
  grid-template-columns: minmax(0, 1fr) var(--ca-right-col-width, 340px);
  align-items: stretch;
  justify-items: stretch;
  overflow: hidden;
  border: 1px solid var(--ca-shell-border, rgba(212, 221, 245, .85));
  border-radius: var(--ca-shell-radius, 20px);
  background: var(--ca-shell-surface, rgba(255, 255, 255, .82));
  box-shadow: 0 20px 52px rgba(15, 23, 42, .12);
  backdrop-filter: blur(16px);
  padding: 0;
}

/* Pagina reimposta password (forget/reset): stessa card centrata dello shell
   login (bordo, sfondo, ombra), ma a colonna singola perche' non ha pannello
   brand. Il footer sintetico (.ca-shell-footer) viene inserito come fratello
   subito dopo questo nodo, quindi va vincolato alla stessa larghezza massima
   per restare visivamente allineato sotto la card invece che a piena pagina. */
html.ca-auth-active .forget-content.ca-auth-forget {
  position: relative;
  width: 100%;
  max-width: var(--ca-shell-max-width, min(720px, 66vw));
  margin: 0 auto;
  padding: 28px clamp(20px, 4vw, 48px) 32px;
  border: 1px solid var(--ca-shell-border, rgba(212, 221, 245, .85));
  border-radius: var(--ca-shell-radius, 20px);
  background: var(--ca-shell-surface, rgba(255, 255, 255, .82));
  box-shadow: 0 20px 52px rgba(15, 23, 42, .12);
  backdrop-filter: blur(16px);
}

/* Il recupero credenziali mantiene l'identita' del prodotto sopra il
   wordmark NetForges gia' presente nel contenuto Casdoor. */
html.ca-auth-active .forget-content.ca-auth-forget::before {
  content: "";
  display: block;
  width: min(250px, 70vw);
  height: 82px;
  margin: 16px auto 12px;
  background: center / contain no-repeat url("/assets/centralauth/png/cauth-admin-logo.png");
}

html.ca-auth-active .forget-content.ca-auth-forget + .ca-shell-footer {
  width: 100%;
  max-width: var(--ca-shell-max-width, min(720px, 66vw));
  margin: 22px auto 0;
}

@media (max-width: 980px) {
  html.ca-auth-active .forget-content.ca-auth-forget,
  html.ca-auth-active .forget-content.ca-auth-forget + .ca-shell-footer {
    max-width: min(94vw, var(--ca-shell-max-width, 760px));
  }
}

@media (max-width: 760px) {
  html.ca-auth-active .forget-content.ca-auth-forget {
    max-width: 100%;
    padding: 20px 16px 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  html.ca-auth-active .forget-content.ca-auth-forget + .ca-shell-footer {
    max-width: 100%;
    justify-content: center;
    padding: 12px 2px 16px;
  }

  html.ca-auth-active .forget-content.ca-auth-forget + .ca-shell-footer .ca-shell-footer__spacer {
    display: none;
  }
  html.ca-auth-active .ca-login-card .login-button-box,
  html.ca-auth-active .ca-login-card .login-secondary-actions {
    transform: translateY(-18px);
  }
}

.ca-brand-side {
  position: relative;
  min-width: 0;
  padding: var(--ca-brand-side-padding, 22px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  min-height: 100%;
  overflow: hidden;
  background: var(--ca-left-column-bg, #fff);
}

.ca-brand-side--centered {
  align-items: center;
  text-align: center;
}

.ca-brand-header,
.ca-brand-side--centered .ca-brand-footer-copy,
.ca-brand-side--app-access,
.ca-brand-side--org-admin {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ca-brand-spacer {
  flex: 1 1 auto;
  min-height: 18px;
  width: 100%;
}

.ca-brand-footer-copy {
  width: 100%;
  margin-top: auto;
}

.ca-brand-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ca-left-column-overlay, rgba(255,255,255,.36));
}

.ca-brand-side > * { position: relative; }

.ca-brand-mark {
  width: var(--ca-brand-mark-width, 64px);
  height: auto;
  margin: 0 auto 8px;
  filter: drop-shadow(0 8px 18px rgba(20, 38, 90, .10));
}

.ca-auth-surface-logo {
  width: min(258px, 94%);
  height: 126px;
  object-fit: contain;
  margin: 4px auto 12px;
  filter: drop-shadow(0 10px 22px rgba(15, 23, 42, .12));
}
.ca-brand-side--futurapiu .ca-auth-surface-logo {
  width: min(300px, 98%);
  height: 136px;
}
.ca-brand-illustration {
  display: block;
  width: min(292px, 94%);
  max-height: 122px;
  margin: 14px auto 10px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(15, 23, 42, .08));
}
.ca-brand-side--futurapiu .ca-brand-illustration { width: min(310px, 98%); max-height: 130px; }
.ca-brand-maintainer-wordmark {
  display: block;
  width: min(168px, 72%);
  max-height: 42px;
  margin: 14px auto 10px;
  object-fit: contain;
}

.ca-brand-eyebrow {
  margin: 0 0 6px;
  color: var(--ca-color-nf-blue, var(--ca-nfBlue));
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ca-brand-title {
  margin: 0;
  color: var(--ca-color-ink, var(--ca-ink));
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.ca-brand-title--compact {
  font-size: clamp(22px, 2.8vw, 30px);
  margin-bottom: 8px;
}

.ca-brand-title span {
  background: var(--ca-gradient-title, linear-gradient(90deg, var(--ca-nfBlue), var(--ca-cyan)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ca-brand-full-name {
  margin: 8px 0 12px;
  color: var(--ca-color-muted-light, #747b94);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
}

.ca-brand-slogan {
  margin: 0 0 8px;
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 800;
  line-height: 1.25;
}

.ca-brand-slogan--raised {
  color: var(--ca-color-ink, var(--ca-ink));
  text-shadow:
    0 1px 0 rgba(255, 255, 255, .92),
    0 -1px 0 rgba(15, 23, 42, .08),
    0 8px 18px rgba(15, 23, 42, .06);
}

.ca-brand-slogan::first-letter {
  color: var(--ca-color-nf-orange, var(--ca-nfOrange));
}

.ca-brand-description {
  max-width: 360px;
  margin: 0 auto;
  color: var(--ca-color-muted, #687088);
  font-size: 12px;
  line-height: 1.45;
}

.ca-app-logo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ca-app-logo {
  width: min(120px, 100%);
  max-height: 46px;
  object-fit: contain;
}

.ca-client-logo--access {
  width: min(120px, 100%);
  max-height: 38px;
  object-fit: contain;
  opacity: .92;
}

.ca-app-access-hint {
  margin: 0 0 10px;
  color: var(--ca-color-nf-blue, var(--ca-nfBlue));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ca-form-card-head--app-access img.ca-form-app-logo {
  width: min(150px, 100%);
  max-height: 52px;
  object-fit: contain;
  margin: 0 auto 10px;
  display: block;
}

.ca-form-card-head--app-access img.ca-form-client-logo {
  width: min(120px, 100%);
  max-height: 34px;
  object-fit: contain;
  margin: 0 auto 14px;
  display: block;
  opacity: .88;
}

.ca-form-card-head--app-access h2 {
  font-size: 24px;
}

.ca-client-logo {
  width: min(220px, 100%);
  max-height: 72px;
  object-fit: contain;
  margin-bottom: 18px;
}

.ca-client-slogan {
  margin: 0 0 12px;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--ca-color-ink, var(--ca-ink));
}

.ca-client-description {
  margin: 0;
  max-width: 380px;
  color: var(--ca-color-muted, #687088);
  font-size: 15px;
  line-height: 1.55;
}

.ca-brand-side .ca-maintainer {
  display: none !important;
}

.ca-form-card-head--text-only img {
  display: none !important;
}

.ca-shell-footer {
  width: 100%;
  max-width: var(--ca-shell-max-width, min(720px, 66vw));
  margin: 22px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.ca-shell-footer__spacer {
  flex: 1 1 auto;
}

.ca-maintainer {
  position: relative;
  left: 0;
  bottom: auto;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  color: var(--ca-color-maintainer, #7b8298);
  font-size: 10px;
  font-weight: 700;
}

.ca-maintainer img {
  width: 70px;
  height: auto;
  opacity: .9;
  position: relative;
  top: 1px;
}

.ca-lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.ca-lang__toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  box-sizing: border-box;
  height: 26px;
  padding: 0 9px;
  justify-content: center;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--ca-color-maintainer, #7b8298);
  background: var(--ca-form-card-bg, rgba(255, 255, 255, .9));
  border: 1px solid var(--ca-shell-border, rgba(212, 221, 245, .85));
  border-radius: 999px;
  transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.ca-lang__toggle:hover {
  color: var(--ca-color-ink, var(--ca-ink));
  border-color: var(--ca-color-nf-blue, var(--ca-nfBlue));
}

.ca-lang__icon {
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  color: var(--ca-color-nf-blue, var(--ca-nfBlue));
}

.ca-flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .12);
  display: block;
  object-fit: cover;
}

.ca-lang__flag {
  display: inline-flex;
}

.ca-lang__caret {
  font-size: 9px;
  opacity: .7;
  transition: transform .15s ease;
}

.ca-lang.is-open .ca-lang__caret {
  transform: rotate(180deg);
}

.ca-lang__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 160px;
  display: none;
  flex-direction: column;
  padding: 6px;
  background: var(--ca-form-card-bg, #fff);
  border: 1px solid var(--ca-shell-border, rgba(212, 221, 245, .9));
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
  z-index: 10005;
}

.ca-lang.is-open .ca-lang__menu {
  display: flex;
}

.ca-lang__item {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  color: var(--ca-color-ink, var(--ca-ink));
  background: transparent;
  border: 0;
  border-radius: 8px;
  transition: background .12s ease;
}

.ca-lang__item:hover {
  background: var(--ca-color-input-bg, #f1f5ff);
}

.ca-lang__item.is-active {
  background: var(--ca-color-input-bg, #eef3ff);
  color: var(--ca-color-nf-blue, var(--ca-nfBlue));
}

.ca-lang__name {
  flex: 1 1 auto;
}

html.ca-auth-active .login-panel,
html.ca-auth-active .login-panel-dark,
html.ca-auth-active .ca-form-side {
  grid-column: 2;
  align-self: stretch;
  display: grid !important;
  place-items: center;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  min-width: 0;
  min-height: 100%;
  padding: var(--ca-form-side-padding, 18px) !important;
  border: 0 !important;
  border-left: 1px solid var(--ca-shell-border, rgba(224, 231, 255, .84)) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: var(--ca-right-column-bg, rgba(255, 255, 255, .72)) !important;
  opacity: var(--ca-right-column-opacity, 1);
  overflow: visible;
}

.ca-login-card {
  width: 100%;
  max-width: min(100%, var(--ca-form-card-max-width, 380px));
  padding: var(--ca-form-card-padding, 18px);
  border: 1px solid var(--ca-form-card-border, rgba(222, 231, 255, .95));
  border-radius: var(--ca-form-card-radius, 18px);
  background: var(--ca-form-card-bg, rgba(255, 255, 255, .88));
  box-shadow: 0 18px 48px rgba(15, 23, 42, .10);
  overflow: visible;
}

html.ca-auth-active .login-panel .panel-logo,
html.ca-auth-active .login-panel-dark .panel-logo,
html.ca-auth-active .login-panel > img:first-child,
html.ca-auth-active .ca-login-card > img.panel-logo {
  display: none !important;
}

html.ca-auth-active .login-form {
  padding: 0 !important;
  text-align: left !important;
}

.ca-form-card-head {
  text-align: center;
  margin-bottom: 14px;
}

.ca-form-card-head--text-only {
  margin-bottom: 12px;
}

.ca-form-card-head img {
  width: min(160px, 100%);
  margin: 0 auto 10px;
  display: block;
}

.ca-form-card-head h2 {
  margin: 0 0 4px;
  font-size: 24px;
  letter-spacing: -.03em;
  background: var(--ca-gradient-title, linear-gradient(90deg, var(--ca-nfBlue), var(--ca-cyan)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ca-form-card-head p {
  margin: 0;
  color: var(--ca-color-muted, #70788f);
  font-size: 13px;
}

.ca-form-microcopy {
  margin: -2px 0 8px;
  text-align: center;
  color: color-mix(in srgb, var(--ca-color-muted, #7c849a) 72%, transparent);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: .01em;
}

html.ca-auth-active .ant-input,
html.ca-auth-active .ant-input-affix-wrapper,
html.ca-auth-active .ant-input-password {
  min-height: 44px !important;
  border-radius: 12px !important;
  border-color: var(--ca-color-border, #dfe7ff) !important;
  background: var(--ca-color-input-bg, #f8fbff) !important;
}

html.ca-auth-active .ant-btn-primary {
  min-height: 46px !important;
  border: 0 !important;
  border-radius: 12px !important;
  /* Difesa a due livelli: background-color e' una dichiarazione indipendente
     dal gradiente, con fallback letterali (non solo var() annidate), quindi
     il bottone resta SEMPRE leggibile anche se i design token non sono
     caricati (es. manca il link a tokens.css): senza fallback letterali un
     var() annidato non risolto rende l'intera dichiarazione "invalid at
     computed-value time" e il browser scarta il background, lasciando solo
     bordo/ombra e il testo bianco invisibile su sfondo trasparente. */
  color: #fff !important;
  background-color: var(--ca-color-nf-blue, var(--ca-nfBlue, #005ca8)) !important;
  background-image: var(--ca-gradient-button, linear-gradient(90deg, var(--ca-nfBlue, #005ca8), var(--ca-cyan, #1497ff))) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  box-shadow: 0 12px 28px rgba(0, 92, 168, .18) !important;
}

/* ------------------------------------------------------------
   Casdoor renderizza il form con larghezze fisse (es. 300px) e
   NON usa la classe ".login-form"; per questo gli override vanno
   ancorati alla nostra card e alle classi Ant. Forziamo il form
   e i controlli a riadattarsi alla larghezza della card, così la
   colonna destra resta contenuta e completa.
   ------------------------------------------------------------ */
html.ca-auth-active .ca-login-card form,
html.ca-auth-active .ca-login-card .ant-form,
html.ca-auth-active .ca-login-card .ant-row,
html.ca-auth-active .ca-login-card .ant-col,
html.ca-auth-active .ca-login-card .ant-form-item,
html.ca-auth-active .ca-login-card .ant-form-item-row,
html.ca-auth-active .ca-login-card .ant-form-item-control,
html.ca-auth-active .ca-login-card .ant-form-item-control-input,
html.ca-auth-active .ca-login-card .ant-form-item-control-input-content {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

html.ca-auth-active .ca-login-card .ant-form-item-control-input-content > input,
html.ca-auth-active .ca-login-card .ant-input,
html.ca-auth-active .ca-login-card .ant-input-affix-wrapper,
html.ca-auth-active .ca-login-card .ant-input-password,
html.ca-auth-active .ca-login-card .ant-input-number,
html.ca-auth-active .ca-login-card .ant-input-group,
html.ca-auth-active .ca-login-card .ant-input-group-wrapper,
html.ca-auth-active .ca-login-card .ant-select,
html.ca-auth-active .ca-login-card .ant-btn,
html.ca-auth-active .ca-login-card button[type="submit"] {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* l'input interno all'affix-wrapper non deve aggiungere larghezza */
html.ca-auth-active .ca-login-card .ant-input-affix-wrapper > .ant-input,
html.ca-auth-active .ca-login-card .ant-input-affix-wrapper > input {
  width: 100% !important;
  min-width: 0 !important;
}

/* Spaziatura interna coerente: testo e placeholder non devono aderire
   all'icona o al bordo del controllo. */
html.ca-auth-active .ca-login-card .ant-input-affix-wrapper {
  padding-left: 18px !important;
  padding-right: 15px !important;
}
html.ca-auth-active .ca-login-card .ant-input-prefix {
  margin-right: 12px !important;
}
html.ca-auth-active .ca-login-card .ant-input-affix-wrapper > .ant-input,
html.ca-auth-active .ca-login-card .ant-input-affix-wrapper > input {
  padding-left: 8px !important;
}
html.ca-auth-active .ca-login-card input.ant-input:not(.ant-input-affix-wrapper input) {
  padding-left: 18px !important;
  padding-right: 16px !important;
}

/* prefissi/suffissi (icone) non devono espandersi */
html.ca-auth-active .ca-login-card .ant-input-prefix,
html.ca-auth-active .ca-login-card .ant-input-suffix,
html.ca-auth-active .ca-login-card .anticon {
  width: auto !important;
  flex: 0 0 auto !important;
}

/* selettore lingua/tema originale di Casdoor (mappamondo): nascosto,
   lo sostituiamo con il nostro switch nel footer. */
html.ca-auth-active .ca-login-card .select-box {
  display: none !important;
}

html.ca-auth-active .ca-login-card .login-forget-password,
html.ca-auth-active .ca-login-card a {
  max-width: 100%;
}

/* impedisce qualsiasi overflow orizzontale del form */
html.ca-auth-active .ca-login-card {
  position: relative;
  overflow-x: clip;
}

html.ca-auth-active .ca-login-card .signin-methods { width: 100%; margin: 0 auto 10px; }
html.ca-auth-active .ca-login-card .signin-methods .ant-tabs-nav { margin: 0; }
html.ca-auth-active .ca-login-card .signin-methods .ant-tabs-nav::before,
html.ca-auth-active .ca-login-card .signin-methods .ant-tabs-ink-bar { display: none; }
html.ca-auth-active .ca-login-card .signin-methods .ant-tabs-nav-list { width: 100%; justify-content: center; gap: 6px; }
html.ca-auth-active .ca-login-card .signin-methods .ant-tabs-tab {
  display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 34px;
  margin: 0 !important; padding: 0 !important; color: #536477;
  background: rgba(243, 247, 251, .9); border: 1px solid #d7e1ea; border-radius: 5px;
  transition: color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
html.ca-auth-active .ca-login-card .signin-methods .ant-tabs-tab:hover,
html.ca-auth-active .ca-login-card .signin-methods .ant-tabs-tab-active {
  color: var(--ca-accent, #0877c9); background: #fff; border-color: var(--ca-accent, #0877c9);
  box-shadow: 0 4px 12px rgba(13, 92, 145, .12);
}
html.ca-auth-active .ca-login-card .signin-methods .ant-tabs-tab:focus-visible { outline: 3px solid rgba(8, 119, 201, .22); outline-offset: 2px; }
html.ca-auth-active .ca-login-card .signin-methods__choice { display: grid; place-items: center; width: 100%; height: 100%; font-size: 18px; line-height: 1; }

html.ca-auth-active .login-content.ca-auth-layout > .ca-login-card-utilities {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) var(--ca-right-col-width, 340px);
  grid-template-rows: 1fr;
  padding: 0;
  margin: 0 !important;
  max-width: none;
  pointer-events: none;
}
html.ca-auth-active .forget-content.ca-auth-forget > .ca-login-card-utilities {
  position: absolute;
  inset: 0;
  z-index: 20;
  width: 100%;
  max-width: none;
  margin: 0 !important;
  padding: 0;
  pointer-events: none;
}
html.ca-auth-active .forget-content.ca-auth-forget > .ca-login-card-utilities .ca-lang {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 10020;
  pointer-events: auto;
}
html.ca-auth-active .forget-content.ca-auth-forget > .ca-login-card-utilities .ca-maintainer {
  position: absolute;
  bottom: 5px;
  left: 8px;
  margin: 0;
  padding: 0;
  opacity: .34;
  transform: scale(.74);
  transform-origin: left bottom;
  pointer-events: none;
}
html.ca-auth-active .ca-login-card-utilities .ca-lang {
  position: absolute;
  top: 2px;
  left: auto;
  right: 4px;
  z-index: 10020;
  pointer-events: auto;
  transform: none;
}
html.ca-auth-active .ca-login-card-utilities .ca-lang__menu {
  top: calc(100% + 8px);
  bottom: auto;
  z-index: 10021;
}
html.ca-auth-active .ca-login-card-utilities .ca-maintainer {
  position: absolute; bottom: 5px; left: 8px;
  z-index: 10004; margin: 0; padding: 0; opacity: .34;
  transform: scale(.74); transform-origin: left bottom; pointer-events: none;
}

.nf-release-identity { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; margin: 0 0 12px; }
.nf-release-identity__logo { display: block; width: 218px; max-height: 72px; margin: 0 auto; object-fit: contain; }
.nf-release-identity__client-logo { display: none; object-fit: contain; }
.nf-mobile-product-logo { display: none; }
.nf-page-version-badge {
  position: absolute !important;
  top: 8px;
  bottom: auto;
  left: 4px;
  z-index: 10005;
  opacity: .26;
  margin: 0 !important;
  transform: none;
}
.nf-page-version-badge.nf-environment-link,
.nf-page-version-badge.nf-production-version { min-height: 14px; padding: 2px 5px; font-size: 6.5px; }

/* Nella console globale il simbolo NetForges sostituisce il logo esteso
   nella testata informativa, senza influenzare gli ingressi cliente. */
html[data-nf-zone="platform"] .ca-brand-side--centralauth .ca-auth-surface-logo {
  width: 78px;
  height: 78px;
  margin: 0 auto 8px;
}
html[data-nf-zone="platform"] .ca-brand-side--centralauth .ca-brand-header {
  position: relative;
  margin-top: 30px;
}
html[data-nf-zone="platform"] .ca-brand-side--centralauth .ca-brand-header::after {
  content: "";
  position: absolute;
  top: 4px;
  left: calc(50% + 16px);
  width: 21px;
  height: 25px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 42'%3E%3Cpath d='M18 1 34 7v13c0 11-7 18-16 22C9 38 2 31 2 20V7Z' fill='%231f1f1f' stroke='white' stroke-width='2'/%3E%3Crect x='10' y='18' width='16' height='13' rx='2.5' fill='white'/%3E%3Cpath d='M13 18v-4a5 5 0 0 1 10 0v4' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='18' cy='24' r='2' fill='%231f1f1f'/%3E%3C/svg%3E");
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, .2));
  pointer-events: none;
}

/* Avvicina il messaggio istituzionale al contenuto senza comprimere il footer. */
html[data-nf-zone="platform"] .ca-brand-side--centralauth .ca-brand-footer-copy {
  transform: translateY(-30px);
}
html[data-nf-zone="platform"] .ca-brand-side--centralauth .ca-brand-illustration {
  margin-top: 22px;
}

/* Feedback del login: il messaggio resta al centro della colonna operativa,
   con severita' immediatamente riconoscibile e icona ben leggibile. */
html.ca-auth-active .ant-message {
  position: fixed !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  left: calc(50% + min(180px, 16.5vw)) !important;
  width: min(360px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  padding: 0;
  z-index: 12000;
}
html.ca-auth-active .ant-message .ant-message-notice {
  padding: 6px 0;
  text-align: left;
}
html.ca-auth-active .ant-message .ant-message-notice-content,
html.ca-auth-active .ant-notification .ant-notification-notice {
  width: 100%;
  min-height: 82px;
  padding: 18px 20px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 14px;
  box-shadow: 0 22px 54px rgba(15, 23, 42, .22), 0 5px 16px rgba(15, 23, 42, .12);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  backdrop-filter: blur(14px);
}
html.ca-auth-active .ant-message .ant-message-custom-content {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
html.ca-auth-active .ant-message .anticon,
html.ca-auth-active .ant-notification .ant-notification-notice-icon {
  margin: 0;
  font-size: 28px !important;
  line-height: 1;
}
html.ca-auth-active .ant-message-notice-content:has(.ant-message-error),
html.ca-auth-active .ant-notification-notice:has(.ant-notification-notice-icon-error) {
  color: #7f1d1d;
  background: rgba(254, 226, 226, .97);
  border-color: #fca5a5;
}
html.ca-auth-active .ant-message-notice-content:has(.ant-message-warning),
html.ca-auth-active .ant-notification-notice:has(.ant-notification-notice-icon-warning) {
  color: #78350f;
  background: rgba(254, 243, 199, .97);
  border-color: #fcd34d;
}
html.ca-auth-active .ant-message-notice-content:has(.ant-message-success),
html.ca-auth-active .ant-notification-notice:has(.ant-notification-notice-icon-success) {
  color: #14532d;
  background: rgba(220, 252, 231, .97);
  border-color: #86efac;
}
html.ca-auth-active .ant-message-notice-content:has(.ant-message-info),
html.ca-auth-active .ant-message-notice-content:has(.ant-message-loading),
html.ca-auth-active .ant-notification-notice:has(.ant-notification-notice-icon-info) {
  color: #0c4a6e;
  background: rgba(224, 242, 254, .97);
  border-color: #7dd3fc;
}
html.ca-auth-active .ant-notification {
  position: fixed !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  left: calc(50% + min(180px, 16.5vw)) !important;
  width: min(360px, calc(100vw - 32px)) !important;
  transform: translate(-50%, -50%);
  z-index: 12000;
}
html.ca-auth-active .ant-notification .ant-notification-notice-message {
  margin-bottom: 5px;
  font-size: 16px;
  font-weight: 800;
}
html.ca-auth-active .ant-notification .ant-notification-notice-description {
  font-size: 13px;
  line-height: 1.45;
}
@media (max-width: 980px) {
  html.ca-auth-active .ant-message,
  html.ca-auth-active .ant-notification {
    left: 50% !important;
  }
}
.nf-environment-link,
.nf-production-version { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-height: 18px; margin: 0 0 8px; padding: 3px 7px; border-radius: 999px; font: inherit; font-size: 8px; font-weight: 800; line-height: 1; letter-spacing: .075em; text-transform: uppercase; }
.nf-release-identity .nf-environment-link,
.nf-release-identity .nf-production-version { margin: 0; }
.nf-environment-link { color: #075985; background: #e0f2fe; border: 1px solid #7dd3fc; box-shadow: 0 5px 14px rgba(14, 116, 144, .12); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.nf-environment-link::before { content: ""; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #0ea5e9; box-shadow: 0 0 0 3px rgba(14, 165, 233, .14); }
.nf-environment-link:hover { transform: translateY(-1px); border-color: #38bdf8; box-shadow: 0 8px 18px rgba(14, 116, 144, .18); }
.nf-environment-link:focus-visible { outline: 3px solid rgba(14, 165, 233, .25); outline-offset: 2px; }
.nf-environment-link--stage { color: #92400e; background: #fffbeb; border-color: #fbbf24; box-shadow: 0 5px 14px rgba(217, 119, 6, .12); }
.nf-environment-link--stage::before { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .16); }
.nf-production-version { color: #334155; background: #f8fafc; border: 1px solid #cbd5e1; }
.nf-test-account-anchor { position: relative; }
.nf-test-account-anchor > .ant-input-affix-wrapper { padding-right: 48px !important; }
.nf-test-account-picker { position: absolute; top: 50%; right: 7px; z-index: 40; transform: translateY(-50%); }
.nf-test-account-picker__toggle { display: grid; place-items: center; width: 34px; height: 32px; padding: 0 0 7px; color: #075985; background: #e0f2fe; border: 1px solid #7dd3fc; border-radius: 9px; font-size: 22px; font-weight: 900; line-height: 1; cursor: pointer; }
.nf-test-account-picker__toggle:hover { color: #034e73; background: #bae6fd; border-color: #38bdf8; }
.nf-test-account-picker__toggle:focus-visible { outline: 3px solid rgba(14, 165, 233, .25); outline-offset: 2px; }
.nf-test-account-picker__menu { position: absolute; top: calc(100% + 8px); right: 0; width: min(280px, calc(100vw - 48px)); display: none; padding: 6px; background: #fff; border: 1px solid #d8e5ec; border-radius: 12px; box-shadow: 0 18px 48px rgba(15, 42, 59, .2); }
.nf-test-account-picker.is-open .nf-test-account-picker__menu { display: grid; gap: 3px; }
.nf-test-account-picker__item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 9px 10px; color: #16334b; background: transparent; border: 0; border-radius: 8px; font: inherit; text-align: left; cursor: pointer; }
.nf-test-account-picker__item:hover,
.nf-test-account-picker__item:focus-visible { background: #eef7fb; outline: 0; }
.nf-test-account-picker__item strong { font-size: 12px; font-weight: 800; }
.nf-test-account-picker__item span { margin-top: 2px; color: #60788a; font-size: 11px; }
.nf-environment-modal[hidden] { display: none; }
.nf-environment-modal { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; background: rgba(14, 28, 42, 0.56); backdrop-filter: blur(5px); }
.nf-environment-modal__panel { position: relative; width: min(520px, 100%); padding: 25px; background: #fff; border: 1px solid rgba(0, 92, 168, 0.18); border-radius: 18px; box-shadow: 0 24px 70px rgba(10, 31, 49, 0.3); }
.nf-environment-modal__panel h2 { margin: 0 42px 18px 0; color: #16334b; font-size: 20px; }
.nf-environment-modal__close { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; color: #334b5f; background: #eef4f7; border: 0; border-radius: 50%; font-size: 25px; line-height: 30px; cursor: pointer; }
.nf-environment-modal__details { overflow: hidden; border: 1px solid #dce5eb; border-radius: 12px; }
.nf-environment-modal__row { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 10px 13px; border-bottom: 1px solid #e6edf1; }
.nf-environment-modal__row:last-child { border-bottom: 0; }
.nf-environment-modal__label { color: #40586b; font-weight: 750; }
html.nf-environment-open { overflow: hidden; }

.nf-zone-denied {
  position: sticky;
  top: 0;
  z-index: 10001;
  margin: 0;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #5c1a1a;
  background: #fde8e8;
  border-bottom: 1px solid #f5c2c2;
}

@media (min-width: 981px) {
  html.ca-auth-active .ca-form-card-head {
    padding-top: 18px;
  }
  html.ca-auth-active .ca-login-card > .nf-release-identity .nf-release-identity__logo {
    transform: translateX(-10px);
  }
}

html[data-nf-zone="userauth"].nf-zone-access-blocked #root {
  visibility: hidden;
  pointer-events: none;
}

html[data-nf-zone="userauth"].nf-zone-access-ok #root {
  visibility: visible;
  pointer-events: auto;
}

html[data-nf-zone="platform"] .login-content.ca-auth-layout {
  box-shadow: 0 18px 48px rgba(0, 92, 168, 0.12);
}

/* La console globale usa il solo simbolo ufficiale NetForges: nessuna
   illustrazione commodity o marchio CAuth visibile nel pannello. */
html[data-nf-zone="platform"] .ca-brand-side {
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(248, 251, 255, .86)) !important;
}

html[data-nf-zone="orgadmin"] .login-content.ca-auth-layout {
  box-shadow: 0 18px 48px rgba(109, 53, 255, 0.08);
}

html[data-nf-zone="userauth"] .login-content.ca-auth-layout {
  box-shadow: 0 18px 48px rgba(0, 92, 168, 0.10);
}

/* ============================================================
   TABLET (≤980px): contiene la shell entro il viewport, mantiene
   le due colonne ma più strette così nulla esce dai bordi.
   ============================================================ */
@media (max-width: 980px) {
  html.ca-auth-active .login-content.ca-auth-layout > .ca-login-card-utilities { display: block; }
  html.ca-auth-active .ca-login-card-utilities .ca-lang { top: 2px; right: 4px; }
  html.ca-auth-active .nf-page-version-badge { top: 2px; bottom: auto; left: 4px; transform: none; }
  html.ca-auth-active .ca-auth-shell {
    width: min(94vw, var(--ca-shell-max-width, 760px));
  }

  html.ca-auth-active .login-content.ca-auth-layout {
    max-width: min(94vw, var(--ca-shell-max-width, 760px));
    display: flex;
    justify-content: center;
    grid-template-columns: none;
  }

  html.ca-auth-active .ca-brand-side { display: none !important; }
  html.ca-auth-active .ca-form-side,
  html.ca-auth-active .login-panel,
  html.ca-auth-active .login-panel-dark {
    width: min(100%, 440px) !important;
    margin: 0 auto !important;
    border-left: 0 !important;
  }

  html.ca-auth-active .ca-login-card {
    width: 100%;
    max-width: 380px;
  }

  html.ca-auth-active .ca-shell-footer {
    max-width: min(94vw, var(--ca-shell-max-width, 760px));
  }
}

/* ============================================================
   MOBILE / WEBAPP (≤760px): la maschera diventa una PAGINA PIATTA
   (niente box: nessun bordo, sfondo, ombra o blur), tutto centrato
   e in colonna unica. Selettore lingua ancorato in alto a destra.
   Ordine verticale:
     1) loghi (app + appartenenza)
     2) tipo di accesso (eyebrow)
     3) controlli utente/password (form)
     4) slogan + descrizione
     5) powered-by (in fondo, centrato)
   Usiamo display:contents sul pannello brand così i suoi figli
   entrano nel flusso flex e si riordinano con `order`.
   ============================================================ */
@media (max-width: 767px) {
  html.ca-auth-active .loginBackground,
  html.ca-auth-active .loginBackgroundDark {
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
    align-items: flex-start !important;
    padding: 0;
  }

  html.ca-auth-active .login-content {
    padding: 0;
    align-items: start;
  }

  html.ca-auth-active .ca-auth-shell {
    position: relative;
    width: 100%;
    max-width: 100% !important;
    max-width: 100%;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }

  /* pagina piatta: nessun contenitore */
  html.ca-auth-active .login-content.ca-auth-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    min-height: 0;
    max-height: 100dvh;
    gap: 6px;
    padding: 52px clamp(18px, 6vw, 30px) 8px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    overflow: hidden auto;
    overscroll-behavior: contain;
  }

  /* Le superfici mobili sono form-only: nessun visual laterale. */
  html.ca-auth-active .ca-brand-side {
    display: none !important;
  }

  /* 1) loghi in alto, centrati */
  html.ca-auth-active .ca-brand-header { display: none !important; }
  html.ca-auth-active .ca-brand-maintainer-wordmark { margin-top: 0; }

  html.ca-auth-active .ca-app-logo-stack {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0;
  }

  html.ca-auth-active .ca-brand-mark {
    margin: 0 auto;
  }

  /* 2) tipo di accesso */
  html.ca-auth-active .ca-brand-eyebrow { display: none !important; }

  html.ca-auth-active .ca-brand-illustration { display: none !important; }

  html.ca-auth-active .ca-brand-spacer {
    display: none !important;
  }

  /* 3) controlli di accesso (form a piena larghezza, mai fuori schermo) */
  html.ca-auth-active .login-panel,
  html.ca-auth-active .login-panel-dark,
  html.ca-auth-active .ca-form-side {
    order: 3;
    grid-column: 1 / -1;
    display: block !important;
    width: 100% !important;
    min-height: 0;
    padding: 4px 0 6px !important;
    border: 0 !important;
    background: transparent !important;
  }

  html.ca-auth-active .ca-login-card {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  html.ca-auth-active .ca-login-card .login-form,
  html.ca-auth-active .ca-login-card .login-form > div,
  html.ca-auth-active .ca-login-card form {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  html.ca-auth-active .ca-login-card .login-forget-password {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px !important;
    font-size: 11px;
    white-space: nowrap;
  }

  html.ca-auth-active .ca-form-card-head {
    text-align: center;
    margin-bottom: 12px;
  }
  html.ca-auth-active .ca-form-card-head--text-only img.ca-form-default-logo {
    display: block !important;
    width: min(190px, 54vw);
    max-height: 64px;
    margin: 0 auto 8px;
    object-fit: contain;
  }
  html.ca-auth-active .nf-release-identity--default { display: none; }

  /* 4) slogan + descrizione dopo i controlli, centrati */
  html.ca-auth-active .ca-brand-footer-copy { display: none !important; }

  html.ca-auth-active .ca-brand-slogan,
  html.ca-auth-active .ca-brand-description {
    margin-left: auto;
    margin-right: auto;
    max-width: 340px;
  }

  html.ca-auth-active .ca-login-card-utilities .ca-lang {
    position: absolute;
    top: 1px;
    left: auto;
    right: 8px;
    transform: none;
  }
  html.ca-auth-active .ca-login-card-utilities .ca-maintainer { bottom: 4px; left: 5px; opacity: .3; transform: scale(.66); }
  html.ca-auth-active .nf-page-version-badge {
    position: absolute !important;
    top: 1px;
    bottom: auto;
    left: 50%;
    opacity: .38;
    transform: translateX(-50%);
  }

  /* il menu si apre verso il basso (siamo in alto) */
  html.ca-auth-active .ca-lang__menu {
    top: calc(100% + 8px);
    bottom: auto;
  }

  html.ca-auth-active .nf-environment-link,
  html.ca-auth-active .nf-production-version {
    max-width: 100%;
    white-space: normal;
    line-height: 1.25;
  }
  html.ca-auth-active .nf-release-identity { margin-bottom: 9px; }
  html.ca-auth-active .nf-release-identity__client-logo {
    display: block;
    width: min(278px, 84vw);
    max-height: 102px;
    margin: 0 auto;
  }
  html.ca-auth-active .nf-release-identity__logo {
    display: none;
  }
  html.ca-auth-active .nf-mobile-product-logo {
    display: block;
    position: absolute;
    top: 1px;
    left: 4px;
    z-index: 10005;
    width: 70px;
    max-height: 19px;
    object-fit: contain;
    opacity: .72;
  }
  html.ca-auth-active .nf-environment-link,
  html.ca-auth-active .nf-production-version { min-height: 17px; padding: 3px 6px; font-size: 7.5px; }

  html.ca-auth-active .nf-test-account-picker__menu {
    position: fixed;
    top: auto;
    right: 16px;
    left: 16px;
    width: auto;
    max-height: 45vh;
    overflow-y: auto;
  }
}

@media (max-height: 720px) and (max-width: 767px) {
  html.ca-auth-active .login-content.ca-auth-layout { padding-top: 34px; }
  html.ca-auth-active .nf-release-identity__client-logo { width: min(248px, 78vw); max-height: 78px; }
  html.ca-auth-active .nf-mobile-product-logo { width: 70px; max-height: 20px; }
  html.ca-auth-active .ca-form-card-head { margin-bottom: 6px; }
  html.ca-auth-active .ca-login-card .signin-methods { margin-bottom: 6px; }
}

/* ============================================================
   SMARTPHONE (≤420px): margini minimi, loghi più piccoli.
   ============================================================ */
@media (max-width: 420px) {
  html.ca-auth-active .login-content.ca-auth-layout {
    padding: 50px 16px 8px;
    gap: 4px;
  }

  html.ca-auth-active .ca-login-card {
    max-width: 100%;
  }

  html.ca-auth-active .ca-app-logo {
    max-height: 38px;
  }

  html.ca-auth-active .ca-client-logo--access {
    max-height: 32px;
  }
}
