/* Brand Adeguati Assetti (Kit_sviluppo_Adeguati_Assetti v1.1, tokens.css): palette Iniziativa, Nohemi per titoli
   e numeri, Open Sauce Sans per testo e interfaccia. Colori, raggio, chrome e logo arrivano da envConfig.BRANDING;
   qui solo quello che BRANDING non copre (font fuori dalla lista del kit, titoli, focus, card, tabelle).
   !important batte lo stile inline che il kit mette su <html> e il CSS del kit, che arriva dopo. */

/* ---------- Font (self-hosted, public/fonts) ----------
   Nohemi: .otf originali, non modificati (licenza: uso commerciale libero senza modifiche). */
@font-face { font-family: "Nohemi"; src: url("/app/fonts/nohemi/Nohemi-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Nohemi"; src: url("/app/fonts/nohemi/Nohemi-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Nohemi"; src: url("/app/fonts/nohemi/Nohemi-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Open Sauce Sans"; src: url("/app/fonts/opensauce/OpenSauceSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sauce Sans"; src: url("/app/fonts/opensauce/OpenSauceSans-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Open Sauce Sans"; src: url("/app/fonts/opensauce/OpenSauceSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Open Sauce Sans"; src: url("/app/fonts/opensauce/OpenSauceSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Open Sauce Sans"; src: url("/app/fonts/opensauce/OpenSauceSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Palette (primitivi del kit di brand) */
  --aa-foresta: #194026;
  --aa-bosco: #27633b;
  --aa-verde: #378c53;
  --aa-lime: #80bc00;
  --aa-lime-scuro: #4e7a00;
  --aa-carta: #f4f6f2;
  --aa-superficie-2: #eaefea;
  --aa-ardesia: #556b5e;
  --aa-linea: #d8dfd9;
  --aa-linea-forte: #6f8277;
  --aa-tinta: #eef6dc;
  --aa-muted-scuro: #a9c4b3;
  --aa-linea-scuro: #2f5a3e;
  --aa-errore: #b3261e;
  --aa-font-titoli: "Nohemi", "Open Sauce Sans", system-ui, sans-serif;
  --aa-font-testo: "Open Sauce Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Il kit applica var(--q01-font) a tutta la pagina, ma da BRANDING.font accetta solo i suoi font. */
  --q01-font: var(--aa-font-testo) !important;
}

html body {
  font-family: var(--aa-font-testo) !important;
  font-variant-numeric: tabular-nums;
}

/* Titoli: Nohemi 600, spaziatura -0,02em (H1 40/44, H2 24/30, H3 18/24 nel brief). */
html body h1,
html body h2,
html body h3,
html body .ant-typography h1,
html body .ant-typography h2,
html body .ant-typography h3,
html body .ant-page-header-heading-title,
html body .ant-card-head-title,
html body .ant-drawer-title,
html body .ant-modal-title {
  font-family: var(--aa-font-titoli) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
}

/* Logo nell'header/sider: un marchio senza wordmark e' gia' il lockup completo (aa-logo.svg). */
html body .q01-app-lockup,
html body .q01-app-lockup__name {
  color: var(--aa-foresta) !important;
}

/* Focus da tastiera: contorno Lime 3px su bottoni e link. Sui campi niente contorno (bordo Verde e alone Tinta
   del tema), su richiesta: il doppio riquadro lime del brief era troppo pesante. */
html body .ant-btn:focus-visible,
html body a:focus-visible {
  outline: 3px solid var(--aa-lime) !important;
  outline-offset: 2px;
}
html body .ant-input:focus,
html body .ant-input:focus-visible,
html body .ant-input-affix-wrapper input:focus-visible {
  outline: none !important;
}

/* Link: Verde; bottone primario Bosco con hover Foresta (il resto lo fa colorPrimary). */
html body a { color: var(--aa-verde); }
html body .ant-btn-primary:not(:disabled):hover { background: var(--aa-foresta) !important; }
html body .ant-btn { font-weight: 600; }

/* Card bianche, bordo Linea, raggio 10. */
html body .ant-card {
  border-radius: 10px;
  border-color: var(--aa-linea);
}

/* Tabelle: intestazione 12px Ardesia con filetto Foresta, righe con divisore Linea. */
html body .ant-table-thead > tr > th {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--aa-ardesia) !important;
  background: transparent !important;
  border-bottom: 2px solid var(--aa-foresta) !important;
}
html body .ant-table-tbody > tr > td {
  border-bottom: 1px solid var(--aa-linea) !important;
}
/* Backoffice di Adeguati Assetti: sider, header e pagine CRUD del kit (q01uikit) con le regole del brief di
   restyling v1.1 (palette Iniziativa, Nohemi/Open Sauce, raggi 6/10, tabelle col filetto Foresta). Il brief non ha
   un mockup del backoffice: lo schema e' quello del backoffice artbeeze (blocco logo scuro sopra il sider scuro,
   header bianco, contenuto chiaro), coi colori del login (pannello Foresta, accenti Lime).
   !important batte gli stili inline del kit e il suo CSS, che arriva dopo. Variabili --aa-* in brand.css. */

/* ===== Header ===== */
html body .ant-layout-header {
  background: #fff !important;
  height: 64px !important;
  line-height: 64px !important;
  z-index: 100 !important;
  border-bottom: 0 !important;
}
html body .ant-layout-sider #mainMenu {
  height: calc(100vh - 64px) !important;
}
html body .ant-layout-header > .ant-flex {
  height: 100%;
  align-items: stretch !important;
}
html body .ant-layout-header > .ant-flex > .ant-flex {
  align-items: center !important;
}
/* blocco del logo largo quanto il sider, Foresta con filetto Lime a destra */
html body .ant-layout-header > .ant-flex > .ant-flex:first-child:has(.aa-bo-title) {
  width: 260px !important;
  flex: none;
  align-self: stretch;
  background: var(--aa-foresta);
  box-shadow: inset -3px 0 0 var(--aa-lime);
}
html body .ant-layout-header > .ant-flex > .ant-flex:first-child:has(.aa-bo-title--collapsed) {
  width: 80px !important;
}
html body .ant-layout-header > .ant-flex > .ant-flex:not(:first-child) {
  border-bottom: 1px solid var(--aa-linea);
}
html body .ant-layout-header > .ant-flex > .ant-flex:last-child {
  flex: 1;
  width: auto !important;
  min-width: 0;
}
html body .aa-bo-title {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 0 22px;
}
html body .aa-bo-title img { height: 24px; width: auto; }
html body .aa-bo-title--collapsed { padding: 0; justify-content: center; width: 100%; }
html body .aa-bo-title--collapsed img { height: 34px; }
html body .aa-bo-env {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(128, 188, 0, 0.18);
  color: var(--aa-lime);
}
/* ricerca del kit al centro nascosta: quella dell'app sta a destra (slot HeaderActions). La ricerca resta accesa
   (features.search) perche' senza il kit non monta la kbar. */
html body .ant-layout-header > .ant-flex > .ant-flex:not(:first-child):not(:last-child) { display: none !important; }
html body .ant-layout-header > .ant-flex > .ant-flex:last-child { padding-left: 28px; gap: 12px; }
html body .aa-bo-crumb {
  margin-right: auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 1.4;
  color: var(--aa-ardesia);
}
html body .aa-bo-crumb b { color: var(--aa-foresta); font-weight: 600; }
html body .aa-bo-search {
  width: 340px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--aa-linea);
  border-radius: 6px;
  background: #fff;
  color: var(--aa-ardesia);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
html body .aa-bo-search:hover { border-color: var(--aa-linea-forte); }
html body .aa-bo-search svg { width: 16px; height: 16px; }
html body .aa-bo-search kbd {
  margin-left: auto;
  font: 600 11px var(--aa-font-testo);
  border: 1px solid var(--aa-linea);
  border-radius: 4px;
  padding: 1px 6px;
}
@media (max-width: 1200px) { html body .aa-bo-search { width: 220px; } }
html body .ant-layout-header .anticon-bell,
html body .ant-layout-header .anticon-down { color: var(--aa-foresta) !important; }
html body .ant-layout-header .ant-btn:has(.anticon-bell) {
  width: 40px !important;
  height: 40px !important;
  border: 1px solid var(--aa-linea) !important;
  border-radius: 6px !important;
}
/* utente: iniziali al posto della foto (gravatar), nome e sotto il profilo al posto del tenant, senza freccia */
html body .ant-layout-header .ant-space-item .ant-avatar {
  width: 36px !important;
  height: 36px !important;
  background: var(--aa-tinta) !important;
  border: 0 !important;
  position: relative;
}
html body .ant-layout-header .ant-space-item .ant-avatar img,
html body .ant-layout-header .ant-space-item .ant-avatar .ant-avatar-string { visibility: hidden; }
html body .ant-layout-header .ant-space-item .ant-avatar::after {
  content: var(--aa-user-initials, "");
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 13px/1 var(--aa-font-titoli);
  color: var(--aa-foresta);
}
html body .ant-layout-header .ant-space-item > .ant-typography {
  display: inline-flex !important;
  flex-direction: column;
  font-size: 0 !important;
  line-height: 1.25 !important;
}
html body .ant-layout-header .ant-space-item > .ant-typography::before {
  content: var(--aa-user-name, "");
  font-size: 14px;
  font-weight: 600;
  color: var(--aa-foresta);
}
html body .ant-layout-header .ant-space-item > .ant-typography::after {
  content: var(--aa-user-profile, "");
  font-size: 12px;
  font-weight: 500;
  color: var(--aa-ardesia);
}
html body .ant-layout-header .ant-space-item > .ant-typography .anticon-caret-down { display: none; }
/* popover dell'utente (slot UserMenu) */
html body .aa-bo-usermenu { padding: 18px 18px 10px; color: var(--aa-foresta); }
html body .aa-bo-usermenu__head { display: flex; align-items: center; gap: 12px; }
html body .aa-bo-usermenu__avatar {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--aa-tinta);
  color: var(--aa-foresta);
  font: 700 15px var(--aa-font-titoli);
}
html body .aa-bo-usermenu__who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
html body .aa-bo-usermenu__who b { font-size: 15px; font-weight: 700; }
html body .aa-bo-usermenu__who span { font-size: 13px; color: var(--aa-ardesia); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .aa-bo-usermenu__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--aa-linea);
}
html body .aa-bo-usermenu__tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--aa-superficie-2);
  color: var(--aa-ardesia);
}
html body .aa-bo-usermenu__tag--profile { background: var(--aa-tinta); color: var(--aa-foresta); }
html body .aa-bo-usermenu__tag--env { background: var(--aa-tinta); color: var(--aa-lime-scuro); letter-spacing: 0.06em; }
html body .aa-bo-usermenu__logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--aa-errore);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
html body .aa-bo-usermenu__logout:hover { background: #fbeae9; }
html body .aa-bo-usermenu__logout svg { width: 17px; height: 17px; }

/* ===== Sider Foresta ===== */
html body .ant-layout-sider,
html body .ant-layout-sider .ant-menu,
html body .ant-layout-sider .ant-menu-sub {
  background: var(--aa-foresta) !important;
  border-right: 0 !important;
}
html body .ant-layout-sider .ant-menu-item,
html body .ant-layout-sider .ant-menu-submenu-title,
html body .ant-layout-sider .ant-menu-item a,
html body .ant-layout-sider .ant-menu-item-icon,
html body .ant-layout-sider .ant-menu-submenu-arrow,
html body .ant-layout-sider .q01-menu-search-btn {
  color: var(--aa-muted-scuro) !important;
}
html body .ant-layout-sider .ant-menu-item,
html body .ant-layout-sider .ant-menu-submenu-title {
  margin: 1px 10px !important;
  width: calc(100% - 20px) !important;
  border-radius: 6px !important;
  height: 38px !important;
  line-height: 38px !important;
  padding-left: 12px !important;
  font-size: 14px;
  font-weight: 500;
}
html body .ant-layout-sider .ant-menu-root > .ant-menu-submenu:not(.q01-menu-package) > .ant-menu-submenu-title {
  font-weight: 600;
  color: #fff !important;
}
html body .ant-layout-sider .ant-menu-item:hover,
html body .ant-layout-sider .ant-menu-submenu-title:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
}
html body .ant-layout-sider .ant-menu-item-selected {
  background: var(--aa-linea-scuro) !important;
}
html body .ant-layout-sider .ant-menu-item-selected,
html body .ant-layout-sider .ant-menu-item-selected a {
  color: #fff !important;
  font-weight: 600;
}
html body .ant-layout-sider .ant-menu-item-selected .ant-menu-item-icon,
html body .ant-layout-sider .ant-menu-submenu-open > .ant-menu-submenu-title > .ant-menu-item-icon {
  color: var(--aa-lime) !important;
}
/* titoli dei package (SURVEY...): eyebrow Open Sauce 600 maiuscolo, Lime */
html body .ant-layout-sider .q01-menu-package-title,
html body .ant-layout-sider .q01-menu-package-title * {
  font-family: var(--aa-font-testo) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  color: var(--aa-lime) !important;
}
html body .ant-layout-sider .q01-menu-package > .ant-menu-submenu-title {
  padding-left: 26px !important;
  height: 32px !important;
  line-height: 32px !important;
  margin-top: 4px !important;
}
html body .ant-layout-sider .q01-menu-package > .ant-menu-submenu-title:hover { background: transparent !important; }
html body .ant-layout-sider .q01-menu-package .ant-menu-item.q01-menu-leaf { padding-left: 36px !important; }
html body .ant-layout-sider .ant-menu-item[style*="absolute"] {
  background: var(--aa-foresta) !important;
  border-top: 1px solid var(--aa-linea-scuro) !important;
}
html body .ant-layout-sider .ant-divider { border-color: var(--aa-linea-scuro) !important; }
html body .ant-layout-sider .menu-scroll-container { scrollbar-color: rgba(255, 255, 255, 0.25) var(--aa-foresta) !important; }
/* niente menu impostazioni (features.settingsMenu false): la voce del kit resta, la nascondiamo */
html body .ant-layout-sider li[data-menu-id*="menu-item-settings"] { display: none !important; }

/* ===== Contenuto e pagine CRUD (kit e MFE con gli stessi componenti antd) ===== */
html body .ant-layout-content { background: var(--aa-carta); }

html body :is(.ant-layout-content, .ant-modal-content) .ant-page-header .refine-pageHeader-title,
html body :is(.ant-layout-content, .ant-modal-content) .ant-page-header-heading-title {
  font-family: var(--aa-font-titoli) !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
  color: var(--aa-foresta) !important;
  line-height: 1.15 !important;
}
html body :is(.ant-layout-content, .ant-modal-content) .ant-page-header .refine-pageHeader-subTitle {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aa-ardesia) !important;
}
/* bottoni: 40px, raggio 6, primario Bosco (hover Foresta), secondario bianco con bordo Linea forte */
html body :is(.ant-layout-content, .ant-modal-content, .ant-drawer) .ant-btn:not(.ant-btn-sm):not(.ant-btn-icon-only):not(.ant-btn-link):not(.ant-btn-text) {
  height: 40px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: none;
}
html body :is(.ant-layout-content, .ant-modal-content, .ant-drawer) .ant-btn-default:not(.ant-btn-dangerous) {
  border-color: var(--aa-linea-forte);
  color: var(--aa-foresta);
}
html body :is(.ant-layout-content, .ant-modal-content, .ant-drawer) .ant-btn-default:not(.ant-btn-dangerous):not(:disabled):hover {
  background: var(--aa-superficie-2) !important;
  border-color: var(--aa-linea-forte) !important;
  color: var(--aa-foresta) !important;
}
html body :is(.ant-layout-content, .ant-modal-content, .ant-drawer) .ant-btn-primary:not(.ant-btn-dangerous):not(:disabled) {
  background: var(--aa-bosco);
  border-color: var(--aa-bosco);
}
html body :is(.ant-layout-content, .ant-modal-content) .ant-btn:disabled {
  background: var(--aa-superficie-2) !important;
  border-color: var(--aa-linea) !important;
  color: var(--aa-ardesia) !important;
  opacity: 0.8;
}
html body :is(.ant-layout-content, .ant-modal-content) .ant-page-header-heading-extra .ant-btn-icon-only:not(.ant-btn-sm) {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border-color: var(--aa-linea);
}
/* tabelle: card bianca, intestazione 12px Ardesia col filetto Foresta, divisori Linea, numeri a destra */
html body :is(.ant-layout-content, .ant-modal-content) .ant-table {
  background: #fff;
  border: 1px solid var(--aa-linea);
  border-radius: 10px;
  overflow: hidden;
  font-size: 14px;
}
html body :is(.ant-layout-content, .ant-modal-content) .ant-table-container,
html body :is(.ant-layout-content, .ant-modal-content) .ant-table-content > table { border-radius: 10px !important; }
html body :is(.ant-layout-content, .ant-modal-content) .ant-table-thead > tr > th,
html body :is(.ant-layout-content, .ant-modal-content) .ant-table-thead > tr > td {
  background: #fff !important;
  color: var(--aa-ardesia) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 11px 14px !important;
  border-bottom: 2px solid var(--aa-foresta) !important;
  white-space: nowrap;
}
html body :is(.ant-layout-content, .ant-modal-content) .ant-table-thead > tr > th::before { display: none; }
html body :is(.ant-layout-content, .ant-modal-content) .ant-table-tbody > tr > td {
  padding: 11px 14px !important;
  border-bottom: 1px solid var(--aa-linea) !important;
  color: var(--aa-foresta);
}
html body :is(.ant-layout-content, .ant-modal-content) .ant-table-tbody > tr:last-child > td { border-bottom: 0 !important; }
html body :is(.ant-layout-content, .ant-modal-content) .ant-table-tbody > tr.ant-table-row:hover > td { background: var(--aa-carta) !important; }
html body :is(.ant-layout-content, .ant-modal-content) .ant-table-column-sorter { color: var(--aa-linea-forte); }
html body :is(.ant-layout-content, .ant-modal-content) .ant-table-column-sorter .active { color: var(--aa-verde); }
/* azioni per riga: icone senza bordo, cestino rosso */
html body :is(.ant-layout-content, .ant-modal-content) .ant-table :is(.refine-show-button, .refine-edit-button, .refine-delete-button) {
  width: 32px !important;
  height: 32px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--aa-ardesia) !important;
}
html body :is(.ant-layout-content, .ant-modal-content) .ant-table .refine-delete-button { color: var(--aa-errore) !important; }
html body :is(.ant-layout-content, .ant-modal-content) .ant-table :is(.refine-show-button, .refine-edit-button):hover { background: var(--aa-tinta) !important; color: var(--aa-bosco) !important; }
html body :is(.ant-layout-content, .ant-modal-content) .ant-table .refine-delete-button:hover { background: #fbeae9 !important; }
/* paginazione */
html body :is(.ant-layout-content, .ant-modal-content) .ant-pagination :is(.ant-pagination-item, .ant-pagination-prev .ant-pagination-item-link, .ant-pagination-next .ant-pagination-item-link) {
  min-width: 32px;
  height: 32px;
  line-height: 30px;
  border-radius: 6px;
  border: 1px solid var(--aa-linea);
  background: #fff;
  font-weight: 600;
}
html body :is(.ant-layout-content, .ant-modal-content) .ant-pagination .ant-pagination-item.ant-pagination-item-active { background: var(--aa-bosco) !important; border-color: var(--aa-bosco) !important; }
html body :is(.ant-layout-content, .ant-modal-content) .ant-pagination .ant-pagination-item-active a { color: #fff !important; }
/* card di dettaglio e moduli */
html body :is(.ant-layout-content, .ant-modal-content) .ant-card {
  border: 1px solid var(--aa-linea);
  border-radius: 10px;
  box-shadow: none;
}
html body :is(.ant-layout-content, .ant-modal-content) .ant-card-actions {
  background: #fff;
  border-top: 1px solid var(--aa-linea);
  border-radius: 0 0 10px 10px;
}
html body :is(.ant-layout-content, .ant-modal-content) .ant-page-header-back-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--aa-foresta) !important;
}
html body :is(.ant-layout-content, .ant-modal-content) .ant-page-header-back-button:hover { background: var(--aa-superficie-2); }
/* schede: attiva Verde sottolineata, come la barra dei risultati del mockup */
html body :is(.ant-layout-content, .ant-modal-content) .ant-tabs-tab { font-size: 14px; font-weight: 600; }
html body :is(.ant-layout-content, .ant-modal-content) .ant-tabs-tab:not(.ant-tabs-tab-active) .ant-tabs-tab-btn { color: var(--aa-ardesia); }
html body :is(.ant-layout-content, .ant-modal-content) .ant-tabs-tab-active .ant-tabs-tab-btn { color: var(--aa-foresta) !important; }
html body :is(.ant-layout-content, .ant-modal-content) .ant-tabs-ink-bar { background: var(--aa-verde) !important; height: 3px !important; }
html body :is(.ant-layout-content, .ant-modal-content) .ant-tabs-nav::before { border-bottom-color: var(--aa-linea) !important; }
/* dettaglio: etichetta eyebrow sopra il valore */
html body :is(.ant-layout-content, .ant-modal-content) .ant-descriptions-bordered .ant-descriptions-view {
  border-color: var(--aa-linea) !important;
  border-radius: 10px !important;
  overflow: hidden;
}
html body :is(.ant-layout-content, .ant-modal-content) .ant-descriptions-bordered .ant-descriptions-item-label {
  background: #fff !important;
  border-color: var(--aa-linea) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--aa-ardesia) !important;
}
html body :is(.ant-layout-content, .ant-modal-content) .ant-descriptions-bordered .ant-descriptions-item-content {
  border-color: var(--aa-linea) !important;
  font-size: 14px;
  font-weight: 500;
  color: var(--aa-foresta);
}
/* campi: 40px, bordo Linea forte, raggio 6, etichetta 14/600 sopra */
html body :is(.ant-layout-content, .ant-modal-content, .ant-drawer) .ant-form-item-label > label {
  font-size: 14px;
  font-weight: 600;
  color: var(--aa-foresta);
}
html body :is(.ant-layout-content, .ant-modal-content, .ant-drawer) .ant-form-item-label > label::after { content: none !important; }
html body :is(.ant-layout-content, .ant-modal-content, .ant-drawer) .ant-form :is(.ant-input, .ant-input-affix-wrapper, .ant-input-number, .ant-picker, .ant-select-selector) {
  border-radius: 6px !important;
  border-color: var(--aa-linea-forte);
}
html body :is(.ant-layout-content, .ant-modal-content, .ant-drawer) .ant-form .ant-input-affix-wrapper .ant-input { border-radius: 0 !important; }
html body :is(.ant-layout-content, .ant-modal-content, .ant-drawer) .ant-form :is(.ant-input:not(textarea), .ant-input-affix-wrapper, .ant-picker) { min-height: 40px; }
html body :is(.ant-layout-content, .ant-modal-content, .ant-drawer) .ant-form .ant-input-affix-wrapper > .ant-input { min-height: 0; }
/* pannello laterale (ricerca avanzata) e finestre */
html body .ant-drawer .ant-drawer-header { padding: 18px 22px; border-bottom: 1px solid var(--aa-linea); }
html body .ant-drawer .ant-drawer-title,
html body .ant-modal .ant-modal-title {
  font-family: var(--aa-font-titoli) !important;
  font-size: 20px;
  font-weight: 600;
  color: var(--aa-foresta);
}
html body .ant-drawer .ant-drawer-header:has(.ant-drawer-extra .anticon-close) .ant-drawer-close { display: none; }
html body .ant-modal .ant-modal-content { border-radius: 10px; }
/* tag e badge con la Tinta del brand */
html body :is(.ant-layout-content, .ant-modal-content) .ant-tag {
  border-radius: 4px;
  border-color: transparent;
  background: var(--aa-tinta);
  color: var(--aa-foresta);
  font-weight: 600;
}

/* ===== Mobile (header e navigazione del kit sotto 768px) =====
   L'header mobile usa lo stesso slot Title ma e' bianco: logo positivo, niente etichetta ambiente. */
html body .aa-bo-title__light { display: none; }
html body .q01-mobile-header .aa-bo-title { padding: 0; height: auto; }
html body .q01-mobile-header .aa-bo-title__dark,
html body .q01-mobile-header .aa-bo-env { display: none; }
html body .q01-mobile-header .aa-bo-title__light { display: block; height: 28px; width: auto; }
html body .q01-mobile-header .q01-mobile-header__logo { flex: none; width: auto !important; }
html body .q01-mobile-header .q01-mobile-header__title {
  flex: 1;
  min-width: 0;
  font-family: var(--aa-font-titoli) !important;
  font-weight: 600;
  color: var(--aa-foresta);
}
html body .q01-mobile-header .anticon { color: var(--aa-foresta) !important; }
/* pannelli a tutto schermo (Esplora, Io): fondo Carta invece del grigio azzurro del kit */
html body .q01-sheet { background: var(--aa-carta) !important; }
html body .aa-flag { border-radius: 50%; object-fit: cover; vertical-align: middle; }
html body .ant-layout-header .ant-space-item > .ant-typography::before,
html body .ant-layout-header .ant-space-item > .ant-typography::after { white-space: nowrap; }

/* ===== Home (segnaposto della dashboard) ===== */
html body .aa-dashboard { max-width: 1100px; padding: 32px 8px; }
html body .aa-dashboard h1 { font-size: 40px; line-height: 1.1; color: var(--aa-foresta); margin: 10px 0 12px; }
html body .aa-dashboard > p { font-size: 15px; line-height: 1.55; color: var(--aa-ardesia); max-width: 760px; }
html body .aa-dashboard__mods { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
html body .aa-dashboard__mod { background: #fff; border: 1px solid var(--aa-linea); border-radius: 10px; padding: 24px; }
html body .aa-dashboard__mod p { margin: 10px 0 0; line-height: 1.55; color: var(--aa-foresta); }
html body .aa-dashboard__mod--dark { background: var(--aa-foresta); border-color: var(--aa-foresta); }
html body .aa-dashboard__mod--dark p { color: #fff; }
@media (max-width: 768px) {
  html body .aa-dashboard { padding: 16px 4px; }
  html body .aa-dashboard h1 { font-size: 30px; }
  html body .aa-dashboard__mods { grid-template-columns: 1fr; }
}
/* selettore della lingua nell'header: riquadro da 40px come la campanella */
html body .aa-bo-lang .ant-btn {
  height: 40px !important;
  padding: 0 10px !important;
  border: 1px solid var(--aa-linea) !important;
  border-radius: 6px !important;
  color: var(--aa-foresta) !important;
  font-weight: 600;
}
html body .aa-bo-lang .anticon-down { font-size: 10px; }
/* header mobile: lente nello stesso riquadro da 40px della campanella, allineati */
html body .q01-mobile-header { align-items: center !important; gap: 8px; }
html body .q01-mobile-header .q01-mobile-header__btn,
html body .q01-mobile-header .ant-btn:has(.anticon-bell) {
  width: 40px !important;
  height: 40px !important;
  display: inline-grid !important;
  place-items: center;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid var(--aa-linea) !important;
  border-radius: 6px !important;
  background: #fff !important;
}
html body .q01-mobile-header .q01-mobile-header__btn .anticon,
html body .q01-mobile-header .anticon-bell { font-size: 18px !important; }
html body .q01-mobile-header .ant-badge { display: inline-flex; }

/* ===== Barra superiore col menu orizzontale (slot Layout, desktop) =====
   Come 04_mockup/results.html: bianca, 68px, filetto Linea sotto; schede Ardesia, attiva Foresta sottolineata Verde. */
html body .aa-topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 48px;
  background: #fff;
  border-bottom: 1px solid var(--aa-linea);
}
html body .aa-topnav-logo { display: flex; align-items: center; flex: none; }
html body .aa-topnav-logo img { height: 28px; width: auto; }
html body .aa-topnav .aa-topnav-menu {
  flex: 1;
  min-width: 0;
  height: 68px;
  line-height: 66px;
  border-bottom: 0 !important;
  background: transparent !important;
  justify-content: center;
}
html body .aa-topnav .aa-topnav-menu > .ant-menu-item,
html body .aa-topnav .aa-topnav-menu > .ant-menu-submenu {
  padding-inline: 16px !important;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--aa-ardesia) !important;
}
html body .aa-topnav .aa-topnav-menu > .ant-menu-item a,
html body .aa-topnav .aa-topnav-menu .ant-menu-submenu-title { color: inherit !important; }
html body .aa-topnav .aa-topnav-menu > :is(.ant-menu-item, .ant-menu-submenu)::after {
  inset-inline: 16px !important;
  border-bottom-width: 2px !important;
  border-bottom-color: transparent !important;
}
html body .aa-topnav .aa-topnav-menu > :is(.ant-menu-item-selected, .ant-menu-submenu-selected) {
  color: var(--aa-foresta) !important;
  font-weight: 600;
}
html body .aa-topnav .aa-topnav-menu > :is(.ant-menu-item-selected, .ant-menu-submenu-selected)::after {
  border-bottom-color: var(--aa-verde) !important;
}
html body .aa-topnav .aa-topnav-menu > :is(.ant-menu-item, .ant-menu-submenu):hover { color: var(--aa-foresta) !important; }
html body .aa-topnav .aa-topnav-menu > :is(.ant-menu-item, .ant-menu-submenu):hover::after { border-bottom-color: var(--aa-linea) !important; }
html body .aa-topnav-right { display: flex; align-items: center; gap: 12px; flex: none; }
html body .aa-topnav-right .ant-btn {
  height: 40px !important;
  padding: 0 10px !important;
  border: 1px solid var(--aa-linea) !important;
  border-radius: 6px !important;
  color: var(--aa-foresta) !important;
  font-weight: 600;
}
html body .aa-topnav-user { border: 0; padding: 0; background: transparent; cursor: pointer; }
html body .aa-topnav-user__avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--aa-foresta);
  color: #fff;
  font: 600 13px/1 var(--aa-font-titoli);
}
/* tendina delle sezioni: gruppi come eyebrow, voci Foresta, attiva su Tinta */
html body .aa-topnav-popup .ant-menu {
  padding: 8px !important;
  border-radius: 10px !important;
  border: 1px solid var(--aa-linea);
  box-shadow: 0 1px 2px rgba(25, 64, 38, 0.06), 0 8px 24px rgba(25, 64, 38, 0.08) !important;
  min-width: 240px;
}
html body .aa-topnav-popup .ant-menu-item-group-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aa-ardesia) !important;
  padding: 10px 12px 4px !important;
}
html body .aa-topnav-popup .ant-menu-item {
  border-radius: 6px !important;
  height: 36px !important;
  line-height: 36px !important;
  color: var(--aa-foresta) !important;
}
html body .aa-topnav-popup .ant-menu-item a { color: inherit !important; }
html body .aa-topnav-popup .ant-menu-item:hover { background: var(--aa-carta) !important; }
html body .aa-topnav-popup .ant-menu-item-selected { background: var(--aa-tinta) !important; font-weight: 600; }
/* contenuto: margini del mockup (48px ai lati) */
@media (min-width: 992px) {
  html body .ant-layout:has(> .aa-topnav) .ant-layout-content > div { padding: 32px 48px !important; }
}
/* il layout del kit senza sider si mette in riga (hasSider): con la barra superiore va in colonna */
html body .ant-layout:has(> .aa-topnav) { flex-direction: column !important; }
html body .ant-layout:has(> .aa-topnav) > .ant-layout { width: auto !important; flex: 1; }
/* campanella nella barra superiore: riquadro da 40px come la lingua; il kit colora l'icona di bianco (inline) */
html body .aa-topnav-bell .ant-btn { width: 40px !important; padding: 0 !important; }
html body .aa-topnav-bell .anticon-bell { color: var(--aa-foresta) !important; font-size: 18px !important; }
/* Login di Adeguati Assetti: 04_mockup/login.html del kit di brand (1440x900), adattato a schermi diversi.
   Variabili --aa-* in brand.css. */

.aa-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: var(--aa-carta);
  color: var(--aa-foresta);
  font-family: var(--aa-font-testo);
}

/* ---------- Colonna del form ---------- */
.aa-login-form-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 64px 40px;
}
.aa-login-form {
  width: 100%;
  max-width: 400px;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.aa-login-logo { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.aa-login-logo > img { height: 34px; width: auto; }
.aa-signature { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--aa-ardesia); }
.aa-signature img { height: 20px; width: auto; }
.aa-login h1 {
  font-family: var(--aa-font-titoli) !important;
  font-weight: 600;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--aa-foresta);
  margin: 0;
}
.aa-login-sub { color: var(--aa-ardesia); margin: 8px 0 0; font-size: 15px; line-height: 1.5; }

.aa-login .ant-form-item { margin-bottom: 20px; }
.aa-login .ant-form-item-label > label { font-weight: 600; font-size: 14px; color: var(--aa-foresta); }
.aa-login .ant-input-affix-wrapper {
  height: 48px;
  border-radius: 6px;
  border-color: var(--aa-linea-forte);
  font-size: 15px;
}
.aa-login .ant-input-affix-wrapper .anticon { color: var(--aa-ardesia); }
.aa-login .ant-input-affix-wrapper-focused,
.aa-login .ant-input-affix-wrapper:focus-within {
  border-color: var(--aa-verde);
  box-shadow: 0 0 0 3px var(--aa-tinta);
}
.aa-login-row { display: flex; justify-content: flex-end; margin: -4px 0 20px; font-size: 14px; }
.aa-link { color: var(--aa-bosco); font-weight: 600; text-decoration: none; }
.aa-link:hover { color: var(--aa-foresta); }
.aa-login .aa-btn { height: 48px; border-radius: 6px; font-weight: 600; font-size: 15px; background: var(--aa-bosco); }
.aa-login .aa-btn:not(:disabled):hover { background: var(--aa-foresta) !important; }
.aa-legal { font-size: 12.5px; color: var(--aa-ardesia); }

/* ---------- Pannello brand ---------- */
.aa-login-brand {
  background: var(--aa-foresta);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
}
.aa-login-brand-top { position: relative; z-index: 2; }
.aa-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.aa-eyebrow-lime { color: var(--aa-lime); }
.aa-eyebrow-verde { color: var(--aa-verde); }
.aa-payoff {
  font-family: var(--aa-font-titoli) !important;
  font-weight: 600;
  font-size: clamp(48px, 5.3vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin-top: 20px;
  color: #fff;
}
.aa-login-brand p { color: var(--aa-muted-scuro); font-size: 17px; line-height: 1.55; max-width: 470px; margin: 24px 0 0; }
.aa-mods { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.aa-mods span {
  border: 1px solid var(--aa-linea-scuro);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
}
.aa-mods span i { width: 8px; height: 10px; border-radius: 1.5px; background: var(--aa-lime); }
.aa-mods small { font-weight: 400; color: var(--aa-muted-scuro); font-size: 13px; }

.aa-preview {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 430px;
  background: #fff;
  color: var(--aa-foresta);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.aa-preview-top { display: flex; justify-content: space-between; align-items: center; }
.aa-tag { font-size: 12px; font-weight: 600; color: var(--aa-ardesia); background: var(--aa-tinta); border-radius: 4px; padding: 3px 10px; }
.aa-prow { display: flex; align-items: center; gap: 16px; }
.aa-big { font: 700 64px/1 var(--aa-font-titoli); font-family: var(--aa-font-titoli) !important; }
.aa-sc { font-weight: 600; font-size: 20px; line-height: 1.3; }
.aa-sc small { color: var(--aa-ardesia); font-weight: 400; }
.aa-sc .aa-sc-label { font-size: 14px; }
.aa-mini { display: grid; gap: 8px; }
.aa-mini div { display: grid; grid-template-columns: 170px 1fr 40px; gap: 12px; align-items: center; font-size: 13px; }
.aa-mini b { display: block; height: 8px; border-radius: 2px; background: var(--aa-superficie-2); position: relative; overflow: hidden; }
.aa-mini b s { position: absolute; inset: 0 auto 0 0; background: var(--aa-verde); }
.aa-mini em { font-style: normal; font-weight: 600; text-align: right; }

.aa-grid4 { display: inline-grid; grid-template-columns: repeat(2, 26px); gap: 5px; }
.aa-grid4 i { display: block; width: 26px; height: 26px; border-radius: 5px; border: 1.5px solid var(--aa-linea-forte); }
.aa-grid4 i.on { background: var(--aa-verde); border-color: var(--aa-verde); }
.aa-grid4-dark i { border-color: var(--aa-linea-scuro); }
.aa-grid4-dark i.on { background: var(--aa-lime); border-color: var(--aa-lime); }

.aa-motif {
  position: absolute;
  right: -28px;
  bottom: -28px;
  display: grid;
  grid-template-columns: repeat(7, 56px);
  gap: 12px;
  opacity: 0.9;
  z-index: 1;
}
.aa-motif i { width: 56px; height: 56px; border-radius: 8px; border: 1.5px solid var(--aa-linea-scuro); }
.aa-motif i.on { background: var(--aa-lime); border-color: var(--aa-lime); opacity: 0.22; }

/* Sotto 900px resta solo la colonna del form (leggibile da 360px). */
@media (max-width: 900px) {
  .aa-login { grid-template-columns: 1fr; }
  .aa-login-brand { display: none; }
  .aa-login-form-side { padding: 32px 20px 24px; }
  .aa-login h1 { font-size: 30px; }
}
