/**
 * Generale - tipografia, link, modali, pagine e componenti non legati al layout aside.
 * Caricato da tutti i layout (guest, bootstrap).
 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Roboto+Condensed:wght@400;500;700&family=Roboto+Slab:wght@400;500;700&display=swap');

/* === CSS partitions (page-specific, migrated from inline) === */
@import url('partitions/_admin_aste.css');
@import url('partitions/_admin_astro_effetti.css');
@import url('partitions/_admin_aumenti.css');
@import url('partitions/_admin_badge.css');
@import url('partitions/_admin_calendario.css');
@import url('partitions/_admin_caratteristiche.css');
@import url('partitions/_admin_corp.css');
@import url('partitions/_admin_crafting.css');
@import url('partitions/_admin_faq.css');
@import url('partitions/_admin_griglie.css');
@import url('partitions/_admin_incanti.css');
@import url('partitions/_admin_indagini.css');
@import url('partitions/_admin_layout_config.css');
@import url('partitions/_admin_legami.css');
@import url('partitions/_admin_mana.css');
@import url('partitions/_admin_manuale.css');
@import url('partitions/_admin_maps.css');
@import url('partitions/_admin_mercato_extra.css');
@import url('partitions/_admin_meteo.css');
@import url('partitions/_admin_missioni.css');
@import url('partitions/_admin_news.css');
@import url('partitions/_admin_oggetto.css');
@import url('partitions/_admin_permessi.css');
@import url('partitions/_admin_radio.css');
@import url('partitions/_admin_risorse.css');
@import url('partitions/_admin_rumor.css');
@import url('partitions/_admin_rumor_requisiti.css');
@import url('partitions/_admin_ruoli_attributi.css');
@import url('partitions/_admin_skill.css');
@import url('partitions/_admin_social.css');
@import url('partitions/_admin_social_profile.css');
@import url('partitions/_admin_tenore.css');
@import url('partitions/_admin_ticket.css');
@import url('partitions/_admin_tipo_ticket.css');
@import url('partitions/_admin_tratti.css');
@import url('partitions/_admin_tutorial.css');
@import url('partitions/_admin_vantaggi.css');
@import url('partitions/_admin_vantaggi_attributi.css');
@import url('partitions/_anagrafe.css');
@import url('partitions/_banca.css');
@import url('partitions/_background.css');
@import url('partitions/_calendario.css');
@import url('partitions/_compendio.css');
@import url('partitions/_tipo_badge_palette.css');
@import url('partitions/_crafting.css');
@import url('partitions/_forum.css');
@import url('partitions/_forum_assenze.css');
@import url('partitions/_forum_compose.css');
@import url('partitions/_game_map.css');
@import url('partitions/_gestione.css');
@import url('partitions/_helpdesk.css');
@import url('partitions/_home.css');
@import url('partitions/_impieghi.css');
@import url('partitions/_log_personaggio.css');
@import url('partitions/_login.css');
@import url('partitions/_logout.css');
@import url('partitions/_logs_access.css');
@import url('partitions/_logs_duplicate_ip.css');
@import url('partitions/_logs_forum.css');
@import url('partitions/_logs_messaggi.css');
@import url('partitions/_map.css');
@import url('partitions/_map_area.css');
@import url('partitions/_interactive_map.css');
@import url('partitions/_mercato.css');
@import url('partitions/_mercato_potenziamenti.css');
@import url('partitions/_messaggi.css');
@import url('partitions/_news.css');
@import url('partitions/_presenti.css');
@import url('partitions/_radio.css');
@import url('partitions/_register.css');
@import url('partitions/_risorse.css');
@import url('partitions/_rumors.css');
@import url('partitions/_scheda.css');
@import url('partitions/_settings.css');
@import url('partitions/_social.css');
@import url('partitions/_sondaggi.css');
@import url('partitions/_spunti.css');
@import url('partitions/_spunti_archivio.css');
@import url('partitions/_staff.css');
@import url('partitions/_stats.css');
@import url('partitions/_test_news_queries.css');
/* === end CSS partitions === */


/* Compensazione UI (HiDPI + 1366�768 / 1280�720): layout_bootstrap.css, html.app-html-shell --app-scale-dpr / --app-scale-vp. */

/* Base dark-friendly defaults for current layout */
:root {
  --atp-body-text: #cecece;
  --atp-chrome-muted: #a8a7a7;
  --atp-custom-btn-bg: linear-gradient(145deg, rgba(33, 37, 41, 0.58), rgba(19, 21, 23, 0.65));
  --atp-custom-btn-color: #f8f9fa;
  --atp-custom-btn-font-size: 11px;
  --atp-custom-btn-padding: 10px 20px;
  --atp-custom-btn-glow: 0 0 6px rgba(248, 249, 250, 0.55), 0 0 12px rgba(248, 249, 250, 0.3);
  --atp-custom-btn-svg-glow: drop-shadow(0 0 4px rgba(248, 249, 250, 0.65)) drop-shadow(0 0 8px rgba(248, 249, 250, 0.35));
}

html, body {
  background-color: #121212;
  color: var(--atp-body-text);
  margin: 0;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  scrollbar-width: thin;
  scrollbar-color: rgba(52, 58, 64, 0.95) transparent;
}

/* Semantic text accents (sostituiscono le utility Bootstrap text-*) */
.atp-text-danger {
  color: #d12444 !important;
}

.atp-text-success {
  color: #58a9a3 !important;
}

.atp-text-warning {
  color: #ffbe75 !important;
}

/* Scrollbar globale: sottile, arrotondata, track trasparente */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: rgba(52, 58, 64, 0.95);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: rgba(73, 80, 87, 0.98);
}

a {
  color: inherit;
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  text-transform: uppercase;
  font-size: 0.9rem;
}

a:hover {
  color: #fff;
}

.link-secondary,
.link-secondary:hover,
.link-secondary:focus {
  color: inherit;
}

.link-secondary:hover {
  color: #fff;
}

button,
.btn {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif !important;
  text-transform: uppercase;
  font-size: 0.82rem !important;
  letter-spacing: 0.02em;
}

table:not(.exclude-global-style) {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0.45rem;
  overflow: hidden;
  width: 100%;
  background: rgba(19, 21, 23, 0.3) !important;
}

table:not(.exclude-global-style) th,
table:not(.exclude-global-style) td {
  padding: 5px !important;
  border: none !important;
  border-bottom: 1px solid rgba(108, 117, 125, 0.5) !important;
  border-right: 1px solid rgba(108, 117, 125, 0.5) !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

table:not(.exclude-global-style) th:last-child,
table:not(.exclude-global-style) td:last-child {
  border-right: none !important;
}

table:not(.exclude-global-style) > tfoot > tr:last-child > th,
table:not(.exclude-global-style) > tfoot > tr:last-child > td,
table:not(.exclude-global-style) > tbody:last-child > tr:last-child > th,
table:not(.exclude-global-style) > tbody:last-child > tr:last-child > td {
  border-bottom: none !important;
}

.btn-primary {
  background-color: #2f5d8a !important;
  border-color: #2f5d8a !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #254d76 !important;
  border-color: #254d76 !important;
  color: #fff !important;
}

.btn-primary:active,
.btn-primary.active {
  background-color: #1e3d5c !important;
  border-color: #1e3d5c !important;
  color: #fff !important;
}

.btn-secondary {
  background-color: #a6bee9 !important;
  border-color: #a6bee9 !important;
  color: #343a40 !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #8dadd8 !important;
  border-color: #8dadd8 !important;
  color: #343a40 !important;
}

.btn-secondary:active,
.btn-secondary.active {
  background-color: #789dcc !important;
  border-color: #789dcc !important;
  color: #343a40 !important;
}

.btn-warning {
  background-color: #ffbe75 !important;
  border-color: #ffbe75 !important;
  color: #343a40 !important;
}

.btn-warning:hover,
.btn-warning:focus {
  background-color: #f5ad60 !important;
  border-color: #f5ad60 !important;
  color: #343a40 !important;
}

.btn-warning:active,
.btn-warning.active {
  background-color: #e89a4a !important;
  border-color: #e89a4a !important;
  color: #343a40 !important;
}

.btn-danger {
  background-color: #d12444 !important;
  border-color: #d12444 !important;
  color: #fff !important;
}

.btn-danger:hover,
.btn-danger:focus {
  background-color: #b81e3a !important;
  border-color: #b81e3a !important;
  color: #fff !important;
}

.btn-danger:active,
.btn-danger.active {
  background-color: #9e1931 !important;
  border-color: #9e1931 !important;
  color: #fff !important;
}

/* Toast e alert inline — palette feedback engine */
:root {
  --atp-feedback-success: #58a9a3;
  --atp-feedback-danger: #d12444;
  --atp-feedback-warning: #ffbe75;
  --atp-feedback-text-dark: #1a1d21;
  --atp-feedback-text-light: #f8f9fa;
  --atp-feedback-success-bg-soft: color-mix(in srgb, var(--atp-feedback-success) 32%, #d8ebe9);
  --atp-feedback-warning-bg-soft: color-mix(in srgb, var(--atp-feedback-warning) 38%, #f5e8d8);
  --atp-feedback-danger-bg-soft: color-mix(in srgb, var(--atp-feedback-danger) 30%, #3d1520);
}

/* Toast (solido) */
.toast.text-bg-success {
  background-color: var(--atp-feedback-success) !important;
  color: var(--atp-feedback-text-dark) !important;
}

.toast.text-bg-danger {
  background-color: var(--atp-feedback-danger) !important;
  color: var(--atp-feedback-text-light) !important;
}

.toast.text-bg-warning,
.toast.text-bg-secondary {
  background-color: var(--atp-feedback-warning) !important;
  color: var(--atp-feedback-text-dark) !important;
}

.toast.text-bg-success .btn-close,
.toast.text-bg-warning .btn-close,
.toast.text-bg-secondary .btn-close,
.toast.text-bg-success .btn-close-white,
.toast.text-bg-warning .btn-close-white,
.toast.text-bg-secondary .btn-close-white {
  filter: none;
  opacity: 0.7;
}

.toast.text-bg-success .btn-close:hover,
.toast.text-bg-warning .btn-close:hover,
.toast.text-bg-secondary .btn-close:hover,
.toast.text-bg-success .btn-close-white:hover,
.toast.text-bg-warning .btn-close-white:hover,
.toast.text-bg-secondary .btn-close-white:hover {
  opacity: 1;
}

/* Alert inline (sfondo più chiaro, stessa logica cromatica) */
.alert-success {
  background-color: #d8ebe9 !important;
  background-color: var(--atp-feedback-success-bg-soft) !important;
  border-color: rgba(88, 169, 163, 0.55) !important;
  border-color: color-mix(in srgb, var(--atp-feedback-success) 55%, transparent) !important;
  color: var(--atp-feedback-text-dark) !important;
}

.alert-danger {
  background-color: #4a1f28 !important;
  background-color: var(--atp-feedback-danger-bg-soft) !important;
  border-color: rgba(209, 36, 68, 0.55) !important;
  border-color: color-mix(in srgb, var(--atp-feedback-danger) 55%, transparent) !important;
  color: var(--atp-feedback-text-light) !important;
}

.alert-warning,
.alert-secondary {
  background-color: #f5e8d8 !important;
  background-color: var(--atp-feedback-warning-bg-soft) !important;
  border-color: rgba(255, 190, 117, 0.65) !important;
  border-color: color-mix(in srgb, var(--atp-feedback-warning) 60%, transparent) !important;
  color: var(--atp-feedback-text-dark) !important;
}

.alert-info {
  background-color: #f5e8d8 !important;
  background-color: var(--atp-feedback-warning-bg-soft) !important;
  border-color: rgba(255, 190, 117, 0.5) !important;
  border-color: color-mix(in srgb, var(--atp-feedback-warning) 50%, transparent) !important;
  color: var(--atp-feedback-text-dark) !important;
}

.alert-success .btn-close,
.alert-warning .btn-close,
.alert-secondary .btn-close,
.alert-info .btn-close {
  filter: none;
}

.alert-danger .btn-close {
  filter: var(--bs-btn-close-white-filter, invert(1) grayscale(100%) brightness(200%));
}

/* Dialog behavior/layout: one consistent style for all mini dialogs */
.modal {
  z-index: 10060;
}

.modal-backdrop {
  z-index: 10050;
}

.modal .modal-footer {
  justify-content: center !important;
}

.modal-content {
  border: 0 !important;
  color: var(--atp-body-text);
}

.modal-content .form-control,
.modal-content .form-select,
.modal-content .form-control:focus,
.modal-content .form-select:focus,
.chat-page__commands .form-control,
.chat-page__commands .form-select,
.chat-page__commands .form-control:focus,
.chat-page__commands .form-select:focus,
.helpdesk-page .bbcode-editor-wrap .bbcode-toolbar .btn {
  color: var(--atp-body-text);
}

/* Elementi testuali in corsivo ([i] <i> <em>) */
em, i {
  font-family: "Roboto Slab", "Times New Roman", serif;
  font-style: italic;
}

/* Elementi testuali in sottolineato ([u] <u> ecc.) */
u {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-style: dotted;
}

/* Elementi testuali in grassetto ([b] <b> ecc.) */
strong, b {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  text-transform: uppercase;
  font-weight: 700;
}

/* Elementi testuali in formato titolo ([h1], <h1>, [h2], <h2>, ecc.) */
h1, h2, h3, h4, h5, h6 {
  font-family: "Roboto Slab", "Times New Roman", serif;
}

.bg-dark {
  background-color: #212529 !important;
}

/* Guest/topbar icon links */
a.icon-link,
a.icon-link:hover,
a.icon-link:focus,
a.icon-link:active {
  text-decoration: none !important;
}

a.icon-link svg {
  width: 28px;
  height: 28px;
  display: inline-block;
  vertical-align: middle;
}

/* Login/registrati: stesso vetro delle barre guest + ombra */
.auth-login-card {
  background: linear-gradient(145deg, rgba(33, 37, 41, 0.58), rgba(19, 21, 23, 0.65)) !important;
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.55), 0 0.25rem 0.65rem rgba(0, 0, 0, 0.4) !important;
}

.auth-login-card .card-header,
.auth-login-card .card-body {
  background: transparent !important;
  border-bottom: 0 !important;
}

/* Linguette: attiva = sfondo card; inattiva = più scura + testo #cecece */
.auth-login-card .nav-tabs.card-header-tabs {
  border-bottom: 0;
  --bs-nav-tabs-border-width: 0;
  --bs-nav-tabs-border-color: transparent;
  --bs-nav-tabs-link-active-bg: transparent;
  --bs-nav-tabs-link-active-border-color: transparent;
  --bs-nav-tabs-link-hover-border-color: transparent;
}

.auth-login-card .nav-tabs .nav-link {
  background: rgba(0, 0, 0, 0.4) !important;
  color: #cecece !important;
  border: 0 !important;
  border-radius: 0.375rem 0.375rem 0 0;
}

.auth-login-card .nav-tabs .nav-link:hover,
.auth-login-card .nav-tabs .nav-link:focus-visible {
  color: #e8e8e8 !important;
  background: rgba(0, 0, 0, 0.5) !important;
}

.auth-login-card .nav-tabs .nav-link.active {
  background: transparent !important;
  color: #f8f9fa !important;
}

/* Icone input: stesso bg/bordo degli input, stessa altezza del form-floating */
.auth-login-card .input-group {
  align-items: stretch;
  flex-wrap: nowrap;
}

.auth-login-card .input-group > .form-floating {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0 !important;
}

.auth-login-card .input-group-text {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  height: auto;
  min-height: calc(3.5rem + 2px);
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(160, 170, 180, 0.25) !important;
  color: #cecece;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35);
}

.presenti-ext-list .presenti-empty {
  color: #868e96;
  font-size: 0.9rem;
  padding-left: 0.35rem;
}

.presenti-ext-page {
  background: transparent;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.presenti-ext-top-fixed {
  position: sticky;
  top: 0;
  z-index: 5;
  background: transparent;
  flex: 0 0 auto;
}

.presenti-ext-nav {
  background-color: rgba(19, 21, 23, 0.5);
  border: 0;
  border-radius: 8px;
}

.presenti-sottonick-input {
  padding-right: 4.5rem !important;
}

.presenti-ext-page .presenti-self-save-btn {
  height: calc(3.5rem + 2px);
  min-height: calc(3.5rem + 2px);
  box-sizing: border-box;
}

.presenti-sottonick-counter {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  color: #adb5bd;
  pointer-events: none;
  z-index: 4;
}

.presenti-ext-group {
  margin-bottom: 1rem;
}

.presenti-ext-title {
  text-align: center;
  font-family: "Roboto Slab", "Times New Roman", serif;
  text-transform: uppercase;
  color: #f8f9fa;
  margin: 0 auto 0.55rem auto;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  display: inline-block;
  padding: 0.12rem 0.7rem;
  border-radius: 6px;
  background-color: rgba(33, 37, 41, 0.88);
  border: 0;
}

.presenti-ext-subtitle {
  text-align: center;
  color: #f8f9fa;
  margin: 0.45rem auto;
  font-size: 1.05rem;
  font-family: "Roboto Slab", "Times New Roman", serif;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  display: inline-block;
  padding: 0.08rem 0.55rem;
  border-radius: 6px;
  background-color: rgba(33, 37, 41, 0.82);
  border: 0;
}

.presenti-ext-count {
  margin-left: 0.35rem;
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  text-transform: uppercase;
  font-size: 0.66rem;
  font-weight: 500;
  color: #ced4da;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.presenti-ext-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.presenti-ext-cards-map {
  justify-content: center;
}

.presenti-ext-cards-location {
  justify-content: center;
}

.presenti-ext-locations-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: stretch;
}

.presenti-ext-location-block {
  flex: 1 1 420px;
  min-width: 360px;
  display: flex;
  flex-direction: column;
}

.js-presence-location-title {
  cursor: pointer;
}

.presenti-ext-block {
  border: none;
  border-radius: 10px;
  background-color: rgba(33, 37, 41, 0.5);
  padding: 1rem 1rem 1.3rem 1rem;
}

.presenti-ext-block-map {
  border: none;
  border-radius: 10px;
  background-color: rgba(33, 37, 41, 0.5);
  padding: 1rem 1rem 1.3rem 1rem;
}

.presenti-ext-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-top: 0.95rem;
}

.presenti-ext-toolbar {
  margin-bottom: 0.85rem !important;
}

.presenti-ext-subtitle {
  text-align: left;
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card.custom-card {
  --mercato-offerta-propic: 100px;
  --mercato-offerta-gap: 10px;
  --mercato-offerta-accent: #58a9a3;
  --mercato-offerta-accent-text: #2a6b66;
  --presenti-box-margin-v: 10px;
  --presenti-box-h: calc(var(--mercato-offerta-propic) + var(--presenti-box-margin-v) * 2);
  --presenti-name-size: 0.85rem;
  --presenti-name-line-h: calc(var(--presenti-name-size) * 1.2);
  --presenti-accent-pad: 10px;
  --presenti-accent-h: calc(var(--presenti-name-line-h) + var(--presenti-accent-pad) * 2);
  --presenti-body-h: calc(var(--presenti-box-h) - var(--presenti-accent-h));
  --presenti-mini-icon: 16px;
  --presenti-mini-pad: 3px;
  --presenti-mini: calc(var(--presenti-mini-icon) + var(--presenti-mini-pad) * 2 + 4px);
  --presenti-mini-gap: 4px;
  position: relative;
  flex: 0 1 360px;
  max-width: 360px;
  width: 100%;
  padding: 0 !important;
  overflow: visible;
  color: #cecece;
  margin: 0;
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card[data-presenti-status="0"] {
  --mercato-offerta-accent: #a6bee9;
  --mercato-offerta-accent-text: #2f5d8a;
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card[data-presenti-status="1"] {
  --mercato-offerta-accent: #58a9a3;
  --mercato-offerta-accent-text: #2a6b66;
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card[data-presenti-status="2"] {
  --mercato-offerta-accent: #ffbe75;
  --mercato-offerta-accent-text: #6b4423;
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card[data-presenti-status="3"] {
  --mercato-offerta-accent: #eea294;
  --mercato-offerta-accent-text: #7a3d32;
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card .mercato-offerta-card__top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  box-sizing: border-box;
  height: var(--presenti-accent-h);
  min-height: var(--presenti-accent-h);
  padding: var(--presenti-accent-pad) var(--mercato-offerta-gap);
  padding-left: calc(var(--mercato-offerta-gap) + var(--mercato-offerta-propic) + var(--mercato-offerta-gap));
  background: var(--mercato-offerta-accent);
  position: relative;
  z-index: 0;
  border-radius: 8px 8px 0 0;
  overflow: visible;
}

.presenti-ext-page .presenti-ext-card__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  flex: 0 0 auto;
  position: relative;
  z-index: 5;
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card .mercato-offerta-card__name {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  text-transform: uppercase;
  font-size: var(--presenti-name-size);
  font-weight: 600;
  line-height: 1.2;
  flex: 0 1 auto;
  color: var(--mercato-offerta-accent-text);
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card .mercato-offerta-card__name:hover,
.presenti-ext-page .mercato-offerta-card.presenti-ext-card .mercato-offerta-card__name:focus {
  color: var(--mercato-offerta-accent-text);
}

.presenti-ext-page .presenti-ext-card__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  flex: 0 1 auto;
  flex-wrap: wrap;
}

.presenti-ext-page .presenti-ext-card__perm {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
}

.presenti-ext-page .presenti-ext-card__mp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  line-height: 0;
  font-size: 0;
  border-radius: 50%;
  background: rgba(19, 21, 23, 0.5);
  color: #f8f9fa;
  text-decoration: none;
  text-transform: none;
  box-sizing: border-box;
}

.presenti-ext-page .presenti-ext-card__mp:hover,
.presenti-ext-page .presenti-ext-card__mp:focus {
  color: #f8f9fa;
  opacity: 0.85;
  text-decoration: none;
}

.presenti-ext-page .presenti-ext-card__mp .presenti-ext-mp-svg {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
}

.presenti-ext-page .presenti-ext-card__badges {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.presenti-ext-page .presenti-ext-card__mini {
  width: var(--presenti-mini);
  height: var(--presenti-mini);
  padding: var(--presenti-mini-pad);
  border-radius: 50%;
  border: 2px solid var(--mercato-offerta-accent);
  background: #212529;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
  box-sizing: border-box;
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: auto;
  transform: rotate(var(--badge-angle)) translateX(calc(var(--mercato-offerta-propic) / 2)) rotate(calc(-1 * var(--badge-angle))) translate(-50%, -50%);
}

.presenti-ext-page .presenti-ext-card__mini img {
  width: var(--presenti-mini-icon);
  height: var(--presenti-mini-icon);
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card .mercato-offerta-card__body {
  box-sizing: border-box;
  height: var(--presenti-body-h);
  min-height: var(--presenti-body-h);
  padding: 0 var(--mercato-offerta-gap);
  overflow: visible;
  position: relative;
  z-index: 1;
  background-color: rgba(33, 37, 41, 0.92);
  border-radius: 0 0 8px 8px;
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card .mercato-offerta-card__body::after {
  content: "";
  display: table;
  clear: both;
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card .mercato-offerta-card__media {
  float: left;
  clear: left;
  width: var(--mercato-offerta-propic);
  margin-top: calc(var(--presenti-box-margin-v) - var(--presenti-accent-h));
  margin-right: var(--mercato-offerta-gap);
  margin-bottom: 0;
  position: relative;
  z-index: 3;
  overflow: visible;
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card .mercato-offerta-card__img {
  width: var(--mercato-offerta-propic);
  height: var(--mercato-offerta-propic);
  border-radius: 50%;
  border: 2px solid var(--mercato-offerta-accent);
  object-fit: cover;
  display: block;
  box-sizing: border-box;
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card .mercato-offerta-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #212529;
  color: #6c757d;
  font-size: 1.25rem;
  font-weight: 600;
}

.presenti-ext-page .mercato-offerta-card.presenti-ext-card .mercato-offerta-card__main.presenti-ext-card__roles {
  position: absolute;
  left: calc(var(--mercato-offerta-gap) + var(--mercato-offerta-propic) + var(--mercato-offerta-gap));
  right: var(--mercato-offerta-gap);
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  align-content: center;
  gap: 6px;
  min-height: 0;
  height: auto;
  overflow: visible;
  padding-top: 0;
  padding-bottom: calc(var(--presenti-name-line-h) + var(--presenti-box-margin-v));
  box-sizing: border-box;
  z-index: 2;
}

.presenti-ext-page .presenti-ext-card__role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 50%;
  background: rgba(19, 21, 23, 0.5);
  flex: 0 0 auto;
  box-sizing: border-box;
}

.presenti-ext-page .presenti-ext-card__role-icon {
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.presenti-ext-page .presenti-ext-card__role--placeholder {
  width: 35px;
  height: 35px;
  color: #6c757d;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
}

.presenti-ext-page .presenti-ext-card__sottonick {
  position: absolute;
  left: calc(var(--mercato-offerta-gap) + var(--mercato-offerta-propic) + var(--mercato-offerta-gap));
  right: var(--mercato-offerta-gap);
  bottom: var(--presenti-box-margin-v);
  font-family: Roboto, Arial, sans-serif;
  font-size: 0.85rem;
  line-height: 1.2;
  color: #cecece;
  z-index: 2;
}

.presenti-ext-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 2px;
  display: inline-block;
}

.presenti-ext-mp-icon {
  color: #ced4da;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.presenti-ext-mp-svg {
  width: 24px;
  height: 24px;
  display: block;
}

.presenti-ext-mp-icon:hover {
  color: #f8f9fa;
  text-decoration: none;
}

.presenti-ext-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.presenti-ext-legend-box {
  border: 0;
  background-color: rgba(52, 58, 64, 0.35);
  border-radius: 6px;
  padding: 0.4rem;
}

.presenti-ext-legend-title {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  color: #ced4da;
  font-weight: 700;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.presenti-ext-legend-items {
  display: grid;
  gap: 0.2rem;
  color: #adb5bd;
}

.presenti-ext-legend-items > div {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Forum: pallino notifica sopra l?icona (stacking + ombra per effetto ?in rilievo?) */
a.aside-forum-icon-link {
  isolation: isolate;
}

a.aside-forum-icon-link svg {
  position: relative;
  z-index: 0;
}

/* Numero topic non letti: cerchio fisso (lati uguali + border-radius 50%), testo centrato.
   display senza !important: altrimenti vince su Bootstrap .d-none e il bollino resta visibile a count 0. */
.aside-forum-unread-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.58rem;
  height: 1.58rem;
  min-width: 1.58rem;
  min-height: 1.58rem;
  max-width: 1.58rem;
  max-height: 1.58rem;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: #fff !important;
  box-sizing: border-box;
  z-index: 20;
  pointer-events: none;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translate(-28%, -58%) !important;
  box-shadow:
    0 0.125rem 0.25rem rgba(0, 0, 0, 0.55),
    0 0.2rem 0.45rem rgba(0, 0, 0, 0.35),
    inset 0 0.06rem 0 rgba(255, 255, 255, 0.4);
  border-width: 2px !important;
}

.aside-module-unread-dot {
  width: 1.26rem;
  height: 1.26rem;
  min-width: 1.26rem;
  min-height: 1.26rem;
  max-width: 1.26rem;
  max-height: 1.26rem;
  font-size: 0.55rem;
}

/* =======================================================================
   Sondaggi panel: stile visivo per il container panel (non custom-card)
   ======================================================================= */
.sondaggi-page .border.border-secondary.rounded-3.bg-dark {
  background: rgba(19, 21, 23, 0.58) !important;
  border: 1px solid rgba(160, 170, 180, 0.25) !important;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Forum index card footer consistent style */
.forum-index-card .card-footer {
  border-color: rgba(160, 170, 180, 0.18) !important;
  background: rgba(15, 17, 19, 0.4) !important;
}

/* Global input/select: presenti-box gradient border + background */
.form-control,
.form-select {
  border: 1px solid rgba(160, 170, 180, 0.25) !important;
  background: rgba(0, 0, 0, 0.5) !important;
  color: #cecece;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.form-control:hover,
.form-select:hover {
  border-color: rgba(180, 190, 200, 0.45) !important;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35), 0 0 6px rgba(160, 175, 190, 0.15);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(180, 190, 200, 0.6) !important;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35), 0 0 8px rgba(160, 175, 190, 0.25);
  outline: none;
}

/* Form-select dark mode option fix (solo select singoli) */
.form-select:not([multiple]) option {
  background-color: #212529;
  color: #f8f9fa;
}
.form-select:not([multiple]) option:checked {
  background: linear-gradient(0deg, #343a40 0%, #343a40 100%);
  color: #a8a7a7;
}

/* Select multipli: option senza fill proprio; selezione nativa + testo chiaro */
.form-select[multiple] option,
select[multiple] option {
  background-color: transparent !important;
  background-image: none !important;
  background: transparent !important;
  color: #f8f9fa;
}

.form-select[multiple] option:checked,
select[multiple] option:checked,
.form-select[multiple]:focus option:checked,
select[multiple]:focus option:checked {
  /* background forzato: lo stile base (transparent !important) nasconde l'evidenziazione nativa */
  background-color: #0d6efd !important;
  background-image: linear-gradient(0deg, #0d6efd 0%, #0d6efd 100%) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

.form-select[multiple] option:disabled,
select[multiple] option:disabled {
  color: #6c757d !important;
  -webkit-text-fill-color: #6c757d;
}

/* Placeholder text-secondary fix */
.form-control::placeholder {
  color: #6c757d !important;
  opacity: 1;
}

/* Social notification icon hover */
.social-notification-icon svg {
  transition: fill 0.2s ease;
}

.social-notification-icon:hover svg {
  fill: #ffffff !important;
}

/* Social post divider */
.social-post-divider {
  width: 100%;
  border-bottom: 1px solid #495057;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.social-story-ring {
  box-shadow:
    0 0 0 2px rgba(80, 245, 255, 0.96),
    0 0 7px rgba(80, 245, 255, 0.82),
    0 0 12px rgba(80, 245, 255, 0.58);
}

.social-story-choice-menu {
  position: fixed;
  z-index: 3000;
  min-width: 170px;
  background: rgba(20, 20, 20, 0.98);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.social-story-choice-menu a {
  display: block;
  color: #6c757d;
  text-decoration: none;
  font-size: 11px;
  padding: 7px 8px;
  border-radius: 6px;
  text-align: center;
}

.social-story-choice-menu a + a {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.social-story-choice-menu a:hover {
  background: rgba(108, 117, 125, 0.3);
  color: #fff;
}

/* Tab/pill button containers — solo layout, nessuno stile sui bottoni */
.gilde-floating-tabs,
.nav-tabs.nav-tabs-dark {
  --bs-nav-tabs-border-width: 0;
  --bs-nav-tabs-border-color: transparent;
  --bs-nav-tabs-link-active-bg: transparent;
  --bs-nav-tabs-link-active-border-color: transparent;
  --bs-nav-tabs-link-hover-border-color: transparent;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  border: 0;
  border-bottom: 0;
}

.nav-tabs.nav-tabs-dark.overflow-auto,
.nav-tabs.nav-tabs-dark.flex-nowrap.overflow-auto,
.nav-tabs.nav-tabs-dark.helpdesk-tabs-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.map-search-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  border: 0 !important;
  border-radius: 10px !important;
  background: rgba(19, 21, 23, 0.3) !important;
  box-shadow: none !important;
  outline: none !important;
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  color: var(--atp-custom-btn-color) !important;
  padding: var(--atp-custom-btn-padding) !important;
  font-family: 'Roboto Condensed', 'Roboto', Arial, sans-serif;
  text-transform: uppercase;
  font-size: var(--atp-custom-btn-font-size);
  line-height: 1.25;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.25s ease;
}

.map-search-fab:focus {
  outline: none !important;
}

.map-search-fab:hover,
.map-search-fab:focus-visible,
.map-search-fab.active,
.map-search-fab.is-active {
  color: var(--atp-custom-btn-color) !important;
  text-shadow: var(--atp-custom-btn-glow);
}

.map-search-fab:hover,
.map-search-fab:focus-visible {
  transform: translateY(-2px);
}

.map-search-fab.active,
.map-search-fab.is-active {
  font-weight: 600;
}

.map-search-fab:hover svg,
.map-search-fab:focus-visible svg,
.map-search-fab.active svg,
.map-search-fab.is-active svg {
  color: var(--atp-custom-btn-color) !important;
  filter: var(--atp-custom-btn-svg-glow);
}

.map-search-fab-icon {
  width: 19px;
  height: 19px;
  display: inline-flex;
  flex: 0 0 19px;
}

.map-search-fab-icon svg {
  width: 19px;
  height: 19px;
}

.map-search-fab-label {
  white-space: nowrap;
}

.map-search-fab-wrap {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  z-index: 8;
  overflow: visible;
}

.map-search-panel {
  position: absolute;
  left: 50%;
  top: 60px;
  transform: translateX(-50%);
  width: max-content;
  min-width: 320px;
  max-width: min(1200px, calc(100vw - 40px));
  max-height: 420px;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  z-index: 9;
  background: linear-gradient(145deg, rgba(33, 37, 41, 0.72), rgba(19, 21, 23, 0.78));
  backdrop-filter: blur(14px) saturate(1.15);
  color: #e8ecf4;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.72),
    0 0 28px rgba(77, 184, 201, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.map-search-form {
  width: 300px;
  max-width: 100%;
  margin-inline: auto;
}

.map-search-panel-head {
  text-align: center;
}

.map-search-results {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  overflow-y: auto;
  max-height: 290px;
}

.map-search-result-card {
  flex: 0 1 220px;
  min-width: 200px;
  max-width: 280px;
}

.map-search-result__title {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  text-transform: uppercase;
  color: #f8f9fa;
}

.map-search-result__preview {
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-weight: 400;
  color: #cecece;
}

.map-wrapper {
  overflow: visible;
}

/* Modale area mappa: cresce col contenuto fino al limite viewport; scroll solo lista chat */
.map-area-preview-frame {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.map-area-cure-badge {
  background-color: #58a9a3;
  color: #fff;
  font-weight: 500;
}

.map-area-chat-meta {
  max-width: 200px;
  align-self: flex-start;
  text-align: left;
}

.map-area-pericolo-wrap {
  justify-content: flex-start;
}

.map-area-pericolo-label {
  color: #f8f9fa;
}

.map-area-pericolo-indicator {
  display: flex;
  gap: 2px;
}

.map-area-pericolo-bar {
  width: 6px;
  height: 12px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.map-area-pericolo-bar.active-0 {
  background: #198754;
}

.map-area-pericolo-bar.active-1 {
  background: #ffc107;
}

.map-area-pericolo-bar.active-2 {
  background: #fd7e14;
}

.map-area-pericolo-bar.active-3 {
  background: #dc3545;
}

.map-area-pericolo-bar.map-area-densita-active {
  background: #58a9a3;
}

.map-area-elementi-wrap {
  flex-wrap: nowrap;
}

.map-area-elementi-label {
  flex: 0 0 auto;
  padding-top: 0.15rem;
}

.map-area-elementi-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex: 1 1 0;
  min-width: 0;
}

.map-area-elemento-badge {
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.75rem;
  color: #111;
}

.map-area-elemento-0 {
  background: #6c757d;
  color: #fff;
}

.map-area-elemento-1 {
  background: #e85d04;
  color: #fff;
}

.map-area-elemento-2 {
  background: #1d6fb8;
  color: #fff;
}

.map-area-elemento-3 {
  background: #8b5a2b;
  color: #fff;
}

.map-area-elemento-4 {
  background: #8ecae6;
  color: #123;
}

.map-area-elemento-5 {
  background: #ffd60a;
  color: #222;
}

.map-area-elemento-6 {
  background: #9aa0a6;
  color: #111;
}

.map-area-elemento-7 {
  background: #c9a227;
  color: #1a1a1a;
}

.map-area-elemento-8 {
  background: #b8c0cc;
  color: #1a1a1a;
}

.map-area-elemento-9 {
  background: #74c0fc;
  color: #0b2540;
}

.map-area-elemento-10 {
  background: #2d6a4f;
  color: #fff;
}

.map-area-elemento-emoji {
  margin-right: 0.15rem;
}

.map-area-layout__chats {
  min-width: 0;
}

.map-area-chats-scroll {
  overflow-x: hidden;
}

.custom-modal[data-modal="map-area"][data-state="fullscreen"] .modal-body > .map-area-modal-root {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.custom-modal[data-modal="map-area"][data-state="fullscreen"] .map-area-layout {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  align-items: stretch;
}

.custom-modal[data-modal="map-area"][data-state="fullscreen"] .map-area-layout__chats {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.custom-modal[data-modal="map-area"][data-state="fullscreen"] .map-area-chats-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.map-area-modal-root .map-area-chat-description,
.map-area-modal-root .accordion-body .map-area-chat-description {
  color: #cecece !important;
}

/* Stesso stack e corpo del testo di html/body (general.css) ? evita .small sul form che rimpicciolisce tutto */
.sondaggi-page {
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.35;
}

.sondaggi-page .form-control,
.sondaggi-page .form-select,
.sondaggi-page .form-check-label {
  font-family: "Roboto", Arial, Helvetica, sans-serif;
}

.sondaggi-page .form-check-input {
  background-color: #212529;
  border-color: #6c757d;
}

.sondaggi-page .form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.sondaggi-page .form-check-input:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.sondaggi-page .sondaggi-check-badge {
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: help;
  margin-left: 0.25rem;
}

.sondaggi-page .sondaggi-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sondaggi-page .sondaggi-list-item {
  display: block;
  text-decoration: none;
  color: inherit;
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.sondaggi-page a.sondaggi-list-item:hover,
.sondaggi-page a.sondaggi-list-item:focus,
.sondaggi-page a.sondaggi-list-item:active,
.sondaggi-page a.sondaggi-list-item:focus-visible {
  color: inherit;
  text-decoration: none;
  transform: none;
  box-shadow: none;
  outline: none;
}

.sondaggi-page .sondaggi-list-item__title {
  color: #f8f9fa;
}

.sondaggi-page .sondaggi-list-item__sub {
  color: #cecece;
}

.sondaggi-page .sondaggi-badge-aperto {
  background-color: #58a9a3 !important;
  color: #fff !important;
}

.sondaggi-page .sondaggi-badge-chiuso {
  background-color: #d12444 !important;
  color: #fff !important;
}

.sondaggi-page .sondaggi-option-label {
  color: #f8f9fa;
}

.sondaggi-page .sondaggi-option-meta {
  color: #cecece;
}

.sondaggi-page .sondaggi-already-voted {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.375rem 0.75rem;
  border-radius: var(--bs-border-radius, 0.375rem);
  background-color: #d12444;
  border: 1px solid #d12444;
  color: #f8f9fa;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
  user-select: none;
  box-sizing: border-box;
}

.sondaggi-page .sondaggi-vote-saved {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.375rem 0.75rem;
  border-radius: var(--bs-border-radius, 0.375rem);
  background-color: #58a9a3;
  border: 1px solid #58a9a3;
  color: #f8f9fa;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
  user-select: none;
  box-sizing: border-box;
}

.sondaggi-page .sondaggi-votes-detail,
.sondaggi-page .sondaggi-votes-detail .custom-card,
.sondaggi-page .sondaggi-votes-detail .small {
  color: #f8f9fa !important;
}

.sondaggi-page .sondaggi-form-panel .form-floating > label,
.sondaggi-page .sondaggi-form-panel .form-floating > .form-control:focus ~ label,
.sondaggi-page .sondaggi-form-panel .form-floating > .form-control:not(:placeholder-shown) ~ label,
.sondaggi-page .sondaggi-form-panel .form-floating > .form-select ~ label,
.sondaggi-page .sondaggi-form-panel .form-floating > input[type="datetime-local"]:valid ~ label,
body.app-shell .sondaggi-page .sondaggi-form-panel .form-floating > label,
body.app-shell .sondaggi-page .sondaggi-form-panel .form-floating > .form-control:focus ~ label,
body.app-shell .sondaggi-page .sondaggi-form-panel .form-floating > .form-control:not(:placeholder-shown) ~ label,
body.app-shell .sondaggi-page .sondaggi-form-panel .form-floating > .form-select ~ label,
body.app-shell .sondaggi-page .sondaggi-form-panel .form-floating > input[type="datetime-local"]:valid ~ label,
body.app-shell .custom-modal .sondaggi-page .sondaggi-form-panel .form-floating > label,
body.app-shell .custom-modal .sondaggi-page .sondaggi-form-panel .form-floating > .form-control:focus ~ label,
body.app-shell .custom-modal .sondaggi-page .sondaggi-form-panel .form-floating > .form-control:not(:placeholder-shown) ~ label,
body.app-shell .custom-modal .sondaggi-page .sondaggi-form-panel .form-floating > .form-select ~ label,
body.app-shell .custom-modal .sondaggi-page .sondaggi-form-panel .form-floating > input[type="datetime-local"]:valid ~ label {
  color: #f8f9fa !important;
}

.sondaggi-page .sondaggi-row-remove-btn {
  min-height: calc(3.5rem + 2px);
  min-width: 2.4rem;
  border-color: transparent !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.6rem;
  line-height: 1;
}

.sondaggi-page .sondaggi-section-title {
  color: #f8f9fa !important;
  font-weight: 700;
}

.sondaggi-page .sondaggi-static-alert {
  border-radius: 0.375rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  border: 1px solid transparent;
}

.sondaggi-page .sondaggi-static-alert--success {
  color: #0f5132;
  background-color: rgba(25, 135, 84, 0.2);
  border-color: rgba(25, 135, 84, 0.45);
}

.sondaggi-page .sondaggi-static-alert--danger {
  color: #842029;
  background-color: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.5);
}

.sondaggi-page .sondaggi-static-alert--warning {
  color: #fff3cd;
  background-color: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.45);
}

.sondaggi-page .sondaggi-top-yes-slot {
  border-color: #3fcf87 !important;
  border-width: 2px !important;
}

.sondaggi-page .sondaggi-pie-chart {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex: 0 0 auto;
}

.sondaggi-page .sondaggi-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.sondaggi-page .sondaggi-app-table-wrap {
  border: 0;
  overflow-x: auto;
}

.sondaggi-page .sondaggi-app-table,
.sondaggi-page .sondaggi-app-table > :not(caption) > * > *,
.sondaggi-page .sondaggi-app-table th,
.sondaggi-page .sondaggi-app-table td {
  border: 0 !important;
  background-color: transparent !important;
}

.sondaggi-page .sondaggi-app-btn {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: rgba(248, 249, 250, 0.65) !important;
  box-shadow: none !important;
  opacity: 1;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sondaggi-page .sondaggi-app-btn:hover,
.sondaggi-page .sondaggi-app-btn:focus,
.sondaggi-page .sondaggi-app-btn:active {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(248, 249, 250, 0.65) !important;
  box-shadow: none !important;
}

.sondaggi-page .btn-check:checked + .sondaggi-app-btn--si,
.sondaggi-page .sondaggi-app-btn--si:hover {
  background: #58a9a3 !important;
  border-color: #58a9a3 !important;
  color: #f8f9fa !important;
}

.sondaggi-page .btn-check:checked + .sondaggi-app-btn--forse,
.sondaggi-page .sondaggi-app-btn--forse:hover {
  background: #ffbe75 !important;
  border-color: #ffbe75 !important;
  color: #343a40 !important;
}

.sondaggi-page .btn-check:checked + .sondaggi-app-btn--no,
.sondaggi-page .sondaggi-app-btn--no:hover {
  background: #d12444 !important;
  border-color: #d12444 !important;
  color: #f8f9fa !important;
}

.sondaggi-page .btn-check:checked + .sondaggi-app-btn--si,
.sondaggi-page .btn-check:checked + .sondaggi-app-btn--forse,
.sondaggi-page .btn-check:checked + .sondaggi-app-btn--no {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 10px rgba(0, 0, 0, 0.25) !important;
}

a.aside-forum-icon-link .aside-forum-unread-badge-num {
  display: block;
  text-align: center;
  line-height: 1;
  margin: 0;
  padding: 0;
}

/* Lista topic in board: card dark; titolo board Roboto Slab, titoli topic Roboto */
.forum-board-topic-shell .forum-board-topic-shell-title {
  font-family: "Roboto Slab", "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.25rem;
}

.forum-board-topic-shell .forum-board-topic-list .list-group-item {
  border-color: rgba(255, 255, 255, 0.12);
}

.forum-board-topic-shell .forum-board-topic-list {
  overflow: hidden;
  border-bottom-left-radius: var(--bs-card-inner-border-radius);
  border-bottom-right-radius: var(--bs-card-inner-border-radius);
}

.forum-board-topic-list .list-group-item.forum-board-topic-row {
  background: transparent;
  color: #adb5bd;
  border-left: 2px solid transparent;
}

.forum-board-topic-list .list-group-item.forum-board-topic-row .forum-board-topic-row-link {
  color: #adb5bd;
}

.forum-board-topic-list .list-group-item.forum-board-topic-row:hover,
.forum-board-topic-list .list-group-item.forum-board-topic-row:focus {
  color: #fff;
  background: rgba(88, 169, 163, 0.15);
  border-left-color: #58a9a3;
}

.forum-board-topic-list .list-group-item.forum-board-topic-row:hover .forum-board-topic-row-link,
.forum-board-topic-list .list-group-item.forum-board-topic-row:hover .forum-board-topic-row-link .forum-topic-list-title {
  color: #fff;
}

.forum-board-topic-list .list-group-item.forum-board-topic-row:hover .forum-topic-list-title {
  font-weight: 700;
}

.forum-topic-list-title {
  display: inline-block;
  vertical-align: middle;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #f8f9fa;
}

.forum-topic-new-badge {
  margin-left: 15px;
}

.forum-topic-badges-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 10px;
  vertical-align: middle;
}

.forum-topic-badge-important {
  background-color: #ffbe75;
  color: #111;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.forum-topic-badge-closed {
  background-color: #a6bee9;
  color: #111;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.forum-board-topic-last-meta {
  color: #cecece;
}

.forum-board-topic-last-author {
  color: #f8f9fa;
  font-family: 'Roboto Condensed', 'Roboto', Arial, sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
}

a.forum-board-topic-last-author:hover {
  color: #fff;
}

.forum-board-topic-staff-actions .btn {
  white-space: nowrap;
}

/* Pulsanti solo icona (tooltip a destra): area cliccabile uniforme */
.forum-board-tooltip-btn {
  min-width: 2.15rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.forum-board-topic-shell .pagination .page-item.active .page-link {
  background-color: #58a9a3;
  border-color: transparent;
  color: #f8f9fa;
}

.forum-page-current-link {
  background-color: #58a9a3 !important;
  color: #f8f9fa !important;
  border: 0 !important;
  cursor: default;
  pointer-events: none;
}

/* Paginazione globale engine */
body.app-shell .pagination .page-link,
body.guest-shell .pagination .page-link {
  border: 0 !important;
  color: #f8f9fa !important;
  background-color: transparent !important;
}

body.app-shell .pagination .page-item.active .page-link,
body.app-shell .pagination .page-item.active > .page-link,
body.guest-shell .pagination .page-item.active .page-link,
body.guest-shell .pagination .page-item.active > .page-link {
  background-color: #58a9a3 !important;
  border: 0 !important;
  color: #f8f9fa !important;
}

body.app-shell .pagination .page-item.disabled .page-link,
body.guest-shell .pagination .page-item.disabled .page-link {
  color: #6c757d !important;
  background-color: transparent !important;
  border: 0 !important;
}

/* Forum: composer (navbar + form dark) */
.forum-compose-card .forum-compose-input {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color-translucent);
}

.forum-compose-card .forum-compose-input:focus {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

/* Forum indice: sotto i titoli board, data/autore senza uppercase del link globale */
a.forum-board-list-group-item .forum-board-meta {
  text-transform: none;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 0.8125rem;
}

/* Forum indice: lista board formattata come i capitoli di manuale.php
   (.manuale-page__capitolo-link), hover con lo stesso effetto "active"
   ma con accento #58a9a3 invece del blu. */
.forum-index-board-list {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.forum-index-board-list .list-group-item.forum-board-list-group-item {
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: #adb5bd;
  padding: 0.45rem 0.85rem 0.45rem 1.1rem;
  font-size: 0.875rem;
}

.forum-index-board-list .list-group-item.forum-board-list-group-item:hover,
.forum-index-board-list .list-group-item.forum-board-list-group-item:focus {
  color: #fff;
  font-weight: 700;
  background: rgba(88, 169, 163, 0.15);
  border-left-color: #58a9a3;
}

/* Intestazione sezione con titolo + azione (pattern condiviso, usato anche in mercato.php/stats.php). */
.mercato-sezione-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Titolo con linee laterali sfumate (pattern condiviso, usato anche in mercato.php). */
.mercato-sezione-title-container {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.mercato-sezione-title-line {
  flex: 1;
  height: 2px;
  max-width: 200px;
  background: linear-gradient(to right, #fff, transparent);
}
.mercato-sezione-title-line:first-child {
  background: linear-gradient(to left, #fff, transparent);
}

.mercato-sezione-titolo {
  font-family: 'Roboto Slab', 'Times New Roman', serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  color: #f8f9fa;
  text-align: center;
  flex-shrink: 0;
}

/* Forum indice: il contenitore titolo (flex:1 1 auto pensato per layout a riga) non deve
   espandersi in verticale dentro il flex-column della card, altrimenti titolo/descrizione/
   lista sezioni non restano ancorati in alto. */
.forum-index-card-body > .mercato-sezione-title-container {
  flex: 0 0 auto;
}

/* Forum indice: titolo card categoria pi� compatto. */
.forum-index-card .card-title {
  font-family: "Roboto Slab", "Times New Roman", serif;
  font-size: 12px;
  color: var(--bs-light);
  text-transform: uppercase;
}

/* Forum indice: descrizione categoria. */
.forum-index-card-body > p.-secondary {
  color: #cecece;
}

/* Forum indice: footer categoria (link ultimo messaggio / dicitura vuota). */
.card-footer-secondary > a,
.card-footer-secondary > span {
  margin-top: 10px;
}

.forum-category-last-msg-link {
  color: #cecece;
  text-decoration: none;
}

.forum-category-last-msg-link:hover,
.forum-category-last-msg-link:focus {
  color: #cecece;
  text-decoration: none;
}

/* Forum indice: categoria con molte board (staff) ? lista scrollabile. */
.forum-corp-impiego-card-body,
.forum-index-page--modal .forum-index-card-body,
.messaggi-home-stack {
  min-height: 0;
}

.chat-form-danni > .chat-form-danni__row {
  flex: 1 1 auto;
  min-height: 0;
}

.chat-danni-weapons {
  min-height: 0;
}

.chat-danni-weapons__list {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.chat-danni-weapons__item {
  cursor: pointer;
  color: #f8f9fa;
  padding: 0.35rem 0.4rem;
}

.chat-danni-weapons__item .form-check-input {
  float: none;
  margin: 0;
  position: static;
  flex-shrink: 0;
}

.chat-danni-weapons__label {
  color: inherit;
  line-height: 1.25;
}

.chat-danni-weapons__item:has(input:checked) {
  background-color: #0d6efd;
  color: #fff;
}

.chat-danni-weapons__item:has(input:checked) .chat-danni-weapons__label {
  color: #fff;
}

.forum-corp-impiego-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

/* Forum indice: la pagina occupa tutta l'altezza disponibile, cosi' la grid
   puo' distribuire lo spazio residuo tra le righe (align-content:stretch di
   default) e i box della seconda riga si allargano fino a riempirlo, invece
   di restare alti solo quanto la loro lista board interna. Si restringono
   solo quando lo spazio del contenitore si riduce davvero. */
.forum-index-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.forum-index-nav {
  flex: 0 0 auto;
}

.forum-index-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  align-content: flex-start;
}

.forum-index-card {
  height: auto;
  min-height: 0;
}

/* Forum in modale: niente scrollbar sulla modale, scroll solo dentro le liste board. */
.forum-index-page--modal {
  max-height: 100%;
  overflow: hidden;
}

.forum-index-page--modal .forum-index-grid {
  overflow: hidden;
}

/* Forum topic: una card per messaggio, sidebar 150px + divisore */
.forum-topic-posts-stack .forum-post-card {
  overflow: hidden;
}

.forum-post-inner {
  align-items: stretch;
  min-height: 8rem;
}

.forum-post-sidebar {
  width: 150px;
  flex-shrink: 0;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.forum-post-sidebar .badge {
  text-transform: none;
  font-size: 0.95rem;
  line-height: 1.15;
}

.forum-post-time {
  font-size: 0.75rem;
  line-height: 1.2;
  word-break: break-word;
}

.forum-post-divider {
  width: 1px;
  flex-shrink: 0;
  background-color: rgba(255, 255, 255, 0.12);
  align-self: stretch;
  min-height: 100%;
}

.forum-post-main {
  padding: 0.75rem 1rem;
}

.forum-post-breadcrumb {
  --bs-breadcrumb-divider-color: rgba(255, 255, 255, 0.35);
}

.forum-post-breadcrumb .breadcrumb-item,
.forum-post-breadcrumb .breadcrumb-item a {
  color: var(--bs-secondary-color);
}

.forum-post-breadcrumb .breadcrumb-item.active {
  color: var(--bs-body-color);
}

.forum-post-avatar-img {
  width: 150px;
  height: 200px;
  object-fit: cover;
  display: block;
}

.forum-post-avatar-placeholder {
  width: 150px;
  height: 200px;
  border-radius: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.45);
}

.forum-post-avatar-placeholder--anon {
  background-color: rgba(0, 0, 0, 0.35);
}

.forum-post-avatar-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  background-color: #58a9a3;
  color: #f8f9fa;
  border-radius: 0.25rem 0 0.25rem 0;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  text-decoration: none;
}

.forum-post-content {
  color: #f8f9fa;
}

.btn-forum-action {
  background-color: #58a9a3;
  border-color: #58a9a3;
  color: #f8f9fa;
}

.btn-forum-action:hover,
.btn-forum-action:focus,
.btn-forum-action:active {
  background-color: #469995;
  border-color: #469995;
  color: #f8f9fa;
}

.forum-post-reply-title {
  color: #f8f9fa;
}


.offgame-conversation-item {
  transition: background-color 0.15s ease, border-left-color 0.15s ease, color 0.15s ease;
}
#messaggi-on-email textarea[name="mail_body"] {
  min-height: 160px;
  resize: vertical;
}

#messaggi-on-email .mail-lists-scroll {
  max-width: 100%;
}

#messaggi-on-email .col-12.col-lg-8 {
  min-width: 0;
}

/* Azioni thread: bottone largo, icona piccola centrata */
#messaggi-on-email .mail-thread-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.35rem;
  padding: 0.4rem 0.7rem;
  line-height: 1;
}

#messaggi-on-email .mail-thread-toolbar-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
  flex-shrink: 0;
}

/* Rimuovi da lista: bottone compatto danger */
#messaggi-on-email .mail-list-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.28rem;
  line-height: 1;
  background-color: #d12444 !important;
  border-color: #d12444 !important;
  color: #f8f9fa !important;
}

#messaggi-on-email .mail-list-remove-btn:hover,
#messaggi-on-email .mail-list-remove-btn:focus {
  background-color: #d12444 !important;
  border-color: #d12444 !important;
  color: #f8f9fa !important;
}

#messaggi-on-email .mail-list-remove-btn svg {
  width: 1.0625rem;
  height: 1.0625rem;
  display: block;
  flex-shrink: 0;
  color: #f8f9fa;
  fill: #f8f9fa;
}

/* Destinatari mail: chip sopra, un solo input form-control come Oggetto */
.mail-recipient-field > [data-mail-recipient-chips]:empty {
  display: none !important;
}

.mail-recipient-field > [data-mail-recipient-chips]:not(:empty) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

#messaggi-on-email .mail-list-member-select {
  height: 150px;
  min-height: 150px;
}


.messaggi-group-members-select,
.form-floating > .messaggi-group-members-select.form-select,
#messaggi-on-sms .messaggi-group-members-select,
#messaggi-off .messaggi-group-members-select {
  height: 150px !important;
  min-height: 150px !important;
  max-height: none !important;
}

.form-floating:has(> .messaggi-group-members-select) {
  min-height: 150px;
}
.mail-recipient-chip {
  max-width: 100%;
}

.mail-recipient-chip .mail-recipient-chip-label {
  max-width: 14rem;
}

.mail-recipient-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 2px;
  z-index: 1080;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--bs-secondary);
  border-radius: 0.375rem;
  background-color: var(--bs-dark);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.35);
}

.mail-recipient-suggestions .list-group-item {
  cursor: pointer;
  border-color: var(--bs-secondary);
}

.mail-recipient-suggestions .list-group-item:hover,
.mail-recipient-suggestions .list-group-item.active {
  background-color: rgba(255, 255, 255, 0.08);
}

.offgame-home-action-btn {
  width: 230px;
  max-width: 100%;
}

/* messaggi_off / messaggi_on home: stack flex (bottoni centrati, form sotto) */

/* messaggi_on: avvisi fittizi ? una sola riga quando c?� spazio orizzontale */
.messaggi-on-fittizi-alert {
  display: inline-block;
  max-width: 100%;
  text-align: start;
  box-sizing: border-box;
}
@media (min-width: 400px) {
  .messaggi-on-fittizi-alert {
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.messaggi-on-page {
  background: transparent;
  padding: 0;
}

.messaggi-on-search-bar .form-control-sm,
.messaggi-on-search-bar .messaggi-on-search-bar__btn {
  height: calc(1.5em + 0.5rem + 2px);
  min-height: calc(1.5em + 0.5rem + 2px);
  box-sizing: border-box;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  line-height: 1.5;
}

.messaggi-on-search-bar .messaggi-on-search-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#messaggi-on-sms .messaggi-on-sms-sidebar,
#messaggi-on-chiamate .messaggi-on-sidebar,
#messaggi-on-email .messaggi-on-sidebar,
#messaggi-off .messaggi-on-sms-sidebar,
#background-root .messaggi-on-sms-sidebar {
  background-color: rgba(20, 20, 20, 0.8);
}

#messaggi-off .messaggi-on-sms-sidebar,
#background-root .messaggi-on-sms-sidebar {
  margin-bottom: 20px;
}

#messaggi-on-sms .messaggi-panel-shell,
#messaggi-on-sms .messaggi-on-sms-detail,
#messaggi-on-chiamate .messaggi-panel-shell,
#messaggi-on-chiamate .messaggi-on-detail,
#messaggi-on-email .messaggi-on-detail,
#messaggi-off .messaggi-panel-shell,
#messaggi-off .messaggi-on-sms-detail,
#background-root .messaggi-panel-shell {
  background-color: transparent;
}

#messaggi-on-sms .messaggi-on-sms-conv-item,
#messaggi-on-chiamate .messaggi-on-conv-item,
#messaggi-on-email .messaggi-on-conv-item,
#messaggi-off .messaggi-on-sms-conv-item,
#background-root .messaggi-on-sms-conv-item {
  background: rgba(19, 21, 23, 0.3);
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0.375rem;
  color: #adb5bd;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  min-height: 0;
  transition: background-color 0.15s ease, border-left-color 0.15s ease, color 0.15s ease;
}

#messaggi-on-sms .messaggi-on-sms-conv-item a,
#messaggi-on-chiamate .messaggi-on-conv-item a,
#messaggi-on-email .messaggi-on-conv-item a,
#messaggi-off .messaggi-on-sms-conv-item a,
#background-root .messaggi-on-sms-conv-item a {
  color: inherit;
}

#messaggi-on-sms .messaggi-on-sms-conv-item:hover:not(.active),
#messaggi-on-sms .messaggi-on-sms-conv-item:focus-within:not(.active),
#messaggi-on-chiamate .messaggi-on-conv-item:hover:not(.active),
#messaggi-on-chiamate .messaggi-on-conv-item:focus-within:not(.active),
#messaggi-on-email .messaggi-on-conv-item:hover:not(.active),
#messaggi-on-email .messaggi-on-conv-item:focus-within:not(.active),
#messaggi-off .messaggi-on-sms-conv-item:hover:not(.active),
#messaggi-off .messaggi-on-sms-conv-item:focus-within:not(.active),
#background-root .messaggi-on-sms-conv-item:hover:not(.active),
#background-root .messaggi-on-sms-conv-item:focus-within:not(.active) {
  color: #fff;
  background: rgba(88, 169, 163, 0.15) !important;
  border-left-color: #58a9a3;
}

#messaggi-on-sms .messaggi-on-sms-conv-item:hover:not(.active) a,
#messaggi-on-sms .messaggi-on-sms-conv-item:focus-within:not(.active) a,
#messaggi-on-chiamate .messaggi-on-conv-item:hover:not(.active) a,
#messaggi-on-chiamate .messaggi-on-conv-item:focus-within:not(.active) a,
#messaggi-on-email .messaggi-on-conv-item:hover:not(.active) a,
#messaggi-on-email .messaggi-on-conv-item:focus-within:not(.active) a,
#messaggi-off .messaggi-on-sms-conv-item:hover:not(.active) a,
#messaggi-off .messaggi-on-sms-conv-item:focus-within:not(.active) a,
#background-root .messaggi-on-sms-conv-item:hover:not(.active) a,
#background-root .messaggi-on-sms-conv-item:focus-within:not(.active) a {
  color: #fff;
}

#messaggi-on-sms .messaggi-on-sms-conv-item:hover:not(.active) .fw-semibold,
#messaggi-on-sms .messaggi-on-sms-conv-item:focus-within:not(.active) .fw-semibold,
#messaggi-on-chiamate .messaggi-on-conv-item:hover:not(.active) .fw-semibold,
#messaggi-on-chiamate .messaggi-on-conv-item:focus-within:not(.active) .fw-semibold,
#messaggi-on-email .messaggi-on-conv-item:hover:not(.active) .fw-semibold,
#messaggi-on-email .messaggi-on-conv-item:focus-within:not(.active) .fw-semibold,
#messaggi-off .messaggi-on-sms-conv-item:hover:not(.active) .fw-semibold,
#messaggi-off .messaggi-on-sms-conv-item:focus-within:not(.active) .fw-semibold,
#background-root .messaggi-on-sms-conv-item:hover:not(.active) .fw-semibold,
#background-root .messaggi-on-sms-conv-item:focus-within:not(.active) .fw-semibold {
  font-weight: 700;
}

#messaggi-on-sms .messaggi-on-sms-conv-item.active,
#messaggi-on-chiamate .messaggi-on-conv-item.active,
#messaggi-on-email .messaggi-on-conv-item.active,
#messaggi-off .messaggi-on-sms-conv-item.active,
#background-root .messaggi-on-sms-conv-item.active {
  color: #fff;
  background: rgba(88, 169, 163, 0.22);
  border-left-color: #58a9a3;
}

#messaggi-on-sms .messaggi-on-sms-conv-item.active a,
#messaggi-on-chiamate .messaggi-on-conv-item.active a,
#messaggi-on-email .messaggi-on-conv-item.active a,
#messaggi-off .messaggi-on-sms-conv-item.active a,
#background-root .messaggi-on-sms-conv-item.active a {
  color: #fff;
}

#messaggi-on-sms .messaggi-on-sms-conv-meta,
#messaggi-on-chiamate .messaggi-on-conv-meta,
#messaggi-on-email .messaggi-on-conv-meta,
#messaggi-off .messaggi-on-sms-conv-meta,
#background-root .messaggi-on-sms-conv-meta {
  text-transform: uppercase;
  color: #cecece;
}

#messaggi-on-sms .messaggi-on-sms-locked,
#messaggi-on-chiamate .messaggi-on-locked,
#messaggi-on-email .messaggi-on-locked {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.375rem 0.75rem;
  border-radius: var(--bs-border-radius, 0.375rem);
  background-color: #d12444;
  border: 1px solid #d12444;
  color: #f8f9fa;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
  user-select: none;
  box-sizing: border-box;
}

#messaggi-on-sms .messaggi-on-sms-download-btn,
#messaggi-on-chiamate .messaggi-on-download-btn,
#messaggi-on-email .messaggi-on-download-btn,
#messaggi-off .messaggi-on-sms-download-btn,
#background-root .messaggi-on-sms-download-btn {
  border: 0;
  background: transparent;
  color: #f8f9fa;
  box-shadow: none;
}

#messaggi-on-sms .messaggi-on-sms-download-btn:hover,
#messaggi-on-sms .messaggi-on-sms-download-btn:focus,
#messaggi-on-chiamate .messaggi-on-download-btn:hover,
#messaggi-on-chiamate .messaggi-on-download-btn:focus,
#messaggi-on-email .messaggi-on-download-btn:hover,
#messaggi-on-email .messaggi-on-download-btn:focus,
#messaggi-off .messaggi-on-sms-download-btn:hover,
#messaggi-off .messaggi-on-sms-download-btn:focus,
#background-root .messaggi-on-sms-download-btn:hover,
#background-root .messaggi-on-sms-download-btn:focus {
  color: #f8f9fa;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#messaggi-on-sms .messaggi-on-sms-download-btn svg,
#messaggi-on-chiamate .messaggi-on-download-btn svg,
#messaggi-on-email .messaggi-on-download-btn svg,
#messaggi-off .messaggi-on-sms-download-btn svg,
#background-root .messaggi-on-sms-download-btn svg {
  color: #f8f9fa;
  fill: currentColor;
}

#messaggi-on-sms .messaggi-on-search-preview,
#messaggi-on-email .messaggi-on-search-preview,
#messaggi-off .messaggi-on-search-preview {
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-weight: 400;
  text-transform: none;
  font-size: 0.875rem;
  letter-spacing: normal;
}

.offgame-group-preview-wrap {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
}

.offgame-group-main-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  object-fit: cover;
  border-radius: 0.375rem;
  background: rgba(18, 18, 18, 1);
  border: 0;
  box-sizing: border-box;
}

.offgame-conv-leave-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.28rem;
  line-height: 1;
}

.offgame-conv-leave-btn svg {
  width: 1.0625rem;
  height: 1.0625rem;
  display: block;
  flex-shrink: 0;
}

.offgame-messages-pane {
  background-color: rgba(20, 20, 20, 0.75) !important;
}

.offgame-msg-author .badge {
  font-size: 0.78rem;
  font-weight: 600;
}

/* Griglia 2 colonne: nome riga 1, bubble+propic riga 2, data riga 3 */
.offgame-msg-surface--mine {
  display: flex;
  justify-content: flex-end;
}

.offgame-msg-surface--theirs {
  display: flex;
  justify-content: flex-start;
}

.offgame-msg-grid {
  display: grid;
  column-gap: 0.5rem;
  row-gap: 0.25rem;
  align-items: start;
  max-width: min(90%, 36rem);
}

.offgame-msg-grid--mine {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
}

.offgame-msg-grid--mine > .offgame-msg-author,
.offgame-msg-grid--theirs > .offgame-msg-author {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: stretch;
}

.offgame-msg-grid--mine > .offgame-msg-author {
  text-align: end;
}

.offgame-msg-grid--theirs > .offgame-msg-author {
  text-align: start;
}

.offgame-msg-grid--mine > .offgame-msg-body {
  grid-column: 1;
  grid-row: 2;
  justify-self: end;
  min-width: 0;
  text-align: start;
}

.offgame-msg-grid--mine > .offgame-msg-avatar {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}

.offgame-msg-grid--mine > .offgame-msg-time {
  grid-column: 1;
  grid-row: 3;
  justify-self: end;
  text-align: end;
}

.offgame-msg-grid--theirs {
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto auto;
}

.offgame-msg-grid--theirs > .offgame-msg-avatar {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
}

.offgame-msg-grid--theirs > .offgame-msg-body {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  min-width: 0;
  text-align: start;
}

.offgame-msg-grid--theirs > .offgame-msg-time {
  grid-column: 2;
  grid-row: 3;
  justify-self: start;
  text-align: start;
}

.offgame-msg-propic {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  object-fit: cover;
  border-radius: 0.375rem;
  display: block;
  border: 0;
  box-sizing: border-box;
  background: rgba(18, 18, 18, 1);
}

.offgame-msg-action-btn {
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
  padding: 0.1rem 0.2rem;
  font-size: 0.72rem !important;
  text-transform: none !important;
}

.offgame-msg-action-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.offgame-msg-edited-note {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}


.offgame-msg-action-btn:hover,
.offgame-msg-action-btn:focus-visible {
  color: #dee2e6 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  outline: none;
}

.forum-post-reply-form {
  min-height: 240px;
}

.forum-post-reply-card .form-control,
.forum-post-reply-card .form-select {
  color: var(--bs-body-color);
}

.bbcode-toolbar {
  align-items: center;
}

.bbcode-toolbar .btn {
  text-transform: none !important;
}

.bbcode-toolbar-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bbcode-toolbar-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.bbcode-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 4px;
}

.bbcode-emoji-btn {
  border: 0;
  background: transparent;
  color: inherit;
  border-radius: 0.35rem;
  height: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  transition: background-color 0.12s ease-in-out, transform 0.12s ease-in-out;
}

.bbcode-emoji-btn:hover,
.bbcode-emoji-btn:focus-visible {
  background: rgba(173, 181, 189, 0.2);
  transform: translateY(-1px);
  outline: none;
}

.bbcode-emoji-modal-body {
  max-height: 78vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bbcode-emoji-fallback,
.chat-form-danni,
.tutorial-modal-page {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.bbcode-emoji-search-sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #212529;
  padding-bottom: 0.35rem;
}

.bbcode-emoji-scroll {
  min-height: 0;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.bbcode-h1 {
  font-family: 'Roboto Slab', serif;
  font-size: 1.7rem;
  margin: 0.25rem 0 0.5rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bbcode-h1::before,
.bbcode-h1::after {
  content: '';
  flex: 1;
  height: 2px;
}

/* Default (left-aligned or no wrapper): line fades to the right */
.bbcode-h1::before {
  display: none;
}
.bbcode-h1::after {
  background: linear-gradient(90deg, rgba(173, 181, 189, 0.6) 0%, transparent 100%);
}

/* Center-aligned: lines on both sides */
.bbcode-align-center .bbcode-h1::before {
  display: block;
  background: linear-gradient(90deg, transparent 0%, rgba(173, 181, 189, 0.6) 100%);
}
.bbcode-align-center .bbcode-h1::after {
  background: linear-gradient(90deg, rgba(173, 181, 189, 0.6) 0%, transparent 100%);
}

/* Right-aligned: line fades to the left */
.bbcode-align-right .bbcode-h1::before {
  display: block;
  background: linear-gradient(90deg, transparent 0%, rgba(173, 181, 189, 0.6) 100%);
}
.bbcode-align-right .bbcode-h1::after {
  display: none;
}

.bbcode-align-left { text-align: left; }
.bbcode-align-center { text-align: center; }
.bbcode-align-right { text-align: right; }


.bbcode-quote {
  border-left: 3px solid #58a9a3;
  padding: 0.4rem 0.6rem;
  margin: 0.25rem 0;
  background: rgba(88, 169, 163, 0.08);
}

.bbcode-quote-author {
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.2rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: #58a9a3;
}


.bbcode-code {
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(173, 181, 189, 0.35);
  border-radius: 0.375rem;
  padding: 0.5rem;
}

.bbcode-spoiler {
  margin: 0.35rem 0;
}

.bbcode-spoiler > summary {
  cursor: pointer;
  user-select: none;
}

.bbcode-image-link {
  display: inline-block;
}

.bbcode-image {
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  border-radius: 0.375rem;
}

.bbcode-ul {
  margin-bottom: 0.25rem;
  list-style: none;
  padding-left: 1.2em;
}

.bbcode-ul > li {
  position: relative;
  padding-left: 0.2em;
}

.bbcode-ul > li::before {
  content: '\25C6';
  position: absolute;
  left: -1.1em;
  font-size: 0.55em;
  top: 0.45em;
}

.bbcode-h3 {
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
  font-size: 1.1rem;
  margin: 0.4rem 0;
  line-height: 1.3;
  font-weight: 600;
  display: block;
  text-align: left;
  background: rgba(173, 181, 189, 0.08);
  border-left: 4px solid #68cbec;
  padding: 0.35rem 0.6rem;
}

.bbcode-alert {
  border: 1px solid rgba(255, 193, 7, 0.5);
  border-left: 4px solid #ffc107;
  border-radius: 0.375rem;
  background: rgba(255, 193, 7, 0.08);
  padding: 0.5rem 0.75rem;
  margin: 0.4rem 0;
}

.bbcode-alert-header {
  font-weight: 700;
  color: #ffc107;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.bbcode-alert-body {
  color: #e0e0e0;
  font-size: 0.9rem;
}

.bbcode-hr {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
  border: none;
  background: none;
  height: auto;
}

.bbcode-hr-line {
  flex: 1;
  height: 1px;
}

.bbcode-hr-diamond {
  font-size: 0.6rem;
  line-height: 1;
}

.bbcode-hr--blue .bbcode-hr-line {
  background: linear-gradient(90deg, transparent, #68cbec, transparent);
}
.bbcode-hr--blue .bbcode-hr-diamond {
  color: #68cbec;
}

.bbcode-hr--orange .bbcode-hr-line {
  background: linear-gradient(90deg, transparent, #d4a574, transparent);
}
.bbcode-hr--orange .bbcode-hr-diamond {
  color: #d4a574;
}

.bbcode-datalist-empty {
  color: #6c757d;
  font-style: italic;
  padding: 0.3rem 0;
}


/* --- Pagine e componenti (ex app.css) --- */

.chat-line {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
}

.chat-line-whisper {
  border-style: dashed;
}

.chat-msg--tipo-3.chat-line-whisper {
  --chat-whisper-border: #8a6b3d;
  background-color: #f0e2b8;
  border: 1px solid var(--chat-whisper-border);
  border-radius: 10px;
  color: var(--chat-whisper-border);
  padding: 0.5rem 0.65rem;
  border-style: solid;
}

.chat-msg__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
}

.chat-msg__row-text {
  min-width: 0;
  word-break: break-word;
}

.chat-msg__entity-link {
  color: #f8f9fa !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  font-weight: inherit;
  line-height: inherit;
  vertical-align: baseline;
}

.chat-msg__entity-link:hover,
.chat-msg__entity-link:focus-visible {
  color: #fff !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.45);
}

.chat-msg__indagine-link {
  color: inherit !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  font-weight: inherit;
  line-height: inherit;
  vertical-align: baseline;
}

.chat-msg__indagine-link:hover,
.chat-msg__indagine-link:focus-visible {
  color: inherit !important;
  text-decoration: underline !important;
}

.chat-msg--tipo-3.chat-msg--spoiler > .chat-msg__row {
  margin-top: 0.45rem;
}

.chat-msg--tipo-4 .chat-msg__row-icon,
.chat-msg--tipo-5 .chat-msg__row-icon,
.chat-msg--tipo-6 .chat-msg__row-icon,
.chat-msg--tipo-8 .chat-msg__row-icon,
.chat-msg--tipo-9 .chat-msg__row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.45em;
  height: 1.45em;
  color: var(--chat-line-icon-color);
}

.chat-msg--tipo-4 .chat-msg__row-icon svg,
.chat-msg--tipo-5 .chat-msg__row-icon svg,
.chat-msg--tipo-6 .chat-msg__row-icon svg,
.chat-msg--tipo-8 .chat-msg__row-icon svg,
.chat-msg--tipo-9 .chat-msg__row-icon svg {
  display: block;
  width: 1.45em;
  height: 1.45em;
  fill: var(--chat-line-icon-color);
  stroke: var(--chat-line-icon-color);
}

.chat-msg--tipo-3 .chat-msg__whisper-intro {
  font-family: "Roboto Slab", "Times New Roman", serif;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-msg--tipo-3 .chat-msg__whisper-spoiler-label {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.45;
  flex-shrink: 0;
}

.chat-msg--tipo-3 .chat-msg__time {
  color: var(--chat-whisper-border);
  font-size: 0.92rem;
  line-height: 1.45;
  flex-shrink: 0;
}

.chat-msg--tipo-3 .chat-msg__spoiler-summary {
  color: var(--chat-whisper-border);
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.chat-msg--tipo-3 .chat-msg__spoiler-summary::-webkit-details-marker {
  display: none;
}

.chat-msg--tipo-4.chat-line-dice,
.chat-msg--tipo-6.chat-line-incanto {
  --chat-dice-border: #2e6b85;
  --chat-line-icon-color: var(--chat-dice-border);
  --chat-line-time-color: rgba(255, 255, 255, 0.9);
  background-color: #4a8fad;
  border: 1px solid var(--chat-dice-border);
  border-radius: 10px;
  color: #fff;
  padding: 0.5rem 0.65rem;
}

.chat-msg--tipo-2.chat-line-off {
  --chat-line-time-color: rgba(255, 255, 255, 0.65);
  background-color: #212529;
  border: 1px solid #495057;
  border-radius: 10px;
  color: #cecece;
  padding: 0.5rem 0.65rem;
}

.chat-msg--tipo-2 .chat-msg__time,
.chat-msg--tipo-4 .chat-msg__time,
.chat-msg--tipo-5 .chat-msg__time,
.chat-msg--tipo-6 .chat-msg__time,
.chat-msg--tipo-8 .chat-msg__time,
.chat-msg--tipo-9 .chat-msg__time {
  color: var(--chat-line-time-color);
  flex-shrink: 0;
}

.chat-msg--tipo-2 .chat-msg__sender {
  flex-shrink: 0;
}

.chat-msg--tipo-5.chat-line-oggetto {
  --chat-oggetto-border: #9a5c38;
  --chat-line-icon-color: var(--chat-oggetto-border);
  --chat-line-time-color: rgba(255, 255, 255, 0.9);
  background-color: #c4865a;
  border: 1px solid var(--chat-oggetto-border);
  border-radius: 10px;
  color: #fff;
  padding: 0.5rem 0.65rem;
}

.chat-msg--tipo-9.chat-line-system {
  --chat-system-border: #495057;
  --chat-line-icon-color: var(--chat-system-border);
  --chat-line-time-color: var(--chat-system-border);
  background-color: #adb5bd;
  border: 1px solid var(--chat-system-border);
  border-radius: 10px;
  color: var(--chat-system-border);
  padding: 0.5rem 0.65rem;
  font-style: normal;
}

.chat-msg--tipo-9 .chat-msg__row {
  flex-wrap: nowrap;
}

.chat-msg--tipo-9 .chat-msg__row-text {
  flex: 1 1 auto;
}

.chat-msg--tipo-9 .chat-msg__sistema-body {
  margin-top: 0.35rem;
  min-width: 0;
  word-break: break-word;
}

.chat-msg--tipo-9 .chat-msg__sistema-body .bbcode-image {
  display: block;
  margin-top: 0.15rem;
}

.chat-line-master {
  border-color: rgba(255, 193, 7, 0.45);
  background: rgba(255, 193, 7, 0.08);
}

.app-shell-main:has(.chat-page) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-page {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0.75rem;
}

.chat-page__header {
  flex: 0 0 auto;
}

.chat-page__header-bar {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  background-color: #212529;
  border: 1px solid #495057;
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
}

.chat-page__title {
  font-family: "Roboto Slab", "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #cecece;
}

.chat-page__messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  position: relative;
}

.scheda-registro-list__item,
.scheda-registro-list__banner {
  transition: background-color 0.15s ease;
}

.scheda-registro-list__item:hover,
.scheda-registro-list__item:focus,
.scheda-registro-list__banner:hover,
.scheda-registro-list__banner:focus-within {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

.scheda-registro-replay__messages {
  max-height: min(70vh, 640px);
  overflow-y: auto;
}

.scheda-registro-replay__messages .chat-page__message:last-child {
  margin-bottom: 0 !important;
}

.chat-page__new-messages {
  position: sticky;
  bottom: 0.35rem;
  z-index: 2;
  margin: 0.5rem auto 0;
  max-width: calc(100% - 0.5rem);
  padding: 0.45rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #cecece;
  background: rgba(33, 37, 41, 0.96);
  border: 1px solid #495057;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  user-select: none;
}

.chat-page__new-messages:hover {
  border-color: #6c757d;
  color: #fff;
}

.chat-page__commands {
  flex: 0 0 auto;
}

.chat-page__status:empty {
  display: none;
}

.chat-page__tabs {
  --bs-nav-tabs-border-width: 0;
  --bs-nav-tabs-border-color: transparent;
  --bs-nav-tabs-link-active-bg: transparent;
  --bs-nav-tabs-link-active-border-color: transparent;
  --bs-nav-tabs-link-hover-border-color: transparent;
  border-bottom: none;
  gap: 0.15rem;
}

.chat-page__tabs > .nav-item > :is(a, button).nav-link {
  border: 0 !important;
  border-radius: 0.5rem 0.5rem 0 0 !important;
  background: #16181b !important;
  color: #adb5bd !important;
  padding: var(--atp-custom-btn-padding) !important;
  font-family: 'Roboto Condensed', 'Roboto', Arial, sans-serif;
  text-transform: uppercase;
  font-size: var(--atp-custom-btn-font-size);
  text-decoration: none !important;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.chat-page__tabs > .nav-item > :is(a, button).nav-link:hover,
.chat-page__tabs > .nav-item > :is(a, button).nav-link:focus-visible {
  color: #f8f9fa !important;
  background: #1c1f23 !important;
  text-shadow: none;
}

.chat-page__tabs > .nav-item > :is(a, button).nav-link.active {
  color: #cecece !important;
  background: #212529 !important;
  text-shadow: none;
}

.chat-page__tab-content {
  display: grid;
  background-color: #212529;
  border: none;
  border-radius: 0 0.5rem 0.5rem 0.5rem;
  color: #cecece;
}

.chat-page__tab-content > .tab-pane {
  grid-area: 1 / 1;
  display: block !important;
  width: 100%;
  min-width: 0;
}

.chat-page__tab-content > .tab-pane:not(.show) {
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  height: 0;
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
}

.chat-page__tab-content > .tab-pane.show {
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.chat-page__compose {
  min-height: 6.5rem;
}

.chat-page__textarea-field {
  display: flex;
  flex-direction: column;
  min-height: 6.5rem;
}

.chat-page__textarea-shell--compact,
.chat-page__textarea--compact {
  min-height: 3.25rem;
}

.chat-page__textarea-shell--compact .chat-page__textarea--compact {
  min-height: 3.25rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.chat-page__compose--restricted .chat-page__submit-btn {
  align-self: stretch;
}

.chat-page__commands-restricted {
  padding-top: 0.25rem;
}

.chat-page__textarea-shell {
  position: relative;
  flex: 1 1 auto;
  min-height: 6.5rem;
  background-color: #212529;
  border: 0;
  border-radius: var(--bs-border-radius);
}

.chat-page__textarea-shell:focus-within {
  border-color: transparent;
  box-shadow: none;
}

.chat-page__textarea {
  display: block;
  width: 100%;
  min-height: 6.5rem;
  height: 100%;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  color: #cecece;
  padding: 1rem 0.75rem 1.55rem;
}

.chat-page__textarea-label {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1rem 0.75rem;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  border: 0;
  transform-origin: 0 0;
  transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
  color: var(--bs-secondary);
}

.chat-page__textarea:focus ~ .chat-page__textarea-label,
.chat-page__textarea:not(:placeholder-shown) ~ .chat-page__textarea-label {
  opacity: 0.65;
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.chat-page__textarea-shell .chat-page__char-count {
  position: absolute;
  right: 0.75rem;
  bottom: 0.4rem;
  font-size: 0.72rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  z-index: 2;
}

.chat-page__submit-btn {
  align-self: stretch;
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 7.5rem;
}

.chat-form-dado,
.chat-form-oggetto,
.chat-form-danni,
#chat-pane-extra {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.chat-form-danni .form-text {
  margin-bottom: 0.25rem;
}

.chat-form__submit-row {
  margin-top: 0.5rem;
}

.chat-msg--tipo-8.chat-line-danni {
  --chat-danni-border: #842029;
  --chat-line-icon-color: var(--chat-danni-border);
  --chat-line-time-color: var(--chat-danni-border);
  background-color: #f8d7da;
  border: 1px solid var(--chat-danni-border);
  border-radius: 10px;
  color: var(--chat-danni-border);
  padding: 0.5rem 0.65rem;
}

.chat-msg--tipo-8 .chat-msg__danni-calc {
  flex-shrink: 0;
}

.chat-msg {
  overflow: hidden;
}

.chat-msg--tipo-1.chat-line {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.chat-msg--tipo-1 {
  display: block;
  overflow: visible;
}

.chat-msg--azione-even {
  --chat-azione-accent: #f4a971;
  --chat-azione-bottom-bg: #2b3035;
}

.chat-msg--azione-odd {
  --chat-azione-accent: #f5d67a;
  --chat-azione-bottom-bg: #363c42;
}

/* Messaggio azione (tipo 1): case paddato, due righe, propic float tra i testi */
.chat-msg__azione-case {
  --chat-azione-propic: 52px;
  --chat-azione-gap: 10px;
  --chat-azione-radius: 10px;
  padding: var(--chat-azione-gap);
  border-radius: var(--chat-azione-radius);
  overflow: hidden;
  box-sizing: border-box;
  isolation: isolate;
}

.chat-msg__azione-case::after {
  content: "";
  display: table;
  clear: both;
}

.chat-msg__azione-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  padding: var(--chat-azione-gap);
  padding-left: calc(var(--chat-azione-gap) + var(--chat-azione-propic) + var(--chat-azione-gap));
  border-radius: var(--chat-azione-radius) var(--chat-azione-radius) 0 0;
  background: var(--chat-azione-accent, #fd7e14);
  color: #212529;
  line-height: 1.2;
  box-sizing: border-box;
}

.chat-msg--tipo-1 .chat-msg__azione-case > .chat-msg__propic-wrap {
  float: left;
  clear: left;
  width: var(--chat-azione-propic);
  height: var(--chat-azione-propic);
  margin-top: calc(var(--chat-azione-propic) / -2);
  margin-right: var(--chat-azione-gap);
  margin-bottom: 0;
  margin-left: var(--chat-azione-gap);
  border: 2px solid var(--chat-azione-accent, #fd7e14);
  border-radius: 50%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  shape-outside: circle(50% at 50% 50%);
  shape-margin: var(--chat-azione-gap);
  position: relative;
  z-index: 2;
}

.chat-msg__azione-bottom {
  padding: var(--chat-azione-gap);
  border-radius: 0 0 var(--chat-azione-radius) var(--chat-azione-radius);
  background: var(--chat-azione-bottom-bg, #2b3035);
  color: #cecece;
  box-sizing: border-box;
}

.chat-msg--tipo-1 .chat-msg__propic {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}

.chat-msg--tipo-1 .chat-msg__propic--placeholder {
  width: 100%;
  height: 100%;
}

.chat-msg--tipo-1 .chat-msg__sender,
.chat-msg--tipo-1 .chat-msg__tag,
.chat-msg--tipo-1 .chat-msg__azione-time {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.chat-msg--tipo-1 .chat-msg__sender,
.chat-msg--tipo-1 .chat-msg__tag {
  font-weight: 700;
}

.chat-msg--tipo-1 .chat-msg__tag {
  font-style: normal;
  color: inherit;
}

.chat-msg--tipo-1 .chat-msg__azione-time {
  font-weight: 500;
  opacity: 0.85;
}

.chat-msg--tipo-1 .chat-msg__sender--pick,
.chat-msg--tipo-1 .chat-msg__tag--pick {
  cursor: pointer;
}

.chat-msg--tipo-1 .chat-msg__sender--pick:hover,
.chat-msg--tipo-1 .chat-msg__tag--pick:hover,
.chat-msg--tipo-1 .chat-msg__sender--pick:focus-visible,
.chat-msg--tipo-1 .chat-msg__tag--pick:focus-visible {
  text-decoration: underline;
  outline: none;
}

.chat-msg__main {
  min-width: 0;
}

.chat-msg__meta {
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.chat-msg__meta .chat-msg__time {
  color: rgba(255, 255, 255, 0.45);
  margin-right: 0.25rem;
}

.chat-msg__tag {
  color: rgba(255, 255, 255, 0.65);
  font-style: italic;
}

.chat-msg__body {
  line-height: 1.45;
  word-break: break-word;
}

.chat-msg--tipo-1 .chat-msg__azione-bottom .chat-msg__body {
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
}

.chat-msg--tipo-1 .chat-msg__azione-bottom .chat-msg__stats {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.45rem;
  padding-top: 0;
  border-top: 0;
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  text-transform: uppercase;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.45;
}

.chat-msg--tipo-1 .chat-msg__azione-bottom .chat-msg__stats-main {
  flex: 1 1 auto;
  min-width: 0;
}

.chat-msg--tipo-1 .chat-msg__azione-bottom .chat-msg__stats-oggetto,
.chat-msg--tipo-1 .chat-msg__azione-bottom .chat-msg__stats-modifiers {
  flex: 1 1 auto;
  margin-left: auto;
  text-align: right;
  color: #cecece;
  white-space: normal;
  min-width: 0;
}

.chat-msg__stats {
  margin-top: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-msg--spoiler:not(.chat-msg--tipo-3) > .chat-msg__body {
  margin-top: 0.5rem;
}

.chat-msg__image {
  max-height: 280px;
  width: auto;
  max-width: 100%;
}

.chat-msg__danni-accept {
  margin-left: 0.35rem;
  vertical-align: baseline;
}

.chat-txt-angle {
  color: #fff;
  font-weight: 700;
}

.chat-txt-bracket {
  color: #ffc107;
  font-weight: 700;
}

.chat-txt-brace {
  color: #fd7e14;
  font-weight: 700;
}

.chat-msg--tipo-1 .chat-txt-angle,
.chat-msg--tipo-1 .chat-txt-bracket,
.chat-msg--tipo-1 .chat-txt-brace {
  font-family: "Roboto Slab", "Times New Roman", serif;
  font-weight: 700;
}

.chat-txt-self {
  background: #dc3545;
  color: #fff;
  font-weight: 600;
  padding: 0 0.2em;
  border-radius: 2px;
}

.chat-txt-png {
  display: inline;
  margin: 0;
  background: rgba(88, 169, 163, 0.22);
  color: #ceeeea;
  border: 0;
  border-radius: 0.25rem;
  padding: 0.05em 0.28em;
  font-family: "Roboto", Arial, Helvetica, sans-serif !important;
  font-size: inherit !important;
  font-style: normal;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: normal;
  text-align: inherit;
  text-decoration: none;
  text-transform: none !important;
  cursor: inherit;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

button.chat-txt-png:hover,
button.chat-txt-png:focus,
button.chat-txt-png:focus-visible {
  background: rgba(88, 169, 163, 0.22);
  color: #ceeeea;
  text-decoration: none;
  text-transform: none !important;
  outline: none;
  box-shadow: none;
}

.chat-msg--tipo-1 .chat-txt-png .chat-txt-angle {
  font-family: "Roboto Slab", "Times New Roman", serif !important;
  font-weight: 700;
  text-transform: none;
  color: #fff;
}

.chat-page__textarea-shell--png-mention {
  position: relative;
}

.chat-png-mention-tooltip {
  position: absolute;
  left: 0.65rem;
  bottom: calc(100% + 0.35rem);
  z-index: 20;
  min-width: 220px;
  max-width: min(320px, 100%);
  padding: 0.5rem 0.6rem;
  background: #212529;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.35);
}

.chat-png-mention-tooltip__label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #adb5bd;
  margin-bottom: 0.35rem;
}

.chat-png-mention-tooltip .rumors-autocomplete-list {
  z-index: 21;
}

.background-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.background-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: none;
}

.vfx-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Responsive come lo sfondo: proporzioni mantenute e crop se necessario */
  object-fit: cover;
  object-position: center center;
  opacity: 1;
  mix-blend-mode: screen;
  pointer-events: none;
  display: block;
}

.weather-color-fallback {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.weather-color-fallback--subtle {
  background: rgba(35, 40, 46, 0.24);
}

.weather-color-fallback--storm {
  background: rgba(26, 30, 36, 0.20);
}


.admin-meteo-icon-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  width: 100%;
}

.admin-meteo-choice {
  display: block;
  position: relative;
  width: 100%;
  margin: 0;
  cursor: pointer;
}

.admin-meteo-choice-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.admin-meteo-icon-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 6px 8px;
  width: 100%;
  text-align: center;
  background: rgba(0, 0, 0, 0.15);
  min-height: 78px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.admin-meteo-icon-label img {
  display: block;
  margin: 0 auto 4px;
  width: 32px;
  height: 32px;
}

.admin-meteo-icon-label small {
  display: block;
  color: #c8c8c8;
  text-transform: capitalize;
  font-size: 0.74rem;
  line-height: 1.1;
}

.admin-meteo-choice:hover .admin-meteo-icon-label {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.admin-meteo-choice-input:checked + .admin-meteo-icon-label {
  border-color: #0d6efd;
  box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.55);
  background: rgba(13, 110, 253, 0.15);
}

.admin-meteo-state-box {
  border: 1px solid rgba(173, 181, 189, 0.28);
  border-radius: 8px;
  padding: 0.6rem;
  background: rgba(0, 0, 0, 0.12);
  height: 100%;
}

/* Tooltip sopra le custom modal (z-index modali ~2000+) */
.tooltip {
  z-index: 5000 !important;
}

.tooltip.chat-indaga-tooltip {
  z-index: 200010 !important;
}


/* === Meteo page === */

.meteo-page {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: wrap;
}

/* Colonna sinistra */
.meteo-col-left {
  flex: 0 0 220px;
  max-width: 220px;
}

/* Tab slot buttons — solo layout container */
.meteo-slot-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* Pannelli slot: nascosti di default, visibili con is-active */
.meteo-slot-panel {
  display: none;
}

.meteo-slot-panel.is-active {
  display: block;
}

/* Icona meteo principale */
.meteo-main-icon {
  text-align: center;
  margin-bottom: 10px;
}

.meteo-main-icon img {
  width: 140px;
  height: 140px;
}

/* Stat list (temperatura / vento) */
.meteo-stat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meteo-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.meteo-stat-item img {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* Label data/ora oggi */
.meteo-today-label {
  margin-top: 10px;
  margin-bottom: 10px;
  text-align: center;
  font-size: 0.8rem;
  color: #f8f9fa;
}

/* Colonna destra: previsioni */
.meteo-col-right {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meteo-forecast-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meteo-day-name {
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
  color: #ffffff;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.03em;
  flex: 0 0 60px;
}

.meteo-forecast-slots {
  display: flex;
  gap: 10px;
}

.meteo-forecast-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.meteo-slot-label {
  font-size: 10px;
  color: #f8f9fa;
  text-transform: uppercase;
  font-family: 'Roboto Condensed', sans-serif;
}

.meteo-forecast-slot img {
  width: 28px;
  height: 28px;
}

@media (max-width: 991.98px) {
  .meteo-col-left {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* === Luna page === */

.luna-page {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
  min-height: 0;
  flex: 1 1 auto;
}

.luna-col-left {
  flex: 0 0 220px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.luna-col-left .meteo-main-icon {
  margin-bottom: 0;
}

.luna-col-left .meteo-today-label {
  margin-top: 0;
  margin-bottom: 0;
}

.luna-col-right {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.luna-forecast-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex: 1 1 0;
  min-height: 0;
}

.luna-forecast-times {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.luna-time-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #f8f9fa;
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .luna-col-left {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

.gestione-link-btn {
  font-size: 1.15rem;
}

.gestione-link-btn .fw-semibold {
  font-size: 1.2rem;
}

.gestione-link-desc {
  font-size: 1rem;
  text-transform: none !important;
}


/* Admin Rumor: accordion margin fix for small modals */
#adminRumorAccordion {
  margin-bottom: 10px !important;
}

/* Utility: già usata in helpdesk, messaggi, ticket (override uppercase engine) */
.text-transform-none {
  text-transform: none !important;
}

/* Global accordion styles */
.accordion-item {
  border: none !important;
  border-radius: 10px !important;
  margin-bottom: 0.5rem !important;
  background: linear-gradient(145deg, rgba(33,37,41,0.6), rgba(19,21,23,0.6)) !important;
}

.accordion-button {
  background: transparent !important;
  color: #a8a7a7 !important;
  font-family: 'Roboto Condensed', 'Roboto', Arial, sans-serif !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 10px !important;
}

.accordion-button:not(.collapsed) {
  background: transparent !important;
  color: #a8a7a7 !important;
  box-shadow: none !important;
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2358a9a3'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
  filter: none !important;
}

.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2358a9a3'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
  filter: none !important;
}

.accordion-body {
  background: rgba(19, 21, 23, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 0 0 10px 10px !important;
  color: #a8a7a7 !important;
  padding: 5px !important;
  box-sizing: border-box !important;
}

/* Helpdesk (modale glass): pannelli contenuto semi-trasparenti */
.helpdesk-page .helpdesk-glass-panel {
  background: rgba(19, 21, 23, 0.3);
  border: none !important;
  backdrop-filter: none;
}

/* Helpdesk: form nuova notifica con background dark per visibilit� bottoni BB code */
.helpdesk-page #notifica-globale-form {
  background-color: var(--bs-body-bg);
  border: none;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 0.5rem;
}


/* Helpdesk: tab scroll container */
.helpdesk-page .helpdesk-tabs.helpdesk-tabs-scroll {
  flex-wrap: nowrap;
}

.helpdesk-page .helpdesk-tabs.helpdesk-tabs-scroll::after {
  display: none;
}

/* Helpdesk: editor BBCode (wrapper) senza border/background, sia in nuovo ticket che in risposta */
.helpdesk-page .bbcode-editor-wrap {
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem;
}

/* Helpdesk: la sola textarea mantiene lo stesso background degli altri input testuali, senza border */
.helpdesk-page .bbcode-editor-wrap textarea.form-control,
.helpdesk-page textarea.helpdesk-reply-textarea {
  background-color: rgba(0, 0, 0, 0.5) !important;
  border: none !important;
}

/* Helpdesk: notifiche */
body.app-shell .helpdesk-page .notifica-item {
  background: rgba(19, 21, 23, 0.8) !important;
  color: #f8f9fa;
  margin: 10px 0 !important;
}

body.app-shell .helpdesk-page .notifica-item > .small,
body.app-shell .helpdesk-page #helpdesk-pane-notifiche .notifica-item > .small {
  color: #cecece !important;
}

/* Helpdesk: lista ticket (hover stile forum) */
.helpdesk-page .helpdesk-ticket-row {
  background: transparent;
  color: #adb5bd;
  border: none;
  border-left: 2px solid transparent;
}

.helpdesk-page .helpdesk-ticket-row:hover,
.helpdesk-page .helpdesk-ticket-row:focus,
.helpdesk-page .helpdesk-ticket-row.active {
  color: #fff;
  background: rgba(88, 169, 163, 0.15);
  border-left-color: #58a9a3;
}

.helpdesk-page .helpdesk-ticket-row .fw-semibold {
  color: #f8f9fa;
}

/* Helpdesk: dettaglio ticket */
.helpdesk-page .helpdesk-ticket-detail-messages {
  background: rgba(19, 21, 23, 0.5);
  border: none;
}

/* Helpdesk: messaggi ticket */
.helpdesk-page .helpdesk-ticket-message {
  background: transparent;
  border: none;
  color: #f8f9fa;
}

.helpdesk-page .helpdesk-ticket-message + .helpdesk-ticket-message::before {
  content: '';
  display: block;
  height: 1px;
  width: 80%;
  margin: 0.5rem auto;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}

.helpdesk-page .helpdesk-ticket-message-badge {
  background: #58a9a3;
  color: #111;
  font-size: 0.75rem;
}

/* Helpdesk: FAQ */
.helpdesk-page .helpdesk-faq-accordion,
.helpdesk-page .helpdesk-faq-accordion .accordion-item {
  border: none !important;
}

.helpdesk-page .helpdesk-faq-accordion .accordion-body,
.helpdesk-page .helpdesk-faq-accordion .accordion-body * {
  color: #f8f9fa !important;
}

/* --- Scheda — Collectibles AOPRI --- */
.scheda-collectibles {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.scheda-collectibles__toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.15rem;
}

.scheda-collectibles__incanti-slots {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  font-size: 12px;
  color: #f8f9fa;
  line-height: 1.2;
  white-space: nowrap;
  background: rgba(19, 21, 23, 0.5);
  border-radius: 0.375rem;
  padding: 0.35rem 0.65rem;
}

.scheda-collectibles__serie {
  background: rgba(19, 21, 23, 0.5);
  padding: 10px;
  border-radius: 0.375rem;
}

.scheda-collectibles__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.scheda-collectibles__title {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #f8f9fa;
  line-height: 1.2;
}

.scheda-collectibles__counter {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  font-size: 12px;
  color: #f8f9fa;
  line-height: 1.2;
  white-space: nowrap;
}

.scheda-collectibles__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 0.75rem;
}

.scheda-collectibles__item {
  width: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.scheda-collectibles__slot {
  width: 60px;
  height: 84px;
  flex-shrink: 0;
}

.scheda-collectibles__card-back,
.scheda-collectibles__card-front {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 0.35rem;
  overflow: hidden;
  box-sizing: border-box;
  border: 1.5px solid #58a9a3;
  box-shadow:
    inset 0 0 0 1px rgba(88, 169, 163, 0.28),
    0 2px 6px rgba(0, 0, 0, 0.45);
}

.scheda-collectibles__card-back {
  background:
    radial-gradient(ellipse at center, rgba(88, 169, 163, 0.45) 0%, transparent 62%),
    linear-gradient(145deg, #1a2e2c 0%, #2a4a47 42%, #12201e 100%);
}

.scheda-collectibles__card-back-frame {
  position: absolute;
  inset: 4px;
  border-radius: 0.2rem;
  border: 1px solid rgba(88, 169, 163, 0.75);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.scheda-collectibles__card-back-pattern {
  position: absolute;
  inset: 7px;
  border-radius: 0.12rem;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(88, 169, 163, 0.18) 0 2px,
      transparent 2px 7px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(88, 169, 163, 0.12) 0 2px,
      transparent 2px 7px
    );
  opacity: 0.85;
  pointer-events: none;
}

.scheda-collectibles__card-back-emblem {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1.5px solid rgba(130, 200, 194, 0.95);
  border-radius: 0.15rem;
  background:
    radial-gradient(circle at center, rgba(88, 169, 163, 0.4) 0%, transparent 70%),
    rgba(18, 32, 30, 0.8);
  box-shadow:
    0 0 0 3px rgba(18, 32, 30, 0.55),
    inset 0 0 6px rgba(88, 169, 163, 0.3);
  pointer-events: none;
}

.scheda-collectibles__card-back-emblem::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(88, 169, 163, 0.6);
  border-radius: 0.08rem;
}

.scheda-collectibles__card-front {
  background: linear-gradient(180deg, #1e3331 0%, #12201e 100%);
}

.scheda-collectibles__card-front-frame {
  position: absolute;
  inset: 3px;
  border-radius: 0.2rem;
  border: 1px solid rgba(88, 169, 163, 0.85);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 2;
}

.scheda-collectibles__card-front-art {
  position: absolute;
  inset: 5px;
  border-radius: 0.12rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.scheda-collectibles__card-front-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scheda-collectibles__card-front-empty {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at center, rgba(88, 169, 163, 0.25) 0%, transparent 65%),
    linear-gradient(145deg, #1a2e2c, #12201e);
}

.scheda-collectibles__meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  text-align: center;
  min-width: 0;
}

.scheda-collectibles__card-name {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.15;
  text-transform: uppercase;
  color: #f8f9fa;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheda-collectibles__card-qty {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.1;
  color: #f8f9fa;
}

.scheda-collectibles__item.is-owned.is-face-back .scheda-collectibles__card-back {
  opacity: 1;
}

.scheda-collectibles__item.is-locked .scheda-collectibles__card-back {
  opacity: 0.32;
  filter: grayscale(0.35);
}

.scheda-collectibles__item.is-locked .scheda-collectibles__card-name,
.scheda-collectibles__item.is-locked .scheda-collectibles__card-qty {
  opacity: 0.55;
}

.scheda-collectibles__item.is-clickable .scheda-collectibles__slot {
  cursor: pointer;
}

.scheda-collectibles__item.is-clickable .scheda-collectibles__slot:focus-visible {
  outline: 2px solid rgba(88, 169, 163, 0.85);
  outline-offset: 2px;
}

.scheda-collectibles-modal__title {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  font-size: 13px;
  color: #f8f9fa;
}

.scheda-collectibles-modal__desc {
  color: #cecece;
  overflow: auto;
  max-height: 12rem;
}

.scheda-collectibles-modal__desc::after {
  content: "";
  display: table;
  clear: both;
}

.scheda-collectibles-modal__img {
  float: left;
  width: 70px;
  height: 70px;
  object-fit: cover;
  margin: 0 0.75rem 0.5rem 0;
  border: 0;
  background: transparent;
  display: block;
}

.scheda-collectibles-modal__qty {
  max-width: 4.5rem;
}

/* --- Scheda — Zaino --- */
.scheda-zaino-root {
  --zaino-slot-size: 64px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: min(74vh, 640px);
}

.scheda-zaino-root .nav-tabs.nav-tabs-dark {
  flex-shrink: 0;
}

.zaino-tab-content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #444;
  border-top: none;
  border-radius: 0 0 0.375rem 0.375rem;
  background-color: rgb(33, 37, 41);
  padding: 0.75rem;
  overflow: hidden;
}

.zaino-search-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.zaino-search-panel__filters {
  flex-shrink: 0;
  background: rgba(33, 37, 41, 0.35);
  border-radius: 8px;
  padding: 0.75rem;
}

.zaino-search-results-list {
  height: 150px;
  min-height: 150px;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(160, 170, 180, 0.25);
  border-radius: 8px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35);
  padding: 0;
  display: flex;
  flex-direction: column;
}

.zaino-search-results-list__label {
  color: rgba(206, 206, 206, 0.75);
}

.zaino-search-results-list__item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #cecece;
  padding: 0.4rem 0.65rem;
  font-size: 0.875rem;
  line-height: 1.3;
  cursor: pointer;
}

.zaino-search-results-list__item:hover:not(.is-selected) {
  background: rgba(255, 255, 255, 0.06);
}

.zaino-search-results-list__item.is-selected,
.zaino-search-results-list__item[aria-selected="true"] {
  background-color: #495057;
  color: #f8f9fa;
}

.zaino-search-results-list__item.d-none {
  display: none;
}

.zaino-search-panel__results {
  background-color: transparent;
}

.zaino-item-card__commento {
  font-family: "Roboto Slab", "Times New Roman", serif;
  color: var(--bs-secondary);
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  text-align: center;
}

.zaino-item-card__commento::before {
  content: "� ";
}

.zaino-item-card__commento::after {
  content: " �";
}

.zaino-item-card__context-badge {
  background-color: #6c757d;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
}

.zaino-equip-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.zaino-equip-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.75rem;
  height: 100%;
}

.zaino-equip-figure-area {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  max-height: 100%;
  padding: 5px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
}

.zaino-equip-figure-wrap {
  position: relative;
  height: 100%;
  max-height: 100%;
  width: auto;
  max-width: 100%;
  aspect-ratio: 240 / 520;
  flex: 0 0 auto;
  margin-left: auto;
  margin-right: auto;
  overflow: visible;
}

.zaino-silhouette {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
  user-select: none;
}

.zaino-equip-slots-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.zaino-slot-group {
  position: absolute;
  display: flex;
  pointer-events: none;
}

.zaino-slot-group--viso-collo {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: row;
  align-items: flex-start;
  gap: 0.45rem;
}

.zaino-slot-group--vestiario {
  top: 21%;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.zaino-slot-group .zaino-equip-slot {
  position: static;
  transform: none;
}

.zaino-equip-slot {
  position: absolute;
  width: var(--zaino-slot-size);
  pointer-events: auto;
}

.zaino-equip-slot__box {
  width: var(--zaino-slot-size);
  height: var(--zaino-slot-size);
  border: 1px dashed rgba(206, 206, 206, 0.45);
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.zaino-equip-slot--filled .zaino-equip-slot__box {
  border-style: solid;
  border-color: rgba(206, 206, 206, 0.65);
  align-items: stretch;
  justify-content: stretch;
}

.zaino-equip-slot--filled .zaino-equip-slot__filled {
  width: 100%;
  height: 100%;
}

.zaino-equip-slot--clickable {
  cursor: pointer;
}

.zaino-equip-slot--clickable:focus-visible .zaino-equip-slot__box {
  outline: 2px solid rgba(13, 110, 253, 0.65);
  outline-offset: 2px;
}

.zaino-equip-slot__filled {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.zaino-equip-slot__img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  display: block;
}

.zaino-equip-slot__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(206, 206, 206, 0.5);
  font-size: 0.85rem;
}

.zaino-equip-slot__empty {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(206, 206, 206, 0.15);
}

.zaino-equip-slot--6 { top: 28%; left: -6%; }
.zaino-equip-slot--7 { top: 28%; right: -6%; left: auto; }
.zaino-equip-slot--8 { bottom: 4%; left: 18%; top: auto; }
.zaino-equip-slot--9 { bottom: 4%; right: 18%; left: auto; top: auto; }

.zaino-locomozione-wrap {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
}

.zaino-locomozione-wrap .zaino-equip-slot {
  position: static;
}

.zaino-equip-sidebar {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 0.75rem;
}

.zaino-equip-sidebar__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.zaino-bag-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.zaino-deposito-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.zaino-deposito-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.35rem 0;
  background: transparent;
  box-shadow: none;
}

.zaino-deposito-nav__list {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
}

.zaino-deposito-nav__link {
  white-space: nowrap;
  font-size: 0.75rem;
}

.zaino-deposito-section__title {
  font-size: 0.95rem;
}

.zaino-deposito-panel .zaino-bag-list {
  max-height: none;
}

.zaino-item-card--hidden .zaino-item-card__img--hidden {
  opacity: 0.55;
}

.zaino-item-card__desc-cd {
  margin-bottom: 0.35rem;
}

.zaino-item-card__spoiler--inline {
  margin-top: 0;
}

.zaino-item-card__spoiler-body {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.zaino-item-card__spoiler-col--meta {
  flex: 0 0 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.zaino-item-card__spoiler-title {
  font-size: 0.875rem;
  line-height: 1.2;
  width: 100%;
}

.zaino-item-card__spoiler-col--desc {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.zaino-item-card__spoiler-text {
  flex: 1 1 auto;
  line-height: 1.45;
  overflow-y: auto;
}

.zaino-item-card__spoiler summary {
  cursor: pointer;
  user-select: none;
}

.zaino-item-card__spoiler-img {
  flex-shrink: 0;
}

.zaino-item-card {
  border-radius: 0.375rem;
  border: none;
}

.zaino-item-card__body {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  min-height: 160px;
}

.zaino-item-card__col--meta {
  flex: 0 0 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
}

.zaino-item-card__col--desc {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.zaino-item-card__col--actions {
  flex: 0 0 220px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  align-self: stretch;
}

.zaino-item-card__col--actions-icons-only {
  flex: 0 0 auto;
  min-width: 0;
}

.zaino-item-card__header-stats {
  flex-shrink: 0;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.zaino-item-card__header-stats .mercato-offerta-stats {
  margin-bottom: 0;
  justify-content: flex-end;
}

.zaino-item-card__action-icons {
  flex-shrink: 0;
}

.zaino-item-card__col--meta .zaino-item-card__title {
  font-size: 0.875rem;
  line-height: 1.2;
  min-height: 2.4em;
  flex-shrink: 0;
}

.zaino-item-card__visual {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.zaino-item-card__stats {
  flex-shrink: 0;
  line-height: 1.35;
}

.zaino-item-card .mercato-offerta-card__badges {
  flex-shrink: 0;
  line-height: 1;
}

.zaino-item-card .mercato-offerta-stats {
  color: #a8a7a7;
  line-height: 1.3;
}

.zaino-item-card .mercato-offerta-stats__item {
  white-space: nowrap;
}

.zaino-item-card .mercato-offerta-stats__item:not(:last-child)::after {
  content: '�';
  margin-left: 0.5rem;
  color: var(--bs-secondary);
}

.zaino-item-card .mercato-slot-icon {
  cursor: default;
  line-height: 0;
}

.zaino-item-card .mercato-slot-icon__box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  box-sizing: border-box;
  border: 1px solid #4a4f54;
  border-radius: 0.375rem;
  color: #4a4f54;
  background: transparent;
}

.zaino-item-card .mercato-slot-icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.zaino-item-card__desc {
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: 100%;
  line-height: 1.45;
}

.zaino-item-card__desc--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
}

.zaino-item-card__action-block {
  flex-shrink: 0;
}

.zaino-item-card__action-block--center {
  flex-shrink: 0;
}

.zaino-item-form__row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.zaino-item-form__row--commento .zaino-item-form__commento {
  flex: 1 1 auto;
  min-width: 0;
}

.zaino-item-form__row--indossa-lato {
  flex-wrap: wrap;
}

.zaino-item-form__row--indossa-lato .zaino-item-form__btn {
  flex: 1 1 100%;
  width: 100%;
}

.zaino-item-form--contents {
  display: contents;
}

.zaino-item-form__dest {
  flex: 1 1 0;
  min-width: 0;
  font-size: 0.75rem;
}

.zaino-item-form__qty {
  flex: 0 0 50px;
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  padding-left: 0.25rem;
  padding-right: 1.35rem;
  font-size: 0.75rem;
  text-align: center;
  background-position: right 0.25rem center;
  background-size: 10px 8px;
}

.zaino-item-form__btn {
  flex: 1 1 auto;
  min-width: 0;
}

.zaino-item-form .form-select {
  font-size: 0.75rem;
}

#atp-zaino-slot-item-modal .modal-dialog {
  max-width: 720px;
}

#atp-zaino-slot-item-modal .modal-body {
  padding: 0.75rem;
}

#atp-zaino-slot-item-modal .modal-body.scheda-v2-zaino .mercato-offerta-card.zaino-item-card{
  margin-bottom:0!important;
}

.zaino-item-card__img:not(.mercato-offerta-card__img){
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 0.25rem;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.zaino-item-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(206, 206, 206, 0.5);
  font-size: 1.1rem;
}

@media (max-width: 480px) {
  .scheda-zaino-root {
    --zaino-slot-size: 56px;
    height: min(70vh, 560px);
  }
}


/* Guest layout (pre-login): barre sopra/sotto con lo stesso stile delle colonne laterali interne */
body.guest-shell.bg-image,
body.bg-image.atp-logout-page {
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

body.guest-shell.bg-image.bg-day,
body.bg-image.atp-logout-page.bg-day {
  background-image: url('/atp/public/assets/img/bg-day.png');
}

body.guest-shell.bg-image.bg-night,
body.bg-image.atp-logout-page.bg-night {
  background-image: url('/atp/public/assets/img/bg-night.png');
}

/* Fallback se manca la classe oraria */
body.guest-shell.bg-image:not(.bg-day):not(.bg-night),
body.bg-image.atp-logout-page:not(.bg-day):not(.bg-night) {
  background-image: url('/atp/public/assets/img/bg-day.png');
}

.guest-shell-bar {
  position: relative;
  border: 0;
  border-radius: 0;
  background: linear-gradient(145deg, rgba(33, 37, 41, 0.58), rgba(19, 21, 23, 0.65));
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: none;
}

/* Guest nav: link #f8f9fa + glow/underline come logout layout interno */
body.guest-shell .guest-shell-nav-link {
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
  color: #f8f9fa !important;
  text-decoration: none !important;
  text-shadow: none;
  transition: color 0.35s ease-in-out, text-shadow 0.35s ease-in-out;
}

body.guest-shell .guest-shell-nav-link::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.45s ease-in-out;
  pointer-events: none;
}

body.guest-shell .guest-shell-nav-link:hover,
body.guest-shell .guest-shell-nav-link:focus-visible {
  color: #fff !important;
  text-decoration: none !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.7), 0 0 18px rgba(255, 255, 255, 0.3);
}

body.guest-shell .guest-shell-nav-link:hover::before,
body.guest-shell .guest-shell-nav-link:focus-visible::before {
  transform: translateX(-50%) scaleX(1);
}

body.guest-shell .guest-shell-footer {
  min-height: 0;
}

body.guest-shell .guest-shell-footer-copy {
  font-size: 0.72rem;
  line-height: 1.35;
  color: #adb5bd;
  gap: 0.25rem;
  min-width: 0;
}

body.guest-shell .guest-shell-footer-legal {
  font-size: 13px;
  line-height: 1.35;
  color: #f8f9fa;
}

body.guest-shell .guest-shell-footer-disclaimer {
  max-width: 58rem;
  text-align: justify;
}

body.guest-shell .guest-shell-content-warnings {
  display: grid;
  grid-template-columns: repeat(4, 24px);
  grid-template-rows: repeat(2, 24px);
  gap: 4px;
  align-content: center;
}

body.guest-shell .guest-shell-content-warning {
  display: inline-block;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  box-sizing: border-box;
  border-radius: 0.25rem;
  border: 1px dashed rgba(248, 249, 250, 0.35);
  background: rgba(248, 249, 250, 0.08);
  cursor: help;
}

body.guest-shell .guest-shell-footer-support {
  align-self: stretch;
}

body.guest-shell .guest-shell-support-link {
  height: 100%;
  min-height: 100%;
  color: #adb5bd;
  text-decoration: none !important;
}

body.guest-shell .guest-shell-support-link:hover,
body.guest-shell .guest-shell-support-link:focus-visible {
  color: #f8f9fa;
}

body.guest-shell .guest-shell-support-img {
  display: block;
  width: auto;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Tooltip guest: sfondo e freccia neri (frecce BS: end=border-left, start=border-right) */
body.guest-shell .tooltip {
  --bs-tooltip-bg: #000;
  --bs-tooltip-color: #fff;
}

body.guest-shell .tooltip .tooltip-inner {
  background-color: #000 !important;
  color: #fff !important;
}

body.guest-shell .tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: #000 !important;
}

body.guest-shell .tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: #000 !important;
}

body.guest-shell .tooltip.bs-tooltip-end .tooltip-arrow::before,
body.guest-shell .tooltip.bs-tooltip-right .tooltip-arrow::before {
  border-left-color: #000 !important;
}

body.guest-shell .tooltip.bs-tooltip-start .tooltip-arrow::before,
body.guest-shell .tooltip.bs-tooltip-left .tooltip-arrow::before {
  border-right-color: #000 !important;
}

/* --- Modal manager (ex modalManager.css) --- */

.custom-modal {
  position: fixed;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.custom-modal.show { opacity: 1; }

.custom-window {
  position: absolute;
  pointer-events: auto;
  border-radius: 10px;
  width: 700px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  transition:
    top 220ms ease,
    left 220ms ease,
    width 220ms ease,
    height 220ms ease,
    max-width 220ms ease,
    max-height 220ms ease;
  will-change: top, left, width, height;
}

.custom-window.is-dragging {
  transition: none !important;
}

.custom-window.is-mercato-shrinking .modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
}

.custom-window.is-mercato-shrinking .loader {
  margin: 0;
}

.custom-window.minimized { height: 40px; }
.custom-window.minimized .window-header {
  padding: 0 10px;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  align-items: center;
}

.window-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  min-height: 52px;
  user-select: none;
}

.modal-title {
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.window-controls { display: flex; flex-direction: row; align-items: center; justify-content:center; }
.window-controls { flex-shrink: 0; }
.window-controls button {
  width: 32px;
  height: 32px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
}

.modal-body {
  padding: 15px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}

/* Modali: shell flex interno (scroll nei figli, non sul body) */
.custom-modal[data-modal="map-area"] .modal-body,
.custom-modal[data-modal="gilde"] .modal-body,
.custom-modal[data-modal="help"] .modal-body,
.custom-modal[data-modal="anagrafe"] .modal-body,
.custom-modal[data-modal="scheda-personaggio"] .modal-body,
.custom-modal[data-modal="forum"] .modal-body:has(.forum-index-page--modal),
.custom-modal[data-modal="radio"] .modal-body,
.custom-modal .modal-body:has(.admin-car-page--in-modal),
.custom-modal .modal-body:has(.admin-faq-page--in-modal),
.custom-modal .modal-body:has(.admin-manuale-page--in-modal),
.custom-modal .modal-body:has(.admin-background-root--in-modal),
.custom-modal .modal-body:has([data-luna-page="1"]) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.custom-modal[data-modal="gilde"] .modal-body,
.custom-modal[data-modal="help"] .modal-body,
.custom-modal[data-modal="anagrafe"] .modal-body,
.custom-modal[data-modal="forum"] .modal-body:has(.forum-index-page--modal) {
  padding-bottom: 10px;
}

body.app-shell .custom-modal[data-modal="scheda-personaggio"] .modal-body {
  padding: 0;
  overflow: hidden;
}

body.app-shell .custom-modal[data-modal="scheda-personaggio"] .custom-window {
  overflow: visible;
}

.custom-modal[data-modal="gilde"] .modal-body > *,
.custom-modal[data-modal="help"] .modal-body > *,
.custom-modal[data-modal="anagrafe"] .modal-body > .anagrafe-page,
.custom-modal[data-modal="scheda-personaggio"] .modal-body > .scheda-v2-page,
.custom-modal[data-modal="forum"] .modal-body:has(.forum-index-page--modal) > *,
.custom-modal[data-modal="radio"] .modal-body > *,
.custom-modal .modal-body:has(.admin-car-page--in-modal) > .admin-car-page--in-modal,
.custom-modal .modal-body:has(.admin-faq-page--in-modal) > .admin-faq-page--in-modal,
.custom-modal .modal-body:has(.admin-background-root--in-modal) > .admin-background-root--in-modal,
.custom-modal .modal-body:has([data-luna-page="1"]) > [data-luna-page="1"] {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.custom-modal[data-modal="map-area"] .modal-body > .map-area-modal-root {
  flex: 0 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

.custom-modal .modal-body:has(.admin-car-page--in-modal) > *:not(.admin-car-page--in-modal),
.custom-modal .modal-body:has(.admin-faq-page--in-modal) > *:not(.admin-faq-page--in-modal),
.custom-modal .modal-body:has(.admin-background-root--in-modal) > *:not(.admin-background-root--in-modal) {
  flex-shrink: 0;
}

/* tutorial modal: header/footer fissi, scroll solo nel testo interno */
.custom-modal .modal-body:has(.tutorial-modal-page) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
}

.custom-modal .modal-body:has(.tutorial-modal-page) > .tutorial-modal-page {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.tutorial-modal-header,
.tutorial-modal-footer {
  flex-shrink: 0;
  padding: 0.75rem 0.9375rem;
  position: relative;
}

.tutorial-modal-header--divided::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tutorial-modal-footer--divided::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.tutorial-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.9375rem;
}

.tutorial-modal-step {
  min-width: 0;
}

.tutorial-modal-breadcrumbs-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  text-align: center;
}

.tutorial-modal-breadcrumbs-wrap .breadcrumb {
  min-width: max-content;
}

.tutorial-modal-breadcrumbs-wrap .breadcrumb-item + .breadcrumb-item::before {
  color: #6c757d;
}

.tutorial-modal-breadcrumb-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-transform: inherit;
  text-decoration: none;
}

.tutorial-modal-breadcrumb-btn:hover,
.tutorial-modal-breadcrumb-btn:focus {
  text-decoration: none;
}

.theme-glass .custom-window {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  color: #fff;
}
.theme-glass .window-controls button { color: #fff !important; }
.theme-glass .window-header { background: rgba(0,0,0,0.4); }

/* Urban fantasy modals — layout bootstrap (body.app-shell) + guest layout pre-login (body.guest-shell) */
body.app-shell .custom-window,
body.guest-shell .custom-window {
  border: 0;
  overflow: visible;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.72),
    0 0 28px rgba(77, 184, 201, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.app-shell .custom-window::before,
body.guest-shell .custom-window::before {
  display: none;
}

body.app-shell .custom-window > .window-header,
body.guest-shell .custom-window > .window-header {
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

body.app-shell .custom-window > .modal-body,
body.guest-shell .custom-window > .modal-body {
  border-radius: 0 0 10px 10px;
  overflow: hidden auto;
}

body.app-shell .theme-glass .custom-window,
body.guest-shell .theme-glass .custom-window {
  background: linear-gradient(145deg, rgba(33, 37, 41, 0.72), rgba(19, 21, 23, 0.78));
  backdrop-filter: blur(14px) saturate(1.15);
  color: #e8ecf4;
}

body.app-shell .theme-glass .window-header,
body.guest-shell .theme-glass .window-header {
  background: linear-gradient(90deg, rgba(201, 162, 89, 0.16), rgba(77, 184, 201, 0.1));
  border-bottom: 0;
}

body.app-shell .custom-modal .modal-title,
body.guest-shell .custom-modal .modal-title {
  color: #a8a7a7 !important;
  letter-spacing: 0.1em;
  text-shadow: 0 0 18px rgba(206, 206, 206, 0.15);
}

body.app-shell .custom-modal .window-controls button,
body.guest-shell .custom-modal .window-controls button {
  color: #a8a7a7 !important;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

body.app-shell .custom-modal .window-controls button svg,
body.guest-shell .custom-modal .window-controls button svg {
  stroke: #a8a7a7;
}

body.app-shell .custom-modal .window-controls button:hover,
body.app-shell .custom-modal .window-controls button:focus-visible,
body.guest-shell .custom-modal .window-controls button:hover,
body.guest-shell .custom-modal .window-controls button:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

body.app-shell .custom-modal .window-controls button:hover svg,
body.app-shell .custom-modal .window-controls button:focus-visible svg,
body.guest-shell .custom-modal .window-controls button:hover svg,
body.guest-shell .custom-modal .window-controls button:focus-visible svg {
  stroke: #fff;
}

body.app-shell .custom-modal .modal-body,
body.guest-shell .custom-modal .modal-body {
  border-top: 0;
}

.fullscreen { width: 90vw !important; height: 90vh !important; }
.minimized .modal-body { display: none; }

/* In stato minimizzato il titolo resta su una sola riga con ellissi. */
.custom-window.minimized .modal-title {
  display: block;
  line-height: 40px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 150px);
}

.custom-window.minimized .window-controls {
  height: 40px;
  align-items: center;
}

.custom-window.minimized .window-controls button {
  height: 32px;
}

.loader {
  border: 3px solid rgba(255,255,255,0.2);
  border-top: 3px solid #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 50px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

/* Registro giocate — condivisione role */
.scheda-registro-list--role-share-active {
  position: relative;
  padding-bottom: 4.5rem;
}

.scheda-registro-list__share-overlay {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
}

.scheda-registro-list__item--selectable,
.scheda-registro-list__banner--selectable {
  border-left: 3px solid rgba(13, 202, 240, 0.55);
}

.scheda-registro-list__share-check .form-check-input:checked {
  background-color: #0dcaf0;
  border-color: #0dcaf0;
}

/* manuale di gioco (modale): colonne con scroll indipendente */
.custom-modal[data-modal="manuale"] .modal-body:has(.manuale-page) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.75rem 1rem 1rem;
}

.custom-modal[data-modal="manuale"] .modal-body:has(.manuale-page) > .manuale-page {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.manuale-page {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.manuale-page__layout {
  display: flex;
  flex: 1 1 auto;
  gap: 1rem;
  min-height: 0;
  align-items: stretch;
}

.manuale-page__nav {
  width: 100%;
  max-width: 300px;
  flex: 0 0 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 0.5rem;
}

.manuale-page__main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.manuale-page__search {
  flex: 0 0 auto;
  padding: 0.25rem 0.25rem 0.5rem 0.5rem;
}

.manuale-page__search .btn {
  white-space: nowrap;
}

.manuale-page__content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0.25rem 0.5rem 0.5rem;
}


.manuale-page__capitoli-list {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.manuale-page__capitolo-link {
  display: block;
  width: 100%;
  padding: 0.45rem 0.85rem 0.45rem 1.1rem;
  color: #adb5bd;
  text-decoration: none;
  font-size: 0.875rem;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  text-align: left;
}

.manuale-page__capitolo-link:hover,
.manuale-page__capitolo-link:focus {
  color: #fff;
  background: rgba(88, 169, 163, 0.15);
  border-left-color: #58a9a3;
}

.manuale-page__capitolo-link.active {
  color: #fff;
  font-weight: 700;
  background: rgba(88, 169, 163, 0.15);
  border-left-color: #58a9a3;
}

.manuale-page__capitolo-title {
  color: #f8f9fa;
}

.manuale-page__capitolo-body.bbcode-content a {
  word-break: break-word;
}

.manuale-page__search-hit {
  background: rgba(88, 169, 163, 0.45);
  color: #fff;
  padding: 0 0.1em;
  border-radius: 0.15rem;
}

.manuale-page__search-empty {
  color: #adb5bd;
}

.manuale-page__search-result {
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.manuale-page__search-result:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.manuale-page__search-result-title {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #f8f9fa;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  padding: 0;
  margin: 0 0 0.3rem;
  cursor: pointer;
  text-decoration: none;
}

.manuale-page__search-result-title:hover,
.manuale-page__search-result-title:focus {
  color: #58a9a3;
  text-decoration: none;
}

.manuale-page__search-result-preview {
  color: #adb5bd;
  font-size: 0.875rem;
  line-height: 1.45;
}

@media (max-width: 767.98px) {
  .manuale-page__layout {
    flex-direction: column;
  }

  .manuale-page__nav {
    max-width: none;
    flex: 0 0 auto;
    max-height: 38vh;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 0;
    padding-bottom: 0.5rem;
  }

  .manuale-page__main {
    flex: 1 1 auto;
  }

  .manuale-page__search,
  .manuale-page__content {
    padding-left: 0;
  }
}

/* Indice PNG: layout come manuale, indice a destra */
.custom-modal[data-modal="png"] .modal-body:has(.png-page) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.75rem 1rem 1rem;
}

.custom-modal[data-modal="png"] .modal-body:has(.png-page) > .png-page {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.png-page__nav-actions {
  flex: 0 0 auto;
  margin-bottom: 0.5rem;
  padding-right: 0.5rem;
}

.png-page__main-toolbar {
  flex: 0 0 auto;
  margin-bottom: 0.5rem;
  min-width: 0;
}

.png-page .png-page__letters {
  flex: 0 1 auto;
  justify-content: flex-start;
  margin-left: 0;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 0;
}

.png-page .png-page__search {
  flex: 0 1 auto;
  min-width: 0;
  max-width: none;
}

.png-page .png-page__search-field {
  flex: 0 1 10rem;
  min-width: 8rem;
  width: 10rem;
}

.png-page .png-page__search .btn {
  white-space: nowrap;
  align-self: stretch;
}

.png-page .png-page__letters .anagrafe-letter-link.png-page__letter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 28px;
  padding: 0 5px;
  margin: 0;
  border: 0;
  border-radius: 4px;
  appearance: none;
  background: transparent;
  color: var(--bs-secondary-color, #adb5bd);
  font-size: 15px !important;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, text-shadow 0.15s ease;
}

.png-page .png-page__letters .anagrafe-letter-link.png-page__letter-btn:hover,
.png-page .png-page__letters .anagrafe-letter-link.png-page__letter-btn:focus {
  color: #58a9a3 !important;
  background: rgba(88, 169, 163, 0.18) !important;
  text-shadow: 0 0 8px rgba(88, 169, 163, 0.55), 0 0 14px rgba(88, 169, 163, 0.3);
  outline: none;
}

.png-page .png-page__letters .anagrafe-letter-link.png-page__letter-btn.is-active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.2) !important;
  font-weight: 600;
}

.png-page__ruolo-accordion .accordion-button {
  font-size: 0.875rem;
}

#atp-png-nuovo-modal .modal-body {
  max-height: min(70vh, 640px);
  overflow-y: auto;
}

#atp-png-nuovo-modal .png-nuovo-incanti {
  max-height: 12rem;
  overflow-y: auto;
}

#atp-png-nuovo-modal .png-nuovo-picked {
  max-height: 8rem;
  overflow-y: auto;
}

.png-page__view-title {
  font-family: "Roboto Condensed", "Roboto", Arial, sans-serif;
  text-transform: uppercase;
  font-size: 11.48px;
  letter-spacing: 0.04em;
  color: #adb5bd;
}

.png-record {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.2);
}

.png-record__avatar {
  flex: 0 0 150px;
  width: 150px;
}

.png-record__avatar-img,
.png-record__avatar-placeholder {
  display: block;
  width: 150px;
  height: 200px;
  object-fit: cover;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.06);
}

.png-record__avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 1.5rem;
}

.png-record__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.png-record__name {
  font-weight: 700;
  color: #f8f9fa;
}

.png-record__razza {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.png-record__icons {
  margin-left: 20px;
}

.png-record__role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  padding: 5px;
  border-radius: 50%;
  background: rgba(19, 21, 23, 0.5);
  box-sizing: border-box;
  flex-shrink: 0;
}

.png-record__role-icon {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.png-record__role--placeholder {
  color: #adb5bd;
  font-size: 0.75rem;
  cursor: default;
}

.png-record__badge--share {
  background: #58a9a3 !important;
  color: #fff !important;
}

.png-record__badge--gestionale {
  background: #d12444 !important;
  color: #fff !important;
}

.png-record--focus {
  outline: 1px solid rgba(88, 169, 163, 0.55);
  outline-offset: 2px;
}

.png-record--unapproved .png-record__avatar,
.png-record--unapproved .png-record__identity,
.png-record--unapproved .png-record__desc,
.png-record--unapproved .png-record__footer {
  opacity: 0.55;
}

.png-record--unapproved:not([data-png-approved="2"]) .png-record__actions {
  opacity: 0.55;
}

.admin-png-preview .png-record--unapproved .png-record__avatar,
.admin-png-preview .png-record--unapproved .png-record__identity,
.admin-png-preview .png-record--unapproved .png-record__desc,
.admin-png-preview .png-record--unapproved .png-record__footer,
.admin-png-preview .png-record--unapproved .png-record__actions {
  opacity: 1;
}

.png-record__desc {
  flex: 1 1 auto;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #cecece;
}

.png-page .manuale-page__capitolo-link.is-active {
  color: #fff;
  font-weight: 700;
  background: rgba(88, 169, 163, 0.15);
  border-left-color: #58a9a3;
}

@media (max-width: 767.98px) {
  .png-page__nav {
    max-height: 38vh;
  }

  .png-page .png-page__search {
    width: 100%;
    margin-left: 0 !important;
  }

  .png-page .png-page__search-field {
    flex: 1 1 calc(50% - 0.5rem);
    width: auto;
    min-width: 0;
  }

  .png-record {
    flex-direction: column;
    align-items: center;
  }

  .png-record__body {
    width: 100%;
  }
}

/* admin_manuale in modale */
.custom-modal .modal-body:has(.admin-manuale-page--in-modal) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.custom-modal .modal-body:has(.admin-manuale-page--in-modal) > .admin-manuale-page--in-modal {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.custom-modal .modal-body:has(.admin-manuale-page--in-modal) > *:not(.admin-manuale-page--in-modal) {
  flex-shrink: 0;
}

/* rumors: modal-body non scrolla, scroll solo sulla lista interna, bottone fisso in fondo */
.custom-modal .modal-body:has(.rumors-page--in-modal) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 0;
}
.custom-modal .modal-body:has(.rumors-page--in-modal) > .rumors-page--in-modal {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   FORM DARK THEME — input, select, textarea, label, checkbox
   ========================================================= */

body.app-shell .form-control,
body.app-shell .form-select,
body.app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="image"]):not([type="range"]),
body.app-shell textarea,
body.app-shell select {
  background-color: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  color: #cecece !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.app-shell .form-control:hover,
body.app-shell .form-control:focus,
body.app-shell .form-select:hover,
body.app-shell .form-select:focus,
body.app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="image"]):not([type="range"]):hover,
body.app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="image"]):not([type="range"]):focus,
body.app-shell textarea:hover,
body.app-shell textarea:focus,
body.app-shell select:hover,
body.app-shell select:focus {
  border-color: #58a9a3 !important;
  box-shadow: 0 0 0 3px rgba(88, 169, 163, 0.15), 0 0 10px rgba(88, 169, 163, 0.08) !important;
  outline: none !important;
}

body.app-shell .form-control::placeholder,
body.app-shell input::placeholder,
body.app-shell textarea::placeholder {
  color: rgba(206, 206, 206, 0.35);
}

.form-floating > .form-control::placeholder,
.form-floating > textarea::placeholder,
body.app-shell .form-floating > .form-control::placeholder,
body.app-shell .form-floating > textarea::placeholder {
  color: transparent;
}

.form-floating > label,
body.app-shell .form-floating > label {
  color: var(--bs-secondary-color, #6c757d);
  background: transparent;
  background-color: transparent !important;
}

.form-floating > label::after,
body.app-shell .form-floating > label::after {
  background-color: transparent !important;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > textarea:focus ~ label,
.form-floating > textarea:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label,
.form-floating > input[type="date"]:valid ~ label,
.form-floating > input[type="datetime-local"]:valid ~ label,
.form-floating > input[type="time"]:valid ~ label,
body.app-shell .form-floating > .form-control:focus ~ label,
body.app-shell .form-floating > .form-control:not(:placeholder-shown) ~ label,
body.app-shell .form-floating > textarea:focus ~ label,
body.app-shell .form-floating > textarea:not(:placeholder-shown) ~ label,
body.app-shell .form-floating > .form-select ~ label,
body.app-shell .form-floating > input[type="date"]:valid ~ label,
body.app-shell .form-floating > input[type="datetime-local"]:valid ~ label,
body.app-shell .form-floating > input[type="time"]:valid ~ label {
  color: var(--bs-secondary-color, #6c757d);
  background: transparent;
  background-color: transparent !important;
}

.modal-content.bg-dark .form-floating > label,
.modal-content.bg-dark .form-floating > .form-control:focus ~ label,
.modal-content.bg-dark .form-floating > .form-control:not(:placeholder-shown) ~ label,
.modal-content.bg-dark .form-floating > textarea:focus ~ label,
.modal-content.bg-dark .form-floating > textarea:not(:placeholder-shown) ~ label,
.modal-content.bg-dark .form-floating > .form-select ~ label,
.modal-content.bg-dark .form-floating > input[type="date"]:valid ~ label,
.modal-content.bg-dark .form-floating > input[type="datetime-local"]:valid ~ label,
.modal-content.bg-dark .form-floating > input[type="time"]:valid ~ label,
body.app-shell .custom-modal .form-floating > label,
body.app-shell .custom-modal .form-floating > .form-control:focus ~ label,
body.app-shell .custom-modal .form-floating > .form-control:not(:placeholder-shown) ~ label,
body.app-shell .custom-modal .form-floating > textarea:focus ~ label,
body.app-shell .custom-modal .form-floating > textarea:not(:placeholder-shown) ~ label,
body.app-shell .custom-modal .form-floating > .form-select ~ label,
body.app-shell .custom-modal .form-floating > input[type="date"]:valid ~ label,
body.app-shell .custom-modal .form-floating > input[type="datetime-local"]:valid ~ label,
body.app-shell .custom-modal .form-floating > input[type="time"]:valid ~ label {
  color: rgba(206, 206, 206, 0.75);
  background: transparent;
  background-color: transparent !important;
}

.modal-content.bg-dark .form-floating > label::after,
body.app-shell .custom-modal .form-floating > label::after {
  background-color: transparent !important;
}

.form-floating > .form-control-sm,
.form-floating > .form-select-sm,
body.app-shell .form-floating > .form-control-sm,
body.app-shell .form-floating > .form-select-sm {
  min-height: calc(2.5rem + 2px);
  height: calc(2.5rem + 2px);
  line-height: 1.25;
  padding-top: 1rem;
  padding-bottom: 0.25rem;
}

.form-floating > .form-control-sm ~ label,
.form-floating > .form-select-sm ~ label,
body.app-shell .form-floating > .form-control-sm ~ label,
body.app-shell .form-floating > .form-select-sm ~ label {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  font-size: 0.875rem;
}

.form-label:not(.form-check-label) {
  color: var(--bs-secondary-color, #6c757d);
  background: transparent;
  background-color: transparent !important;
}

body.app-shell label:not(.form-check-label) {
  color: var(--bs-secondary-color, #6c757d);
  background: transparent;
}

body.app-shell .form-check-label {
  color: #cecece !important;
}

body.app-shell .form-check-input {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(88, 169, 163, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.app-shell .form-check-input[type="checkbox"] {
  border-radius: 3px;
}

body.app-shell .form-check-input[type="radio"] {
  border-radius: 50%;
}

body.app-shell .form-check-input:hover,
body.app-shell .form-check-input:focus {
  border-color: #58a9a3;
  box-shadow: 0 0 0 3px rgba(88, 169, 163, 0.15);
}

body.app-shell .form-check-input:checked {
  background-color: #58a9a3;
  border-color: #58a9a3;
}

body.app-shell .form-select:not([multiple]) option,
body.app-shell select:not([multiple]) option {
  background-color: #23262b;
  color: #cecece;
}

body.app-shell .form-select:not([multiple]) option:checked,
body.app-shell select:not([multiple]) option:checked {
  background-color: #d6d6d6 !important;
  color: #212529 !important;
}

body.app-shell .form-select[multiple] option,
body.app-shell select[multiple] option {
  background-color: transparent !important;
  background-image: none !important;
  background: transparent !important;
  color: #f8f9fa !important;
}

body.app-shell .form-select[multiple] option:checked,
body.app-shell select[multiple] option:checked,
body.app-shell .form-select[multiple]:focus option:checked,
body.app-shell select[multiple]:focus option:checked {
  background-color: #0d6efd !important;
  background-image: linear-gradient(0deg, #0d6efd 0%, #0d6efd 100%) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

body.app-shell .form-select[multiple] option:disabled,
body.app-shell select[multiple] option:disabled {
  color: #6c757d !important;
  -webkit-text-fill-color: #6c757d;
}

/* =========================================================
   FORM — spaziatura verticale compatta tra i campi (max 10px)
   I campi erano distanziati per via delle vecchie label, ora float.
   ========================================================= */

body.app-shell form .row {
  --bs-gutter-y: 10px;
}

body.app-shell form .mb-3,
body.app-shell form .mb-4 {
  margin-bottom: 10px !important;
}

body.app-shell form.gap-2,
body.app-shell form .gap-2,
body.app-shell form.gap-3,
body.app-shell form .gap-3,
body.app-shell form.gap-4,
body.app-shell form .gap-4 {
  gap: 10px !important;
}

/* =========================================================
   CUSTOM CARD — utility class riutilizzabile
   ========================================================= */

body.app-shell .custom-card {
  background: rgba(19, 21, 23, 0.4) !important;
  border: 0 !important;
  border-radius: 12px;
  padding: 10px !important;
  margin: 0 !important;
  box-sizing: border-box;
  color: #6c757d;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.app-shell .custom-card.active,
body.app-shell .custom-card.selected {
  transform: scale(1.02);
  box-shadow:
    0 0 0 1px rgba(88, 169, 163, 0.25),
    0 4px 20px rgba(88, 169, 163, 0.1),
    0 0 14px rgba(88, 169, 163, 0.07);
}

/* Meteo / Luna — testo light (override custom-card e ereditarietà container) */
body.app-shell .meteo-page,
body.app-shell .luna-page,
body.app-shell [data-meteo-page="1"],
body.app-shell [data-luna-page="1"] {
  color: #f8f9fa;
}

body.app-shell .meteo-page .custom-card,
body.app-shell .luna-page .custom-card,
body.app-shell [data-meteo-page="1"] .custom-card,
body.app-shell [data-luna-page="1"] .custom-card,
body.app-shell .meteo-page .meteo-stat-item,
body.app-shell .luna-page .meteo-stat-item {
  color: #f8f9fa;
}

/* =========================================================
   FLOATING LABEL via :has() — label PRIMA dell'input (HTML legacy)
   Funziona su tutti i file senza toccare l'HTML
   ========================================================= */

body.app-shell div:has(> label + .form-control),
body.app-shell div:has(> label + .form-select:not([multiple])),
body.app-shell div:has(> label + textarea.form-control) {
  position: relative;
}

body.app-shell div:has(> label + .form-control) > label,
body.app-shell div:has(> label + .form-select:not([multiple])) > label,
body.app-shell div:has(> label + textarea.form-control) > label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  height: 100%;
  padding: 1rem 0.75rem;
  pointer-events: none;
  transform-origin: 0 0;
  transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
  color: var(--bs-secondary-color, #6c757d);
  background: transparent;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.app-shell div:has(> label + .form-control) > .form-control,
body.app-shell div:has(> label + .form-select:not([multiple])) > .form-select:not([multiple]),
body.app-shell div:has(> label + textarea.form-control) > textarea.form-control {
  padding-top: 1.625rem;
  padding-bottom: 0.625rem;
  height: calc(3.5rem + 2px);
  min-height: calc(3.5rem + 2px);
}

body.app-shell div:has(> label + textarea.form-control) > textarea.form-control {
  height: auto;
  min-height: calc(3.5rem + 2px);
}

body.app-shell div:has(> label + .form-control:focus) > label,
body.app-shell div:has(> label + .form-control:not(:placeholder-shown)) > label,
body.app-shell div:has(> label + textarea.form-control:focus) > label,
body.app-shell div:has(> label + textarea.form-control:not(:placeholder-shown)) > label {
  opacity: 0.65;
  transform: scale(0.85) translateY(-0.5rem);
}

body.app-shell div:has(> label + .form-select:not([multiple])) > label {
  opacity: 0.65;
  transform: scale(0.85) translateY(-0.5rem);
}

/* Variante sm */
body.app-shell div:has(> label + .form-control-sm),
body.app-shell div:has(> label + .form-select-sm) {
  position: relative;
}

body.app-shell div:has(> label + .form-control-sm) > label,
body.app-shell div:has(> label + .form-select-sm) > label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  height: 100%;
  padding: 0.5rem 0.5rem;
  pointer-events: none;
  transform-origin: 0 0;
  transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
  color: var(--bs-secondary-color, #6c757d);
  background: transparent;
  margin: 0;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.app-shell div:has(> label + .form-control-sm) > .form-control-sm,
body.app-shell div:has(> label + .form-select-sm) > .form-select-sm {
  padding-top: 1.25rem;
  padding-bottom: 0.15rem;
  height: calc(2.25rem + 2px);
  min-height: calc(2.25rem + 2px);
  font-size: 0.875rem;
}

body.app-shell div:has(> label + .form-control-sm:focus) > label,
body.app-shell div:has(> label + .form-control-sm:not(:placeholder-shown)) > label,
body.app-shell div:has(> label + .form-select-sm) > label {
  opacity: 0.65;
  transform: scale(0.75) translateY(-0.3rem);
}

/* admin_maps — select multiplo Elementi (dopo floating :has) */
body.app-shell .form-select.admin-maps-elemento-select[multiple],
.form-select.admin-maps-elemento-select[multiple],
select.admin-maps-elemento-select[multiple] {
  height: 150px !important;
  min-height: 150px !important;
  max-height: 150px !important;
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  background-image: none !important;
}