/* Battle for Vilegis — overlay sul tema Soft UI */

:root {
  --b4v-gold: #d4b15a;
  --b4v-gold-light: #f0de9a;
  --b4v-burgundy: #7a1f24;
  --b4v-burgundy-deep: #4d1218;
  --b4v-ink: #1c1612;
  --b4v-parchment: #f3e6c8;
  --b4v-muted: #cbbca3;
}

.bg-gradient-primary,
.btn.bg-gradient-primary {
  background-image: linear-gradient(120deg, var(--b4v-burgundy) 0%, #b8862b 55%, var(--b4v-gold) 100%) !important;
  color: #fff !important;
  border: 0;
  box-shadow: 0 8px 18px rgba(77, 18, 24, 0.35);
}

.bg-gradient-primary:hover,
.btn.bg-gradient-primary:hover {
  filter: brightness(1.08);
  color: #fff !important;
}

.text-info.text-gradient {
  background-image: linear-gradient(90deg, var(--b4v-gold-light), var(--b4v-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sidenav.bg-dark {
  background: linear-gradient(180deg, #16120f 0%, #241c16 100%) !important;
  border-right: 1px solid rgba(212, 177, 90, 0.16);
}

#sidenav-main.sidenav {
  display: flex !important;
  flex-direction: column;
  top: 1rem;
  bottom: 1rem;
  height: auto !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  gap: 0.7rem;
}

.b4v-sidenav-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #16120f 0%, #241c16 100%);
  border: 1px solid rgba(212, 177, 90, 0.22);
  border-radius: 1rem;
}

.navbar-vertical.navbar-expand-xs#sidenav-main .navbar-collapse,
#sidenav-collapse-main {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
}

#sidenav-main .sidenav-footer {
  flex: 0 0 auto;
  margin: 0 !important;
}

@media (min-width: 1200px) {
  #sidenav-main.sidenav {
    gap: 0.55rem;
  }

  #sidenav-main .sidenav-header {
    height: 4.1rem;
  }

  #sidenav-main .navbar-brand-img {
    max-height: 44px;
  }

  #sidenav-main .navbar-nav > .nav-item {
    margin-top: 0 !important;
  }

  #sidenav-main .nav-link {
    padding-top: 0.34rem !important;
    padding-bottom: 0.34rem !important;
    margin-bottom: 0 !important;
  }

  #sidenav-main .nav-link .icon {
    width: 1.82rem !important;
    height: 1.82rem !important;
    min-width: 1.82rem !important;
  }

  #sidenav-collapse-main {
    overflow-y: hidden !important;
  }
}

@media (max-width: 1199.98px) {
  #sidenav-main.sidenav {
    gap: 0;
    padding: 0;
    overflow: hidden !important;
    background: linear-gradient(180deg, #16120f 0%, #241c16 100%) !important;
    border: 1px solid rgba(212, 177, 90, 0.22);
    border-radius: 1rem;
    box-shadow: none !important;
  }

  #sidenav-main .b4v-sidenav-panel {
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  #sidenav-main .sidenav-footer {
    margin: 0 1rem 0.35rem !important;
  }

  #sidenav-main .b4v-sidenav-help {
    padding: 0.6rem 0.7rem 0.65rem;
    border-radius: 12px;
    background: rgba(212, 177, 90, 0.12);
    box-shadow: none;
  }
}

.sidenav .navbar-brand-img {
  max-height: 52px;
}

.sidenav hr.horizontal {
  background-image: linear-gradient(90deg, transparent, rgba(212, 177, 90, 0.35), transparent) !important;
}

.sidenav .navbar-nav .nav-link,
.sidenav .nav-link-text {
  color: var(--b4v-parchment) !important;
}

.sidenav .navbar-nav .nav-link:hover,
.sidenav .navbar-nav .nav-link:hover .nav-link-text {
  color: var(--b4v-gold) !important;
}

.sidenav .nav-link .icon,
.sidenav .navbar-nav .nav-link .icon {
  background: rgba(12, 9, 7, 0.55) !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 1px solid rgba(212, 177, 90, 0.28);
}

.sidenav .nav-link .icon svg .color-background,
.sidenav .nav-link .icon svg path {
  fill: var(--b4v-gold) !important;
}

body.dark-page .sidenav .nav-link.active {
  background: rgba(212, 177, 90, 0.16) !important;
  color: var(--b4v-gold-light) !important;
  box-shadow: none;
}

body.dark-page .sidenav .nav-link.active .icon {
  background: linear-gradient(160deg, #5a161c, #16110d) !important;
  border-color: var(--b4v-gold);
}

body.dark-page .sidenav .nav-link.active .icon svg .color-background,
body.dark-page .sidenav .nav-link.active .icon svg path {
  fill: var(--b4v-gold-light) !important;
}

.sidenav .navbar-nav .text-uppercase {
  color: var(--b4v-gold) !important;
  letter-spacing: 0.14em;
}

#sidenav-collapse-main {
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 177, 90, 0.45) transparent;
}

#sidenav-collapse-main::-webkit-scrollbar {
  width: 6px;
}

#sidenav-collapse-main::-webkit-scrollbar-thumb {
  background: rgba(212, 177, 90, 0.4);
  border-radius: 999px;
}

.b4v-sidenav-help {
  padding: 0.7rem 0.75rem 0.75rem;
  border-radius: 14px;
  background: #16110d;
  border: 1px solid rgba(212, 177, 90, 0.32);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

body.dark-page .b4v-sidenav-help h6 {
  margin: 0 0 0.45rem;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--b4v-gold) !important;
}

.b4v-sidenav-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  width: 100%;
  margin: 0 0 0.35rem;
  padding: 0.38rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 177, 90, 0.4);
  background: rgba(12, 9, 7, 0.35);
  color: var(--b4v-parchment) !important;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.15;
  text-align: left;
  box-shadow: none;
}

.b4v-sidenav-btn:last-of-type {
  margin-bottom: 0;
}

.b4v-sidenav-btn i {
  flex: 0 0 auto;
  font-size: 0.85rem;
  color: var(--b4v-gold);
}

.b4v-sidenav-btn:hover {
  background: rgba(212, 177, 90, 0.18);
  border-color: var(--b4v-gold);
  color: var(--b4v-gold-light) !important;
}

.b4v-sidenav-mail {
  margin: 0.45rem 0 0;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 177, 90, 0.22);
  background: rgba(12, 9, 7, 0.28);
}

.b4v-sidenav-mail p {
  margin: 0;
  color: var(--b4v-muted);
  font-size: 0.68rem;
  line-height: 1.3;
}

.b4v-sidenav-mail strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--b4v-gold-light);
  font-weight: 600;
  font-size: 0.72rem;
}

.b4v-sidenav-sponsors {
  margin: 1.25rem 1rem;
  padding: 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(212, 177, 90, 0.28);
}

.b4v-sidenav-sponsors p {
  margin: 0 0 0.45rem;
  color: var(--b4v-gold);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Auth pages */
body.b4v-auth {
  min-height: 100vh;
  margin: 0;
  background: var(--b4v-ink);
  color: var(--b4v-parchment);
  font-family: "Source Sans 3", "Open Sans", sans-serif;
}

.b4v-auth-bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center 42%;
  filter: saturate(1.05);
}

.b4v-auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 14, 16, 0.72) 0%, rgba(10, 14, 16, 0.22) 40%, rgba(10, 14, 16, 0.08) 100%);
}

.b4v-auth-main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 2.5rem 1.25rem 2rem;
  overflow-y: auto;
}

.b4v-auth-main.is-centered {
  justify-content: center;
}

.b4v-auth-main.is-centered .b4v-auth-card {
  margin: auto 0;
}

.b4v-auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.75rem 1.5rem;
  border-radius: 18px;
  background: rgba(22, 16, 12, 0.78);
  border: 1px solid rgba(212, 177, 90, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.b4v-auth-logo {
  display: block;
  max-width: 260px;
  width: 100%;
  height: auto;
  margin: 0 auto 0.75rem;
}

.b4v-auth-kicker {
  text-align: center;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--b4v-gold);
  margin-bottom: 0.35rem;
}

.b4v-auth-card h1 {
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--b4v-gold-light);
  text-align: center;
  margin-bottom: 0.45rem;
}

.b4v-auth-lead {
  text-align: center;
  color: var(--b4v-muted);
  font-size: 0.95rem;
  margin: 0 0 1.15rem;
}

.b4v-auth-card .form-control,
.b4v-auth-card .input-group-outline .form-control {
  background: rgba(12, 9, 7, 0.55);
  color: var(--b4v-parchment);
  border: 1px solid rgba(243, 230, 200, 0.18);
  border-radius: 10px;
}

.b4v-auth-card .form-control::placeholder {
  color: rgba(203, 188, 163, 0.7);
}

.b4v-auth-card .form-control:focus {
  border-color: var(--b4v-gold);
  box-shadow: 0 0 0 2px rgba(212, 177, 90, 0.25);
  background: rgba(12, 9, 7, 0.7);
  color: #fff;
}

.b4v-auth-card .input-group-text {
  display: none;
}

.b4v-auth-password {
  position: relative;
}

.b4v-auth-password .form-control {
  width: 100%;
  padding-right: 2.8rem;
}

.b4v-auth-eye {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  z-index: 3;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--b4v-gold);
  cursor: pointer;
  line-height: 1;
}

.b4v-auth-eye:hover {
  color: var(--b4v-gold-light);
}

.b4v-auth-card label,
.b4v-auth-card .form-check-label,
.b4v-auth-card .text-muted,
.b4v-auth-card a {
  color: var(--b4v-muted) !important;
}

.b4v-auth-card a:hover {
  color: var(--b4v-gold-light) !important;
}

.b4v-auth-card .form-switch .form-check-input {
  background-image: none;
  background-color: rgba(243, 230, 200, 0.25);
  border-color: rgba(212, 177, 90, 0.45);
}

.b4v-auth-card .form-switch .form-check-input:checked {
  background-color: var(--b4v-gold);
  border-color: var(--b4v-gold);
}

.b4v-auth-actions {
  margin-top: 0.5rem;
}

.b4v-auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  color: var(--b4v-muted);
  font-size: 0.92rem;
}

.b4v-auth-legal {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: rgba(203, 188, 163, 0.7);
}

.b4v-auth-legal a {
  color: var(--b4v-gold) !important;
}

.b4v-auth-legal-note {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--b4v-muted);
  line-height: 1.4;
}

.b4v-auth-login {
  justify-content: flex-start;
  gap: 2.5rem 4rem;
  padding-left: clamp(1.25rem, 6vw, 5.5rem);
  padding-right: clamp(1.25rem, 6vw, 5.5rem);
  padding-bottom: 2.5rem;
}

.b4v-auth-login .b4v-auth-card {
  flex-shrink: 0;
}

.b4v-auth-event {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  padding: 2.15rem 2.1rem 1.9rem;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(212, 177, 90, 0.16), transparent 58%),
    rgba(16, 12, 9, 0.62);
  border: 1px solid rgba(212, 177, 90, 0.42);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(240, 222, 154, 0.14);
  backdrop-filter: blur(12px);
  text-align: center;
  overflow: hidden;
}

.b4v-auth-event-frame {
  position: absolute;
  inset: 0.7rem;
  pointer-events: none;
}

.b4v-auth-event-frame span {
  position: absolute;
  width: 1.05rem;
  height: 1.05rem;
  border-color: rgba(212, 177, 90, 0.7);
  border-style: solid;
}

.b4v-auth-event-frame span:nth-child(1) { top: 0; left: 0; border-width: 1px 0 0 1px; }
.b4v-auth-event-frame span:nth-child(2) { top: 0; right: 0; border-width: 1px 1px 0 0; }
.b4v-auth-event-frame span:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.b4v-auth-event-frame span:nth-child(4) { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

.b4v-auth-event-kicker {
  margin: 0 0 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--b4v-gold);
}

.b4v-auth-event-sign {
  display: inline-block;
  margin: 0 0 0.45rem;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 177, 90, 0.38);
  color: var(--b4v-gold-light);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.b4v-auth-event-title {
  margin: 0 0 0.85rem;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--b4v-gold-light);
}

.b4v-auth-event-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 0 0.4rem;
  color: var(--b4v-parchment);
  font-size: 0.95rem;
}

.b4v-auth-event-meta i {
  color: var(--b4v-gold);
  width: 1rem;
}

.b4v-auth-event-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 1rem 0 0;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  background: rgba(122, 31, 36, 0.45);
  border: 1px solid rgba(212, 177, 90, 0.4);
  color: var(--b4v-gold-light);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

.b4v-auth-event-live span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #e05a5a;
  box-shadow: 0 0 0 0 rgba(224, 90, 90, 0.7);
  animation: b4v-live-pulse 1.6s ease-out infinite;
}

.b4v-auth-countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 1.15rem;
}

.b4v-auth-countdown div {
  padding: 0.55rem 0.2rem 0.45rem;
  border-radius: 12px;
  background: rgba(12, 9, 7, 0.45);
  border: 1px solid rgba(212, 177, 90, 0.22);
}

.b4v-auth-countdown strong {
  display: block;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 1.15rem;
  color: var(--b4v-gold-light);
  line-height: 1.1;
}

.b4v-auth-countdown span {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--b4v-muted);
}

.b4v-auth-event-seal {
  width: 4.4rem;
  height: 4.4rem;
  margin: 0.15rem auto 0.95rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--b4v-gold);
  font-size: 1.45rem;
  background: radial-gradient(circle at 50% 42%, rgba(240, 222, 154, 0.18), rgba(16, 12, 9, 0.2) 70%);
  border: 1px solid rgba(212, 177, 90, 0.55);
  box-shadow:
    0 0 0 6px rgba(212, 177, 90, 0.08),
    0 0 28px rgba(212, 177, 90, 0.18);
}

.b4v-auth-event.is-soon .b4v-auth-event-seal {
  animation: b4v-seal-glow 3.6s ease-in-out infinite;
}

.b4v-auth-event-soon {
  margin: 0 0 0.55rem;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #b8862b 0%, #f0de9a 42%, #d4b15a 70%, #f0de9a 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: b4v-gold-shimmer 5.5s ease-in-out infinite;
}

.b4v-auth-event-hint {
  margin: 0;
  color: var(--b4v-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

@keyframes b4v-gold-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes b4v-seal-glow {
  0%, 100% { box-shadow: 0 0 0 6px rgba(212, 177, 90, 0.08), 0 0 22px rgba(212, 177, 90, 0.16); }
  50% { box-shadow: 0 0 0 8px rgba(212, 177, 90, 0.14), 0 0 34px rgba(212, 177, 90, 0.32); }
}

@keyframes b4v-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(224, 90, 90, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(224, 90, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 90, 90, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .b4v-auth-event-soon,
  .b4v-auth-event.is-soon .b4v-auth-event-seal,
  .b4v-auth-event-live span {
    animation: none;
  }
}

.b4v-privacy {
  color: var(--b4v-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.b4v-privacy h5 {
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
  font-family: Cinzel, "Times New Roman", serif;
  color: var(--b4v-gold);
}

.b4v-privacy p,
.b4v-privacy li {
  color: var(--b4v-muted);
}

.b4v-privacy strong {
  color: var(--b4v-parchment);
}

.b4v-privacy a {
  color: var(--b4v-gold);
}

.b4v-privacy a:hover {
  color: var(--b4v-gold-light);
}

.b4v-privacy-updated {
  color: rgba(203, 188, 163, 0.75);
  font-size: 0.85rem;
}

.b4v-faq .accordion-item {
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(212, 177, 90, 0.22);
}

.b4v-faq .accordion-item:first-child {
  border-top: 0;
}

.b4v-faq .accordion-button {
  color: var(--b4v-parchment) !important;
  background: transparent !important;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: none !important;
  padding: 0.95rem 2.4rem 0.95rem 0.25rem;
}

.b4v-faq .accordion-button:hover {
  color: var(--b4v-gold-light) !important;
}

.b4v-faq .accordion-button:not(.collapsed) {
  color: var(--b4v-gold) !important;
  background: rgba(212, 177, 90, 0.08) !important;
}

.b4v-faq .accordion-button::after {
  content: "" !important;
  width: 0.75rem;
  height: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23d4b15a'%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;
  background-repeat: no-repeat;
  background-size: 0.75rem;
  transition: transform 0.2s ease;
}

.b4v-faq .accordion-button:not(.collapsed)::after {
  transform: rotate(-180deg);
}

.b4v-faq .accordion-body {
  color: var(--b4v-muted);
  padding: 0 0.25rem 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
}

.b4v-faq .accordion-body a {
  color: var(--b4v-gold);
}

.b4v-faq .accordion-body a:hover {
  color: var(--b4v-gold-light);
}

.b4v-faq-search {
  width: min(100%, 22rem);
}

.b4v-faq-empty {
  display: none;
  margin: 0.75rem 0.25rem 0;
  color: var(--b4v-muted);
}

.b4v-faq-empty.is-visible {
  display: block;
}

.b4v-auth-card .input-group {
  flex-wrap: nowrap;
}

@media (max-width: 991.98px) {
  .b4v-auth-login {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.35rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .b4v-auth-login .b4v-auth-card,
  .b4v-auth-event {
    margin-left: 0;
    margin-right: 0;
    max-width: 420px;
  }
}

@media (max-width: 767.98px) {
  .b4v-auth-bg {
    background-position: 70% center;
  }

  .b4v-auth-bg::after {
    background: linear-gradient(180deg, rgba(12, 16, 18, 0.35), rgba(12, 16, 18, 0.72));
  }

  .b4v-auth-card {
    padding: 1.5rem 1.15rem 1.25rem;
  }

  .b4v-auth-event {
    padding: 1.45rem 1.15rem 1.3rem;
  }

  .b4v-auth-event-title {
    font-size: 1.35rem;
  }

  .b4v-auth-event-soon {
    font-size: 1.55rem;
  }
}

/* Profile */
body.dark-page {
  background: #14110e;
}

.b4v-profile {
  padding-bottom: 1rem;
}

.b4v-profile-masthead {
  position: relative;
  isolation: isolate;
  min-height: 280px;
  margin-top: 0.75rem;
  padding: 2.4rem 1.75rem 2rem;
  border-radius: 22px;
  overflow: hidden;
  background-size: cover;
  background-position: center 45%;
  display: flex;
  align-items: flex-end;
}

.b4v-profile-masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 8, 6, 0.88) 0%, rgba(10, 8, 6, 0.42) 48%, rgba(10, 8, 6, 0.12) 100%),
    linear-gradient(180deg, rgba(10, 8, 6, 0.08), rgba(10, 8, 6, 0.45));
  z-index: 0;
}

.b4v-profile-masthead-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 820px;
}

.b4v-seal {
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--b4v-gold-light);
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background:
    radial-gradient(circle at 35% 30%, rgba(240, 222, 154, 0.18), transparent 55%),
    linear-gradient(160deg, #5a161c, #16110d);
  border: 2px solid var(--b4v-gold);
  box-shadow:
    0 0 0 6px rgba(12, 9, 7, 0.45),
    0 12px 28px rgba(0, 0, 0, 0.4);
}

.b4v-profile-kicker {
  margin: 0 0 0.4rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--b4v-gold);
}

.b4v-profile-name {
  margin: 0;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.1;
  color: #f7edd4;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.b4v-profile-meta {
  margin: 0.55rem 0 0;
  color: var(--b4v-muted);
  font-size: 0.95rem;
}

.b4v-profile-meta span {
  margin: 0 0.4rem;
  color: var(--b4v-gold);
}

@media (max-width: 767.98px) {
  .b4v-profile-masthead {
    min-height: 240px;
    padding: 1.5rem 1.1rem 1.35rem;
  }

  .b4v-profile-masthead-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }
}

.b4v-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 0.75rem;
  margin: 0.9rem 0 0;
}

.b4v-stat-block {
  padding: 0.7rem 0.95rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(212, 177, 90, 0.28);
  background: #1a1410;
}

body.dark-page .b4v-stat-block,
body.dark-page .b4v-panel,
body.dark-page .b4v-panel .card-header {
  background-color: #1a1410 !important;
}

.b4v-stat-block h2 {
  margin: 0 0 0.4rem;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--b4v-gold) !important;
}

.b4v-stat-block p {
  margin: 0;
  color: var(--b4v-parchment);
  font-size: 0.95rem;
}

.b4v-stat-block p em {
  font-style: normal;
  color: var(--b4v-gold);
}

.b4v-info-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.5rem;
  margin: 0;
}

.b4v-info-inline div {
  min-width: 0;
}

.b4v-info-inline dt {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--b4v-gold);
}

.b4v-info-inline dd {
  margin: 0.1rem 0 0;
  color: var(--b4v-parchment);
  font-size: 0.92rem;
}

@media (max-width: 991.98px) {
  .b4v-profile-grid {
    grid-template-columns: 1fr;
  }
}

body.dark-page .b4v-panel h6,
body.dark-page .b4v-panel .card-header h6,
body.dark-page .b4v-panel .card-header h4 {
  color: var(--b4v-gold) !important;
  font-family: Cinzel, "Times New Roman", serif;
}

body.dark-page .card.b4v-panel,
body.dark-page .b4v-panel {
  border: 1px solid rgba(212, 177, 90, 0.22);
}

.b4v-recap-filter-label {
  font-size: 0.78rem;
  color: var(--b4v-muted) !important;
}

body.dark-page .b4v-panel .form-select,
body.dark-page .b4v-panel .form-control,
body.dark-page .b4v-modal .form-select,
body.dark-page .b4v-modal .form-control {
  background-color: #16110d !important;
  background-image: none !important;
  color: var(--b4v-parchment) !important;
  border: 1px solid rgba(212, 177, 90, 0.4) !important;
  border-radius: 10px;
  box-shadow: none !important;
  color-scheme: dark;
}

body.dark-page .b4v-panel .form-select,
body.dark-page .b4v-modal .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23d4b15a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

body.dark-page .b4v-panel .form-select:focus,
body.dark-page .b4v-panel .form-control:focus,
body.dark-page .b4v-modal .form-select:focus,
body.dark-page .b4v-modal .form-control:focus {
  border-color: var(--b4v-gold) !important;
  box-shadow: 0 0 0 2px rgba(212, 177, 90, 0.28) !important;
}

body.dark-page .b4v-panel .form-select option,
body.dark-page .b4v-modal .form-select option {
  background: #1a1410;
  color: var(--b4v-parchment);
}

body.dark-page .b4v-panel .form-label,
body.dark-page .b4v-panel .form-check-label,
body.dark-page .b4v-modal .form-label {
  color: var(--b4v-muted);
}

body.dark-page .b4v-panel .form-switch .form-check-input {
  background-color: rgba(243, 230, 200, 0.18) !important;
  border-color: rgba(212, 177, 90, 0.4) !important;
}

body.dark-page .b4v-panel .form-switch .form-check-input:checked {
  background-color: var(--b4v-gold) !important;
  border-color: var(--b4v-gold) !important;
}

body.dark-page .b4v-panel code {
  color: var(--b4v-gold-light);
  background: rgba(212, 177, 90, 0.12);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

body.dark-page .b4v-panel .alert-warning {
  background: rgba(122, 31, 36, 0.55);
  border: 1px solid rgba(196, 64, 64, 0.45);
  color: #f7d0d0;
}

body.dark-page .b4v-panel .alert-success,
body.dark-page .b4v-modal .alert-success {
  background: rgba(34, 120, 70, 0.42);
  border: 1px solid rgba(90, 190, 110, 0.45);
  color: #c8f0c4;
}

body.dark-page .b4v-panel .alert-danger,
body.dark-page .b4v-modal .alert-danger {
  background: rgba(122, 31, 36, 0.55);
  border: 1px solid rgba(196, 64, 64, 0.45);
  color: #f7d0d0;
}

.b4v-pa-summary {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
}

.b4v-pa-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  background: #16110d;
  border: 1px solid rgba(212, 177, 90, 0.18);
  color: var(--b4v-parchment);
  font-size: 0.88rem;
}

.b4v-result-label {
  margin: 1rem 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--b4v-gold);
  font-weight: 700;
}

.b4v-result-box {
  background: #16110d;
  color: var(--b4v-parchment) !important;
  border: 1px solid rgba(212, 177, 90, 0.22);
  border-radius: 10px;
  max-height: 160px;
  overflow: auto;
  padding: 0.65rem 0.8rem;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

body.dark-page .b4v-table,
body.dark-page .b4v-table > :not(caption) > * > * {
  background-color: transparent !important;
  color: var(--b4v-parchment);
  --bs-table-bg: transparent;
  --bs-table-color: var(--b4v-parchment);
  --bs-table-border-color: rgba(212, 177, 90, 0.14);
}

body.dark-page .b4v-table thead th {
  color: var(--b4v-gold) !important;
  opacity: 1 !important;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(212, 177, 90, 0.28) !important;
}

body.dark-page .b4v-table td,
body.dark-page .b4v-table th {
  border-color: rgba(212, 177, 90, 0.12) !important;
}

body.dark-page .b4v-table:has(tfoot) tbody tr:last-child td,
body.dark-page .b4v-table:has(tfoot) tbody tr:last-child th {
  border-bottom: 0 !important;
}

body.dark-page .b4v-table tfoot td,
body.dark-page .b4v-table tfoot th {
  border-bottom: 0 !important;
  border-top: 1px solid rgba(212, 177, 90, 0.28) !important;
}

body.dark-page .b4v-table h6 {
  color: var(--b4v-parchment) !important;
}

body.dark-page .b4v-table .text-secondary {
  color: var(--b4v-muted) !important;
}

.b4v-status {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: none !important;
  background-image: none !important;
}

.b4v-status.is-ok {
  background: rgba(34, 120, 70, 0.42) !important;
  color: #c8f0c4 !important;
  border: 1px solid rgba(90, 190, 110, 0.55);
}

.b4v-status.is-no {
  background: rgba(122, 31, 36, 0.55) !important;
  color: #f7d0d0 !important;
  border: 1px solid rgba(196, 64, 64, 0.5);
}

.b4v-status.is-pending {
  background: rgba(212, 177, 90, 0.1) !important;
  color: var(--b4v-gold) !important;
  border: 1px solid rgba(212, 177, 90, 0.4);
}

.b4v-status.is-muted {
  background: rgba(203, 188, 163, 0.12) !important;
  color: var(--b4v-muted) !important;
  border: 1px solid rgba(212, 177, 90, 0.22);
}

body.dark-page .b4v-panel hr {
  background-color: rgba(212, 177, 90, 0.22);
  opacity: 1;
  border: 0;
  height: 1px;
}

body.dark-page .b4v-panel .pagination .page-link,
body.dark-page .b4v-panel .pagination input.page-link {
  background: #16110d !important;
  color: var(--b4v-gold) !important;
  border: 1px solid rgba(212, 177, 90, 0.28) !important;
  box-shadow: none !important;
}

body.dark-page .b4v-panel .pagination .page-item.active .page-link {
  background: rgba(122, 31, 36, 0.7) !important;
  color: var(--b4v-gold-light) !important;
  border-color: var(--b4v-gold) !important;
}

body.dark-page .b4v-panel .pagination .page-item.disabled .page-link {
  color: var(--b4v-muted) !important;
  opacity: 0.45;
}

.b4v-filter-dropdown {
  position: relative;
  width: 100%;
}

.b4v-filter-dropdown:has(.show) {
  z-index: 40;
}

.b4v-filter-card .b4v-filter-label {
  margin: 0 0 0.15rem;
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--b4v-gold) !important;
}

.b4v-filter-card .b4v-filter-value {
  display: block;
  color: var(--b4v-gold-light) !important;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.b4v-metric-delta {
  margin-left: 0.35rem;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--b4v-gold);
}

.b4v-metric-delta.is-down {
  color: #e08a8a;
}

.b4v-metric-delta.is-flat {
  color: var(--b4v-muted);
}

button.b4v-filter-card,
.b4v-filter-card {
  width: 100%;
  display: flex;
  flex-direction: row !important;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  text-align: left;
  appearance: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  height: auto !important;
  min-height: 0;
  box-shadow: none !important;
}

button.b4v-filter-card:hover,
button.b4v-filter-card:focus,
button.b4v-filter-card[aria-expanded="true"] {
  border-color: var(--b4v-gold) !important;
  background-color: #201812 !important;
}

.b4v-filter-card.is-static {
  cursor: default;
}

.b4v-filter-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.b4v-filter-caret {
  color: var(--b4v-gold);
  font-size: 0.75rem;
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}

button.b4v-filter-card[aria-expanded="true"] .b4v-filter-caret {
  transform: rotate(180deg);
}

.b4v-filter-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(122, 31, 36, 0.45) !important;
  border: 1px solid rgba(212, 177, 90, 0.4);
  color: var(--b4v-gold) !important;
  box-shadow: none !important;
}

.b4v-filter-icon i {
  color: var(--b4v-gold) !important;
}

.b4v-filter-menu {
  width: 100%;
  max-height: min(50vh, 360px);
  overflow-y: auto;
  padding: 0.45rem;
}

body.dark-page .b4v-filter-dropdown .dropdown-menu.b4v-filter-menu,
body.dark-page .b4v-filter-dropdown .dropdown-menu.b4v-filter-menu.show,
:not(.navbar) .b4v-filter-dropdown .dropdown-menu.b4v-filter-menu,
:not(.navbar) .b4v-filter-dropdown .dropdown-menu.b4v-filter-menu.show {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  transform: none !important;
  float: none;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0.4rem 0 0 !important;
  z-index: 40;
}

body.dark-page .b4v-filter-dropdown .dropdown-menu.b4v-filter-menu {
  display: none;
  opacity: 1;
  pointer-events: auto;
  visibility: hidden;
}

body.dark-page .b4v-filter-dropdown .dropdown-menu.b4v-filter-menu.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

@media (max-width: 767.98px) {
  .b4v-filter-card {
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
  }

  .b4v-filter-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .b4v-filter-card .b4v-filter-value {
    font-size: 0.95rem;
  }

  .b4v-filter-dropdown .dropdown-menu.b4v-filter-menu.show {
    max-height: 45vh;
  }
}

body.dark-page .dropdown-menu.b4v-filter-menu {
  background: #16110d !important;
  border: 1px solid rgba(212, 177, 90, 0.28) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

body.dark-page .dropdown-menu.b4v-filter-menu:before {
  display: none;
}

body.dark-page .dropdown-menu.b4v-filter-menu .dropdown-item,
body.dark-page .dropdown-menu.b4v-filter-menu a {
  color: var(--b4v-parchment) !important;
}

body.dark-page .dropdown-menu.b4v-filter-menu .dropdown-item:hover,
body.dark-page .dropdown-menu.b4v-filter-menu .dropdown-item:focus {
  background: rgba(212, 177, 90, 0.16) !important;
  color: var(--b4v-gold-light) !important;
}

body.dark-page .dropdown-menu.b4v-filter-menu .dropdown-item.disabled {
  color: var(--b4v-gold) !important;
  opacity: 1;
  background: rgba(212, 177, 90, 0.1) !important;
}

.b4v-filter-card .form-select {
  margin-top: 0.1rem;
  padding-top: 0.28rem;
  padding-bottom: 0.28rem;
  min-height: 2rem;
}

body.dark-page .modal-content.b4v-modal {
  background: #1a1410;
  border: 1px solid rgba(212, 177, 90, 0.28);
  color: var(--b4v-parchment);
}

body.dark-page .b4v-modal .modal-header,
body.dark-page .b4v-modal .modal-footer {
  border-color: rgba(212, 177, 90, 0.22);
}

body.dark-page .b4v-modal .modal-title {
  color: var(--b4v-gold) !important;
  font-family: Cinzel, "Times New Roman", serif;
}

.b4v-btn-danger {
  background: transparent !important;
  background-image: none !important;
  color: #f7d0d0 !important;
  border: 1px solid rgba(196, 64, 64, 0.55) !important;
  box-shadow: none;
}

.b4v-btn-danger:hover {
  background: rgba(122, 31, 36, 0.5) !important;
  color: #fff !important;
}

.skills-req-table {
  table-layout: fixed;
  width: 100%;
}

.skills-req-table th,
.skills-req-table td {
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.btn-modifica-skill {
  min-width: 5.5rem;
  white-space: nowrap;
}

.b4v-dash-metrics > [class*="col-"] {
  display: flex;
}

.b4v-dash-metrics .b4v-filter-card {
  height: 100% !important;
}

.b4v-dash-metrics .b4v-filter-card:not(.is-static):hover,
.b4v-dash-metrics .b4v-filter-card:not(.is-static):focus {
  border-color: var(--b4v-gold) !important;
  background-color: #201812 !important;
}

.b4v-metric-create {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(212, 177, 90, 0.45);
  color: var(--b4v-gold);
  background: rgba(122, 31, 36, 0.4);
  font-size: 0.85rem;
}

.b4v-dash-metrics .b4v-filter-card:not(.is-static):hover .b4v-metric-create,
.b4v-dash-metrics .b4v-filter-card:not(.is-static):focus .b4v-metric-create {
  border-color: var(--b4v-gold);
  background: var(--b4v-burgundy);
  color: #fff;
}

.b4v-dash-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.b4v-dash-stat {
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(212, 177, 90, 0.18);
  background: #16110d;
}

.b4v-dash-stat-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--b4v-gold);
  margin: 0 0 0.3rem;
}

.b4v-dash-stat-value {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--b4v-parchment);
}

.b4v-timeline-step {
  color: var(--b4v-gold);
}

.b4v-timeline-step.is-sanzione {
  color: #c56b82;
}

.b4v-timeline-step.is-evento {
  color: #6a9ea8;
}

.b4v-timeline-step.is-segreteria {
  color: #7aab72;
}

body.dark-page .b4v-panel .timeline-content h6 {
  color: var(--b4v-parchment) !important;
}

body.dark-page .b4v-panel .timeline-content p {
  color: var(--b4v-muted) !important;
}

@media (max-width: 767.98px) {
  .b4v-dash-stats {
    grid-template-columns: 1fr;
  }
}

.b4v-chart {
  background: #16110d;
  border: 1px solid rgba(212, 177, 90, 0.16);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  overflow: hidden;
}

.b4v-chart-card {
  display: flex;
  flex-direction: column;
}

.b4v-chart-card .card-body {
  flex: 1 1 auto;
  overflow: hidden;
}

.b4v-chart-card .b4v-chart {
  min-height: 300px;
}

.b4v-chart .chart,
.b4v-chart canvas {
  display: block;
  max-width: 100%;
}

.b4v-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.b4v-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.9rem;
  margin-top: 0.85rem;
}

.b4v-chart-toolbar .form-select {
  max-width: 280px;
}

@media (max-width: 767.98px) {
  .b4v-chart-head {
    flex-direction: column;
  }

  .b4v-chart-toolbar .form-select {
    max-width: none;
    width: 100%;
  }
}

body.dark-page .b4v-panel .dropdown-menu {
  background: #16110d !important;
  border: 1px solid rgba(212, 177, 90, 0.28) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

body.dark-page .b4v-panel .dropdown-item {
  color: var(--b4v-parchment) !important;
}

body.dark-page .b4v-panel .dropdown-item:hover,
body.dark-page .b4v-panel .dropdown-item:focus {
  background: rgba(212, 177, 90, 0.16) !important;
  color: var(--b4v-gold-light) !important;
}

body.dark-page .b4v-panel .dropdown-item.disabled {
  color: var(--b4v-muted) !important;
  opacity: 0.5;
}

body.dark-page .b4v-table a h6,
body.dark-page .b4v-table a {
  color: var(--b4v-gold) !important;
}

body.dark-page .b4v-table a:hover h6,
body.dark-page .b4v-table a:hover {
  color: var(--b4v-gold-light) !important;
}

.b4v-faction,
body.dark-page .b4v-table .b4v-faction,
body.dark-page .b4v-table h6 .b4v-faction {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: color-mix(in srgb, var(--b4v-faction) 42%, #f3e6c8) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.b4v-note-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 170px;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 177, 90, 0.35);
  background: transparent;
  color: var(--b4v-parchment) !important;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none !important;
  box-shadow: none !important;
}

.b4v-note-count {
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
}

.b4v-note-chip.is-sanzione {
  border-color: #c56b82;
  color: #f0c8d0 !important;
}

.b4v-note-chip.is-sanzione .b4v-note-count {
  background: #8a3044;
  color: #f7dce2;
}

.b4v-note-chip.is-sanzione:hover,
.b4v-note-chip.is-sanzione.is-active {
  background: rgba(138, 48, 68, 0.72);
  border-color: #d8899a;
  color: #fbe6ea !important;
}

.b4v-note-chip.is-evento {
  border-color: #6a9ea8;
  color: #c5e4e6 !important;
}

.b4v-note-chip.is-evento .b4v-note-count {
  background: #2f6b72;
  color: #d7f1f2;
}

.b4v-note-chip.is-evento:hover,
.b4v-note-chip.is-evento.is-active {
  background: rgba(42, 92, 98, 0.7);
  border-color: #8fc0c6;
  color: #e7f6f7 !important;
}

.b4v-note-chip.is-segreteria {
  border-color: #7aab72;
  color: #cfe8c8 !important;
}

.b4v-note-chip.is-segreteria .b4v-note-count {
  background: #3d6e3a;
  color: #def0d8;
}

.b4v-note-chip.is-segreteria:hover,
.b4v-note-chip.is-segreteria.is-active {
  background: rgba(46, 92, 52, 0.72);
  border-color: #9cc896;
  color: #e8f6e4 !important;
}

.b4v-note-chip.is-totale {
  border-color: rgba(212, 177, 90, 0.45);
  color: var(--b4v-gold-light) !important;
}

.b4v-note-chip.is-totale .b4v-note-count {
  background: #5a1c22;
  color: var(--b4v-gold-light);
}

.b4v-note-chip.is-totale:hover,
.b4v-note-chip.is-totale.is-active {
  background: rgba(122, 31, 36, 0.65);
  border-color: var(--b4v-gold);
  color: var(--b4v-gold-light) !important;
}

.b4v-status.is-sanzione {
  background: rgba(138, 48, 68, 0.55) !important;
  color: #f0c8d0 !important;
  border: 1px solid #c56b82;
}

.b4v-status.is-evento {
  background: rgba(42, 92, 98, 0.55) !important;
  color: #c5e4e6 !important;
  border: 1px solid #6a9ea8;
}

.b4v-status.is-segreteria {
  background: rgba(46, 92, 52, 0.55) !important;
  color: #cfe8c8 !important;
  border: 1px solid #7aab72;
}

@media (max-width: 576px) {
  .b4v-note-chip {
    min-width: 100%;
  }
}

.b4v-faction-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--b4v-faction);
  box-shadow: 0 0 0 1px rgba(243, 230, 200, 0.28);
  flex: 0 0 auto;
}

.b4v-mobile-cards {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.15rem 0.9rem 0.9rem;
}

.b4v-mobile-card {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(212, 177, 90, 0.22);
  background: #16110d;
  color: inherit !important;
  text-decoration: none !important;
  box-shadow: none;
}

.b4v-mobile-card:hover,
.b4v-mobile-card:focus-visible {
  border-color: var(--b4v-gold);
  background: #1c1612;
}

.b4v-mobile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.b4v-mobile-card-title {
  margin: 0;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--b4v-gold-light);
}

.b4v-mobile-card-chevron {
  color: var(--b4v-gold);
  font-size: 0.78rem;
  margin-top: 0.28rem;
  flex: 0 0 auto;
}

.b4v-mobile-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 0.85rem;
  margin: 0;
}

.b4v-mobile-card-meta dt {
  margin: 0 0 0.12rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--b4v-gold);
}

.b4v-mobile-card-meta dd {
  margin: 0;
  color: var(--b4v-parchment);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
}

.b4v-mobile-card-meta .is-wide {
  grid-column: 1 / -1;
}

.b4v-mobile-card-id {
  margin: 0 0 0.12rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--b4v-gold);
}

article.b4v-mobile-card {
  cursor: default;
}

.b4v-mobile-card-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.b4v-mobile-card-meta .pg-stat-pct {
  justify-content: flex-start;
}

.b4v-mobile-card-empty {
  margin: 0;
  padding: 0.35rem 0.15rem 0.2rem;
}

.b4v-note-cards {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.b4v-note-cards.is-padded {
  padding: 0.15rem 0.9rem 0.9rem;
}

.b4v-mobile-card-excerpt {
  margin: 0.75rem 0 0;
  color: var(--b4v-parchment);
  font-size: 0.84rem;
  line-height: 1.4;
  word-break: break-word;
}

.b4v-mobile-card-head .b4v-status {
  flex: 0 0 auto;
  margin-top: 0.12rem;
}

.note-anchor {
  scroll-margin-top: 5.5rem;
}

.note-anchor .b4v-status {
  display: inline-block;
  vertical-align: middle;
}

.note-anchor:target {
  box-shadow: 0 0 0 2px var(--b4v-gold);
}

@media (min-width: 992px) {
  .b4v-mobile-cards {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .b4v-desktop-table {
    display: none !important;
  }
}

.pg-stat-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: rgba(122, 31, 36, 0.45);
  border: 1px solid rgba(212, 177, 90, 0.35);
}

.pg-stat-empty-icon i {
  color: var(--b4v-gold);
}

.pg-stat-pct-track {
  width: 72px;
  height: 6px;
  border-radius: 99px;
  background: rgba(212, 177, 90, 0.14);
  overflow: hidden;
}

.pg-stat-filter-form .form-control {
  min-width: 0;
  width: 11rem;
}

.pg-stat-filter-form .form-control::-webkit-calendar-picker-indicator {
  filter: invert(0.85) sepia(1) saturate(3) hue-rotate(5deg);
  opacity: 0.9;
}

body.dark-page .b4v-sheet-card,
body.dark-page .b4v-new-sheet {
  background-color: #16110d !important;
  border: 1px solid rgba(243, 230, 200, 0.12);
  border-radius: 14px;
}

.b4v-sheet-card.is-main {
  border-color: var(--b4v-gold);
}

.b4v-sheet-faction {
  color: var(--b4v-gold) !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.b4v-sheet-name {
  color: var(--b4v-parchment);
}

.b4v-badge-gold {
  background: var(--b4v-gold) !important;
  color: #1c1612 !important;
}

.b4v-new-sheet-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.b4v-new-sheet {
  width: 100%;
  max-width: 560px;
  min-height: 220px;
  margin: 0.35rem 0 0.5rem;
  border: 1px dashed rgba(212, 177, 90, 0.4) !important;
  background: rgba(12, 9, 7, 0.35);
}

.b4v-new-sheet-choice,
.b4v-new-sheet-split {
  min-height: 220px;
}

.b4v-new-sheet-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.b4v-new-sheet-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.b4v-new-sheet-choice a,
.b4v-new-sheet-split a,
.b4v-new-sheet-split .is-disabled {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  height: 100%;
  padding: 1.35rem 1.1rem;
  text-align: center;
}

.b4v-new-sheet-split a:first-child,
.b4v-new-sheet-split .is-disabled:first-child {
  border-right: 1px solid rgba(212, 177, 90, 0.28);
}

.b4v-new-sheet a,
.b4v-new-sheet h5,
.b4v-new-sheet i {
  color: var(--b4v-gold) !important;
}

.b4v-new-sheet h5 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.b4v-new-sheet i {
  font-size: 1.35rem;
}

.b4v-new-sheet .is-disabled span {
  color: var(--b4v-muted) !important;
  font-size: 0.75rem;
}

/* Character sheet */
body.dark-page .b4v-sheet {
  color: var(--b4v-parchment);
}

body.dark-page .b4v-sheet .card,
body.dark-page .b4v-sheet .card-header {
  background-color: #1a1410 !important;
  border-color: rgba(212, 177, 90, 0.18);
}

body.dark-page .b4v-sheet h3,
body.dark-page .b4v-sheet h5,
body.dark-page .b4v-sheet h6,
body.dark-page .b4v-sheet .text-dark {
  color: var(--b4v-parchment) !important;
}

body.dark-page .b4v-sheet .list-group-item {
  background: transparent;
  color: var(--b4v-parchment);
}

.b4v-sheet-history {
  padding: 1rem 1.1rem 1rem;
  border-radius: 14px;
  background: rgba(212, 177, 90, 0.16);
  border: 1px solid rgba(212, 177, 90, 0.35);
  color: var(--b4v-parchment);
  box-shadow: none;
  height: auto !important;
}

body.dark-page .b4v-sheet .b4v-sheet-history {
  background: rgba(212, 177, 90, 0.16) !important;
  border: 1px solid rgba(212, 177, 90, 0.35);
  color: var(--b4v-parchment);
}

.b4v-sheet-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.b4v-sheet-history-head h6 {
  margin: 0;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--b4v-gold) !important;
}

.b4v-sheet-history-delete {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  appearance: none;
  cursor: pointer;
  box-shadow: none;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(196, 64, 64, 0.45);
  background: rgba(90, 22, 28, 0.55);
  color: #f7d0d0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.b4v-sheet-history-delete:hover {
  background: #7a1f24;
  border-color: #c44040;
  color: #fff;
}

.b4v-sheet-history-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0.35rem 0.7rem;
  border-left: 1px solid rgba(212, 177, 90, 0.28);
}

.b4v-sheet-history-list li {
  position: relative;
  padding: 0 0 0.15rem 0.85rem;
}

.b4v-sheet-history-dot {
  position: absolute;
  top: 0.45rem;
  left: -0.29rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--b4v-gold);
  box-shadow: 0 0 0 3px rgba(212, 177, 90, 0.18);
}

.b4v-sheet-history-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.b4v-sheet-history-item span {
  color: var(--b4v-parchment);
  font-size: 0.92rem;
}

.b4v-sheet-history-date {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--b4v-muted) !important;
  font-size: 0.8rem !important;
  white-space: nowrap;
}

.b4v-sheet-history-kicker {
  margin: 0.85rem 0 0.55rem;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--b4v-gold) !important;
}

.b4v-sheet-history-events {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.b4v-event-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.32rem 0.65rem 0.32rem 0.5rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--event-color, #d4b15a) 55%, rgba(212, 177, 90, 0.45));
  background: rgba(12, 9, 7, 0.32);
  color: var(--b4v-parchment);
  font-size: 0.78rem;
  line-height: 1.2;
}

.b4v-event-chip i {
  color: var(--event-color, var(--b4v-gold));
  font-size: 0.82rem;
}

label.b4v-event-chip,
.b4v-event-chip.is-toggle {
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.b4v-event-chip.is-toggle:hover {
  border-color: var(--event-color, var(--b4v-gold));
  background: rgba(212, 177, 90, 0.12);
}

.b4v-event-chip.is-selected {
  background: color-mix(in srgb, var(--event-color, #d4b15a) 28%, rgba(12, 9, 7, 0.72));
  border-color: var(--event-color, var(--b4v-gold));
  color: #f7edd4;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--event-color, #d4b15a) 35%, transparent);
}

.b4v-sheet-history-empty {
  color: var(--b4v-muted);
  font-size: 0.85rem;
}

body.dark-page .b4v-sheet .b4v-sheet-history-head h6 {
  color: var(--b4v-gold) !important;
}

.b4v-sheet-hero {
  position: relative;
  isolation: isolate;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid rgba(212, 177, 90, 0.35) !important;
}

.b4v-sheet-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 8, 6, 0.78) 0%, rgba(10, 8, 6, 0.35) 55%, rgba(10, 8, 6, 0.2) 100%);
  z-index: 0;
}

.b4v-sheet-hero .row,
.b4v-sheet-hero form {
  position: relative;
  z-index: 1;
}

.b4v-sheet .form-control,
.b4v-sheet .form-select,
body.dark-page .b4v-sheet input,
body.dark-page .b4v-sheet input.form-control,
body.dark-page .b4v-sheet .form-control,
body.dark-page .b4v-sheet .form-select {
  background-color: #1a1410 !important;
  background-image: none !important;
  color: var(--b4v-parchment) !important;
  border: 1px solid rgba(212, 177, 90, 0.35) !important;
  border-radius: 12px;
  box-shadow: none !important;
  color-scheme: dark;
}

.b4v-sheet .form-control::placeholder,
.b4v-sheet .form-select {
  color: var(--b4v-parchment) !important;
}

.b4v-sheet .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23d4b15a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-color: #1a1410 !important;
}

.b4v-sheet .form-control:focus,
.b4v-sheet .form-select:focus,
body.dark-page .b4v-sheet input.form-control:focus,
body.dark-page .b4v-sheet .form-control:focus,
body.dark-page .b4v-sheet .form-select:focus {
  background-color: #16110d !important;
  color: #f7edd4 !important;
  border-color: var(--b4v-gold) !important;
  box-shadow: 0 0 0 2px rgba(212, 177, 90, 0.28) !important;
}

.b4v-sheet .form-control:-webkit-autofill,
.b4v-sheet .form-control:-webkit-autofill:hover,
.b4v-sheet .form-control:-webkit-autofill:focus,
.b4v-sheet .form-control:-webkit-autofill:active {
  -webkit-text-fill-color: #f3e6c8 !important;
  caret-color: #f3e6c8;
  box-shadow: 0 0 0 1000px #1a1410 inset !important;
  -webkit-box-shadow: 0 0 0 1000px #1a1410 inset !important;
  border-color: rgba(212, 177, 90, 0.35) !important;
  transition: background-color 99999s ease-out;
}

.b4v-sheet .form-select option {
  background: #1a1410;
  color: var(--b4v-parchment);
}

.b4v-sheet .form-floating > label,
body.dark-page .b4v-sheet .form-floating > label {
  color: var(--b4v-muted) !important;
}

.b4v-sheet .form-floating > .form-control:focus ~ label,
.b4v-sheet .form-floating > .form-control:not(:placeholder-shown) ~ label,
.b4v-sheet .form-floating > .form-select ~ label {
  color: var(--b4v-gold) !important;
}

.b4v-sheet .skill_card_title {
  background: rgba(12, 9, 7, 0.55);
  border-color: rgba(212, 177, 90, 0.22) !important;
  color: var(--b4v-parchment);
}

.b4v-sheet .skill_card_title h6 {
  color: var(--b4v-parchment) !important;
}

.b4v-sheet .alert-info {
  background: rgba(212, 177, 90, 0.16);
  border-color: rgba(212, 177, 90, 0.35);
  color: var(--b4v-parchment);
}

.b4v-sheet .alert-secondary {
  background: rgba(22, 16, 12, 0.9);
  border-color: rgba(212, 177, 90, 0.22);
  color: var(--b4v-parchment);
}

.b4v-sheet .nav-tabs .nav-link,
.b4v-sheet .nav-pills .nav-link {
  color: var(--b4v-muted);
}

.b4v-sheet .nav-tabs .nav-link.active,
.b4v-sheet .nav-pills .nav-link.active {
  color: var(--b4v-gold-light) !important;
  background: rgba(90, 22, 28, 0.45);
  border-color: rgba(212, 177, 90, 0.35);
}

.b4v-btn-outline,
.b4v-sheet .btn.b4v-btn-outline {
  background: transparent !important;
  background-image: none !important;
  color: var(--b4v-gold) !important;
  border: 1px solid var(--b4v-gold) !important;
  box-shadow: none;
}

.b4v-btn-outline:hover,
.b4v-sheet .btn.b4v-btn-outline:hover {
  background: rgba(212, 177, 90, 0.16) !important;
  color: var(--b4v-gold-light) !important;
  border-color: var(--b4v-gold-light) !important;
}

.b4v-sheet-save {
  display: flex;
  justify-content: center;
  padding: 1.25rem 1rem 1.5rem;
}

.b4v-sheet-metrics {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.75rem;
}

.b4v-sheet-metrics .b4v-filter-card {
  flex: 1 1 0;
  min-width: 0;
  height: auto !important;
}

@media (min-width: 1200px) {
  .b4v-sheet-metrics {
    flex-direction: column;
    height: 100%;
  }

  .b4v-sheet-metrics .b4v-filter-card {
    height: 100% !important;
  }
}

.b4v-points-in {
  color: #c8f0c4 !important;
}

.b4v-points-out {
  color: #f7d0d0 !important;
}

.b4v-sheet .btn-primary,
.b4v-sheet .bg-gradient-dark,
.b4v-sheet .btn-warning,
.b4v-sheet .btn-info {
  background-image: linear-gradient(120deg, var(--b4v-burgundy) 0%, #b8862b 55%, var(--b4v-gold) 100%) !important;
  color: #fff !important;
  border: 0;
  box-shadow: 0 8px 18px rgba(77, 18, 24, 0.35);
}

.b4v-sheet .btn-outline-info,
.b4v-sheet .btn-outline-light,
.b4v-sheet .btn-secondary,
.b4v-sheet .btn-outline-secondary {
  background: transparent !important;
  background-image: none !important;
  color: var(--b4v-gold) !important;
  border: 1px solid var(--b4v-gold) !important;
  box-shadow: none;
}

.b4v-sheet .btn-danger,
.b4v-sheet .bg-gradient-danger {
  background: rgba(122, 31, 36, 0.85) !important;
  background-image: none !important;
  color: #f7d0d0 !important;
  border: 1px solid rgba(196, 64, 64, 0.55) !important;
}

.b4v-sheet .btn-success,
.b4v-sheet .bg-gradient-success {
  background: rgba(34, 120, 70, 0.75) !important;
  background-image: none !important;
  color: #c8f0c4 !important;
  border: 1px solid rgba(90, 190, 110, 0.55) !important;
}

.b4v-sheet .btn-outline-danger {
  color: #f7d0d0 !important;
  border-color: rgba(196, 64, 64, 0.55) !important;
  background: transparent !important;
}

.b4v-sheet .icon.bg-gradient-info,
.b4v-sheet .icon.bg-gradient-primary {
  background: rgba(122, 31, 36, 0.45) !important;
  background-image: none !important;
  border: 1px solid rgba(212, 177, 90, 0.4);
  color: var(--b4v-gold) !important;
  box-shadow: none !important;
}

.b4v-sheet .modal-content,
.b4v-sheet .modal-content.bg-dark {
  background: #1a1410 !important;
  border: 1px solid rgba(212, 177, 90, 0.28);
  color: var(--b4v-parchment);
}

.b4v-skill-search-results {
  margin: 0 0 0.85rem;
  padding: 0.35rem;
  border-radius: 12px;
  background: #16110d;
  border: 1px solid rgba(212, 177, 90, 0.28);
  max-height: 240px;
  overflow-y: auto;
  position: static !important;
  transform: none !important;
  inset: auto !important;
}

#skillPointsToAdd {
  pointer-events: auto !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  touch-action: manipulation;
}

.b4v-skill-search-results .dropdown-item,
.b4v-skill-search-results a {
  color: var(--b4v-parchment) !important;
}

.b4v-skill-search-results .dropdown-item:hover,
.b4v-skill-search-results .dropdown-item:focus {
  background: rgba(212, 177, 90, 0.16) !important;
  color: var(--b4v-gold-light) !important;
}

.b4v-sheet .modal-header,
.b4v-sheet .modal-footer,
.b4v-sheet .modal-header.bg-dark,
.b4v-sheet .modal-header.bg-gradient-primary,
.b4v-sheet .modal-header.bg-gradient-warning,
.b4v-sheet .modal-header.bg-danger,
.b4v-sheet .modal-body.bg-dark {
  background: #1a1410 !important;
  border-color: rgba(212, 177, 90, 0.22) !important;
}

.b4v-sheet .modal-title,
.b4v-sheet .modal-title.text-white,
.b4v-sheet .modal-title.text-primary,
.b4v-sheet .modal-title.text-secondary {
  color: var(--b4v-gold) !important;
  font-family: Cinzel, "Times New Roman", serif;
}

.b4v-sheet .form-control.bg-white,
.b4v-sheet .form-select.bg-white,
.b4v-sheet .bg-gray-100,
.b4v-sheet .list-group-item.bg-gray-100 {
  background-color: #16110d !important;
  color: var(--b4v-parchment) !important;
}

.b4v-sheet .badge.bg-info {
  background: rgba(212, 177, 90, 0.18) !important;
  color: var(--b4v-gold) !important;
}

.b4v-sheet .badge.bg-danger {
  background: rgba(138, 48, 68, 0.55) !important;
  color: #f0c8d0 !important;
}

.b4v-sheet .badge.bg-success {
  background: rgba(46, 92, 52, 0.55) !important;
  color: #cfe8c8 !important;
}

.b4v-sheet .table-dark {
  --bs-table-bg: #16110d;
  --bs-table-color: var(--b4v-parchment);
  --bs-table-border-color: rgba(212, 177, 90, 0.14);
  color: var(--b4v-parchment);
}

.b4v-sheet .table-dark thead {
  background: #1a1410 !important;
}

.b4v-sheet .table-dark thead th {
  color: var(--b4v-gold) !important;
}

.b4v-sheet .spinner-border.text-info,
.b4v-sheet .text-info {
  color: var(--b4v-gold) !important;
}

.b4v-sheet .text-warning {
  color: var(--b4v-gold-light) !important;
}

.b4v-sheet .text-danger {
  color: #f7d0d0 !important;
}

.b4v-sheet p,
.b4v-sheet ol,
.b4v-sheet ul {
  color: var(--b4v-parchment);
}

.b4v-sheet .b4v-sheet-history-empty {
  color: var(--b4v-muted) !important;
}

.b4v-sheet .btn-close {
  filter: invert(0.86) sepia(0.25) saturate(0.6);
  opacity: 0.85;
}

.b4v-sheet .btn-outline-success,
.b4v-sheet .btn-outline-warning {
  background: transparent !important;
  background-image: none !important;
  color: var(--b4v-gold) !important;
  border: 1px solid var(--b4v-gold) !important;
  box-shadow: none;
}

.b4v-sheet .form-check-input {
  background-color: #16110d;
  border-color: rgba(212, 177, 90, 0.45);
}

.b4v-sheet .form-check-input:checked {
  background-color: var(--b4v-burgundy);
  border-color: var(--b4v-gold);
}

.b4v-sheet .form-check-input:focus {
  border-color: var(--b4v-gold);
  box-shadow: 0 0 0 2px rgba(212, 177, 90, 0.28);
}

.b4v-sheet .form-check-input:disabled {
  opacity: 0.45;
}

.b4v-sheet .img-upload-inputfile-btn {
  border: 1px dashed rgba(212, 177, 90, 0.45) !important;
  background: rgba(212, 177, 90, 0.08);
  color: var(--b4v-gold);
  border-radius: 12px;
}

.b4v-sheet .img-upload-inputfile-btn:hover {
  border-color: var(--b4v-gold) !important;
  background: rgba(212, 177, 90, 0.16);
  color: var(--b4v-gold-light);
}

.b4v-sheet .hr.horizontal.dark,
.b4v-sheet hr.horizontal.dark {
  background-image: linear-gradient(90deg, transparent, rgba(212, 177, 90, 0.35), transparent) !important;
}

.b4v-sheet .text-muted,
.b4v-sheet .text-secondary,
.b4v-sheet .text-xs {
  color: var(--b4v-muted) !important;
}

.b4v-sheet .btn-link {
  color: var(--b4v-gold) !important;
}

body.dark-page .navbar-main .nav-link,
body.dark-page .navbar-main .text-body,
body.dark-page .navbar-main .text-dark {
  color: var(--b4v-parchment) !important;
}

.b4v-search-bar {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.b4v-search-bar input {
  flex: 1 1 auto;
  min-width: 0;
  height: 3rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(212, 177, 90, 0.35);
  background: #1a1410 !important;
  color: var(--b4v-parchment) !important;
  box-shadow: none !important;
}

.b4v-search-bar input:focus {
  border-color: var(--b4v-gold) !important;
  box-shadow: 0 0 0 2px rgba(212, 177, 90, 0.28) !important;
  outline: 0;
}

.b4v-search-bar button {
  width: 3rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(160deg, #5a161c, #7a1f24);
  color: var(--b4v-gold-light);
}

.b4v-search-bar button:hover {
  filter: brightness(1.08);
}

.b4v-search-lead {
  margin: 0 0 0.85rem;
  color: var(--b4v-muted);
}

.b4v-search-lead em {
  font-style: normal;
  color: var(--b4v-gold);
}

.b4v-search-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.b4v-search-result {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(212, 177, 90, 0.22);
  background: #1a1410;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.b4v-search-result:hover {
  border-color: var(--b4v-gold);
  background: rgba(212, 177, 90, 0.08);
}

.b4v-search-swatch {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.b4v-search-result strong {
  display: block;
  color: var(--b4v-parchment);
  font-size: 1rem;
}

.b4v-search-result span,
.b4v-search-result small {
  display: block;
  color: var(--b4v-muted);
  font-size: 0.85rem;
}

.b4v-search-result .b4v-search-faction {
  color: var(--b4v-gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.b4v-search .highlight {
  background: rgba(212, 177, 90, 0.35);
  color: var(--b4v-gold-light);
  padding: 0 0.1em;
  border-radius: 2px;
}

.bg-faction-argantis { background: linear-gradient(to right bottom, #07230C 50%, #DADADA 50.3%); }
.bg-faction-brandis { background: linear-gradient(to right bottom, #65120D 50%, #0C0C09 50.3%); }
.bg-faction-devoras { background: linear-gradient(to right bottom, #100E0B 50%, #052E32 50.3%); }
.bg-faction-gregoria { background: linear-gradient(to right bottom, #121729 50%, #4A0708 50.3%); }
.bg-faction-laoconte { background: linear-gradient(to right bottom, #69310F 50%, #0C0C09 50.3%); }
.bg-faction-lynxia { background: linear-gradient(to right bottom, #A9A9A9 50%, #7B2000 50.3%); }
.bg-faction-nepturia { background: linear-gradient(to right bottom, #142F41 50%, #0C0C09 50.3%); }
.bg-faction-valerian { background: linear-gradient(to right bottom, #082A05 50%, #84701C 50.3%); }
.bg-faction-vassago { background: linear-gradient(to right bottom, #856B0F 50%, #321201 50.3%); }

@media (max-width: 575.98px) {
  .b4v-search-result {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .b4v-search-swatch {
    width: 56px;
    height: 56px;
  }

  .b4v-search-result .b4v-search-faction {
    grid-column: 2;
  }
}

.b4v-larp-group-copy {
  color: var(--b4v-muted);
  font-size: .875rem;
  margin: 0;
}

.b4v-larp-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}

.b4v-larp-group-actions .form-select,
.b4v-larp-group-actions .form-control {
  flex: 1 1 14rem;
  min-width: 0;
}

.b4v-larp-invite-row {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
}

.b4v-larp-invite-row .form-control {
  flex: 1 1 14rem;
  min-width: 0;
}

.b4v-larp-group-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.b4v-larp-group-list li {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: .75rem 1rem;
  align-items: center;
  padding: .65rem 0;
  border-top: 1px solid rgba(212, 177, 90, .16);
}

.b4v-larp-group-list li:first-child {
  border-top: 0;
  padding-top: .15rem;
}

.b4v-larp-group-list li.is-leader {
  background: rgba(212, 177, 90, .06);
  margin: 0 -.35rem;
  padding-left: .35rem;
  padding-right: .35rem;
  border-radius: .35rem;
}

.b4v-larp-member-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .12rem;
  min-width: 0;
  flex: 1 1 auto;
}

.b4v-larp-member-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem;
  font-weight: 600;
  color: var(--b4v-text, #f7edd4);
  line-height: 1.25;
}

.b4v-larp-group-list small {
  color: var(--b4v-muted);
  margin-left: 0;
  font-size: .78rem;
  line-height: 1.2;
}

.b4v-larp-group-list em {
  color: var(--b4v-gold);
  font-style: normal;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.b4v-larp-group-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  flex: 0 0 auto;
  justify-content: flex-end;
  max-width: 100%;
}

.b4v-larp-manage-section + .b4v-larp-manage-section {
  margin-top: 1.15rem;
  padding-top: .85rem;
  border-top: 1px solid rgba(212, 177, 90, .22);
}

@media (max-width: 575.98px) {
  .b4v-larp-group-list li {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .b4v-larp-group-row-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.b4v-larp-group-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--b4v-gold-light);
  white-space: normal;
  overflow-wrap: break-word;
}

.b4v-larp-approved-wrap,
.b4v-desktop-table.table-responsive {
  overflow-x: hidden !important;
}

.b4v-larp-approved-table,
.b4v-larp-queue-table {
  table-layout: fixed;
  width: 100%;
}

.b4v-larp-approved-table th,
.b4v-larp-approved-table td,
.b4v-larp-queue-table th,
.b4v-larp-queue-table td {
  white-space: normal !important;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: break-word;
}

.b4v-larp-approved-table thead th,
.b4v-larp-approved-table td,
.b4v-larp-queue-table thead th,
.b4v-larp-queue-table td {
  padding-left: 0.7rem !important;
  padding-right: 0.7rem !important;
}

.b4v-larp-approved-table th:nth-child(1),
.b4v-larp-approved-table td:nth-child(1) {
  width: 38%;
}

.b4v-larp-approved-table th:nth-child(2),
.b4v-larp-approved-table td:nth-child(2) {
  width: 20%;
}

.b4v-larp-approved-table th:nth-child(3),
.b4v-larp-approved-table td:nth-child(3),
.b4v-larp-approved-table th:nth-child(4),
.b4v-larp-approved-table td:nth-child(4) {
  width: 11%;
}

.b4v-larp-approved-table th:nth-child(5),
.b4v-larp-approved-table td:nth-child(5) {
  width: 20%;
}

.b4v-larp-queue-table th:nth-child(1),
.b4v-larp-queue-table td:nth-child(1) {
  width: 22%;
}

.b4v-larp-queue-table th:nth-child(2),
.b4v-larp-queue-table td:nth-child(2) {
  width: 16%;
}

.b4v-larp-queue-table th:nth-child(3),
.b4v-larp-queue-table td:nth-child(3) {
  width: 22%;
}

.b4v-larp-queue-table th:nth-child(4),
.b4v-larp-queue-table td:nth-child(4) {
  width: 12%;
}

.b4v-larp-queue-table th:nth-child(5),
.b4v-larp-queue-table td:nth-child(5) {
  width: 10%;
}

.b4v-larp-queue-table th:nth-child(6),
.b4v-larp-queue-table td:nth-child(6) {
  width: 18%;
}

.b4v-larp-queue-table .b4v-larp-member-links {
  max-width: none;
}

.b4v-larp-approved-table .b4v-btn-danger,
.b4v-larp-queue-table .larp-admin-btn {
  max-width: 100%;
  white-space: normal;
  line-height: 1.2;
}

.b4v-larp-member-links {
  display: block;
  width: 100%;
  max-width: 22rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.b4v-mobile-card .b4v-larp-member-links {
  max-width: none;
}

.b4v-larp-member-links li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .12rem;
  padding: .35rem 0;
  border-top: 1px solid rgba(212, 177, 90, .16);
}

.b4v-larp-member-links a,
.b4v-larp-member-links small {
  font-size: .75rem;
  font-weight: 600;
  color: var(--b4v-muted);
}

.b4v-larp-member-links a:hover {
  color: var(--b4v-gold-light);
}

.b4v-larp-member-links em {
  color: var(--b4v-gold);
  font-style: normal;
  font-size: .75rem;
}

.b4v-larp-group-details summary::-webkit-details-marker {
  color: var(--b4v-gold);
}

.b4v-larp-swatches {
  display: inline-flex;
  gap: .28rem;
  align-items: center;
  margin: .15rem 0 .35rem;
}

.b4v-larp-swatch {
  width: .85rem;
  height: .85rem;
  border-radius: 999px;
  border: 1px solid rgba(247, 237, 212, .45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}

.b4v-larp-color-picks {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  align-items: center;
}

.b4v-larp-color-pick {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--b4v-muted);
  font-size: .8rem;
}

.b4v-larp-color-well {
  position: relative;
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 2.15rem;
}

.b4v-larp-color-face,
.b4v-larp-color-add {
  display: block;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  cursor: pointer;
}

.b4v-larp-color-face {
  border: 2px solid rgba(247, 237, 212, .5);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
  background: #d4b15a;
}

.b4v-larp-color-well.is-empty .b4v-larp-color-face {
  display: none;
}

.b4v-larp-color-value {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.b4v-larp-color-popover {
  position: fixed;
  z-index: 10050;
  width: 220px;
  padding: .7rem;
  border: 1px solid rgba(212, 177, 90, .35);
  border-radius: .55rem;
  background: #241c16;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .5);
}

.b4v-larp-color-sv {
  position: relative;
  width: 100%;
  height: 132px;
  border-radius: .35rem;
  cursor: crosshair;
  overflow: hidden;
  background: hsl(40, 100%, 50%);
}

.b4v-larp-color-sv::before,
.b4v-larp-color-sv::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.b4v-larp-color-sv::before {
  background: linear-gradient(to right, #fff, transparent);
}

.b4v-larp-color-sv::after {
  background: linear-gradient(to top, #000, transparent);
}

.b4v-larp-color-sv-thumb {
  position: absolute;
  width: .75rem;
  height: .75rem;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #000;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.b4v-larp-color-hue {
  width: 100%;
  margin: .65rem 0 0;
  height: .7rem;
  accent-color: var(--b4v-gold);
  cursor: pointer;
}

.b4v-larp-color-add {
  border: 2px dashed rgba(212, 177, 90, .55);
  background: rgba(26, 20, 16, .35);
  color: var(--b4v-gold);
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 500;
}

.b4v-larp-color-add:hover,
.b4v-larp-color-add:focus-visible {
  border-color: var(--b4v-gold);
  color: var(--b4v-gold-light);
  outline: none;
}

.b4v-larp-color-well:not(.is-empty) .b4v-larp-color-add {
  display: none;
}

.b4v-larp-color-clear {
  position: absolute;
  top: -.35rem;
  right: -.35rem;
  width: 1.05rem;
  height: 1.05rem;
  padding: 0;
  border: 1px solid rgba(247, 237, 212, .45);
  border-radius: 50%;
  background: #2a211a;
  color: var(--b4v-parchment);
  font-size: .75rem;
  line-height: 1;
  cursor: pointer;
}

.b4v-larp-color-clear:hover,
.b4v-larp-color-clear:focus-visible {
  color: #fff;
  border-color: var(--b4v-gold);
  outline: none;
}

.b4v-larp-join-preview {
  margin: .35rem 0 1rem;
}

/* SweetAlert2 — stesso linguaggio visivo dei pannelli B4V */
.swal2-container {
  --swal2-background: #1a1410;
  --swal2-color: var(--b4v-parchment);
  --swal2-border: 1px solid rgba(212, 177, 90, 0.28);
  --swal2-border-radius: 16px;
  --swal2-backdrop: rgba(10, 8, 6, 0.72);
  --swal2-confirm-button-background-color: #7a1f24;
  --swal2-confirm-button-color: #f7edd4;
  --swal2-confirm-button-border-radius: 10px;
  --swal2-cancel-button-background-color: transparent;
  --swal2-cancel-button-color: var(--b4v-gold);
  --swal2-cancel-button-border-radius: 10px;
  --swal2-deny-button-background-color: rgba(122, 31, 36, 0.85);
  --swal2-deny-button-color: #f7d0d0;
  --swal2-input-background: #16110d;
  --swal2-input-border: 1px solid rgba(212, 177, 90, 0.4);
  --swal2-input-border-radius: 10px;
  --swal2-input-box-shadow: none;
  --swal2-input-focus-border: 1px solid var(--b4v-gold);
  --swal2-input-focus-box-shadow: 0 0 0 2px rgba(212, 177, 90, 0.28);
  --swal2-validation-message-background: rgba(122, 31, 36, 0.55);
  --swal2-validation-message-color: #f7d0d0;
  --swal2-footer-color: var(--b4v-muted);
  --swal2-footer-border-color: rgba(212, 177, 90, 0.22);
  --swal2-timer-progress-bar-background: rgba(212, 177, 90, 0.55);
  --swal2-close-button-color: var(--b4v-muted);
  --swal2-outline: 0 0 0 3px rgba(212, 177, 90, 0.35);
}

.swal2-popup {
  font-family: inherit;
  color: var(--b4v-parchment) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

body.dark-page h2.swal2-title,
.swal2-title {
  color: var(--b4v-gold) !important;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.swal2-html-container {
  color: var(--b4v-muted) !important;
  font-size: 0.92rem;
}

.swal2-input,
.swal2-textarea,
.swal2-select,
.swal2-file {
  background: #16110d !important;
  border: 1px solid rgba(212, 177, 90, 0.4) !important;
  color: var(--b4v-parchment) !important;
  color-scheme: dark;
  max-width: 100%;
  box-sizing: border-box;
}

.swal2-textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.swal2-input::placeholder,
.swal2-textarea::placeholder {
  color: rgba(203, 188, 163, 0.65);
}

.swal2-actions {
  gap: 0.5rem;
}

.swal2-styled.swal2-confirm {
  background: rgba(122, 31, 36, 0.85) !important;
  background-image: none !important;
  color: #f7edd4 !important;
  border: 1px solid rgba(212, 177, 90, 0.45) !important;
  box-shadow: none !important;
  font-weight: 600;
}

.swal2-styled.swal2-confirm:hover {
  filter: brightness(1.08);
}

.swal2-styled.swal2-cancel {
  background: transparent !important;
  color: var(--b4v-gold) !important;
  border: 1px solid var(--b4v-gold) !important;
  box-shadow: none !important;
}

.swal2-styled.swal2-cancel:hover {
  background: rgba(212, 177, 90, 0.16) !important;
  color: var(--b4v-gold-light) !important;
}

.swal2-styled.swal2-deny {
  background: rgba(122, 31, 36, 0.7) !important;
  color: #f7d0d0 !important;
  border: 1px solid rgba(196, 64, 64, 0.55) !important;
  box-shadow: none !important;
}

.swal2-styled.swal2-confirm.b4v-swal-confirm-danger {
  color: #f7d0d0 !important;
  border: 1px solid rgba(196, 64, 64, 0.55) !important;
}

.swal2-icon.swal2-warning,
.swal2-icon.swal2-info,
.swal2-icon.swal2-question {
  border-color: var(--b4v-gold) !important;
  color: var(--b4v-gold) !important;
}

.swal2-icon.swal2-error {
  border-color: #c45a5a !important;
  color: #f7d0d0 !important;
}

.swal2-icon.swal2-error [class^=swal2-x-mark-line] {
  background-color: #c45a5a !important;
}

.swal2-icon.swal2-success [class^=swal2-success-line] {
  background-color: #5abe6e !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
  border-color: rgba(90, 190, 110, 0.45) !important;
}
