/* Nezerite.PW v3.6.9 — Light Theme Contrast & Layout
 * Cosmetic patch for chat footer, LiteBans, staff profiles.
 * Requires Spectrum theme v3.6.3+ and v3.6.8; no backend changes.
 * Legacy modules often use fixed text colors from the original dark theme.
 */
html[data-nz-theme] body.inferno-core {
  --nz369-panel: color-mix(in srgb,var(--nz-surface) 94%,var(--nz-accent) 6%);
  --nz369-soft: color-mix(in srgb,var(--nz-surface-2) 93%,var(--nz-accent) 7%);
  --nz369-border: color-mix(in srgb,var(--nz-line) 88%,var(--nz-accent) 12%);
  --nz369-link: color-mix(in srgb,var(--nz-ink) 70%,var(--nz-accent) 30%);
  --nz369-label: var(--nz-ink-muted);
}
/* 1. Full chat page: dark, fixed footer stood out against white theme. */
html[data-nz-theme] body.inferno-core .terminal .footer-tools,
html[data-nz-theme] body.inferno-core .footer-tools {
  background:var(--nz369-panel)!important;
  color:var(--nz-ink-muted)!important;
  border-top:1px solid var(--nz369-border)!important;
}
html[data-nz-theme] body.inferno-core .footer-tools :is(.muted,span:not(.badge)) {
  color:var(--nz-ink-muted)!important;
}
html[data-nz-theme] body.inferno-core .footer-tools :is(button.soft,a.soft) {
  background:var(--nz369-soft)!important;
  color:var(--nz-ink)!important;
  border:1px solid var(--nz369-border)!important;
}
html[data-nz-theme] body.inferno-core .footer-tools :is(button.soft,a.soft):hover {
  background:color-mix(in srgb,var(--nz-accent) 13%,var(--nz-surface))!important;
  border-color:var(--nz-accent)!important;
}
html[data-nz-light="true"] body.inferno-core :is(.log-lines,.log-preview) :is(.chat-name,.chat-player,.chat-user) {
  color:var(--nz369-link)!important;
}
/* 2. LiteBans. Real classes are .lbv-* (not .lbv358-*). */
html[data-nz-theme] body.inferno-core #lbv-root.lbv-shell,
html[data-nz-theme] body.inferno-core .lbv-dialog {
  background:var(--nz369-panel)!important;
  color:var(--nz-ink)!important;
  border-color:var(--nz369-border)!important;
  box-shadow:0 8px 28px color-mix(in srgb,var(--nz-ink) 8%,transparent)!important;
}
html[data-nz-theme] body.inferno-core #lbv-root :is(.lbv-kpi,.lbv-filter-panel,.lbv-card,.lbv-analytics-section,.lbv-view-switch),
html[data-nz-theme] body.inferno-core .lbv-dialog :is(.lbv-detail-grid>div,.lbv-detail-reason) {
  background:var(--nz369-soft)!important;
  border-color:var(--nz369-border)!important;
  color:var(--nz-ink)!important;
}
html[data-nz-theme] body.inferno-core #lbv-root :is(.lbv-reason,.lbv-empty),
html[data-nz-theme] body.inferno-core .lbv-dialog .lbv-detail-reason {
  background:var(--nz-surface)!important;
  border-color:var(--nz369-border)!important;
  color:var(--nz-ink)!important;
}
html[data-nz-theme] body.inferno-core #lbv-root :is(.lbv-top h1,.lbv-kpi strong,.lbv-player strong,.lbv-meta strong,.lbv-bar-row strong,.lbv-analytics-section h3),
html[data-nz-theme] body.inferno-core .lbv-dialog :is(h2,.lbv-detail-grid strong,.lbv-detail-reason p) {
  color:var(--nz-ink)!important;
}
html[data-nz-theme] body.inferno-core #lbv-root :is(.lbv-kpi span,.lbv-player small,.lbv-meta span,.lbv-sub,.lbv-note,.lbv-section-head,.lbv-empty,.lbv-filter-grid label span,.lbv-bar-row>div:first-child),
html[data-nz-theme] body.inferno-core .lbv-dialog :is(.lbv-detail-grid span,.lbv-dialog-head small) {
  color:var(--nz-ink-muted)!important;
}
html[data-nz-theme] body.inferno-core #lbv-root :is(.lbv-eyebrow,.lbv-accent,.lbv-reason-toggle) {
  color:var(--nz369-link)!important;
}
html[data-nz-theme] body.inferno-core #lbv-root :is(.lbv-tabs,.lbv-actions),
html[data-nz-theme] body.inferno-core .lbv-dialog .lbv-dialog-head {
  border-color:var(--nz369-border)!important;
}
html[data-nz-theme] body.inferno-core #lbv-root :is(.lbv-filter-grid input,.lbv-filter-grid select),
html[data-nz-theme] body.inferno-core .lbv-dialog :is(.lbv-x) {
  background:var(--nz-surface)!important;
  color:var(--nz-ink)!important;
  border-color:var(--nz369-border)!important;
}
html[data-nz-theme] body.inferno-core #lbv-root .lbv-filter-grid input::placeholder {
  color:var(--nz-ink-muted)!important;
  opacity:1;
}
html[data-nz-theme] body.inferno-core #lbv-root :is(.lbv-type,.lbv-view):not(.active),
html[data-nz-theme] body.inferno-core #lbv-root :is(.lbv-ghost,.lbv-top-actions button,.lbv-filter-actions button,.lbv-actions button),
html[data-nz-theme] body.inferno-core .lbv-dialog :is(.lbv-detail-actions button,.lbv-x) {
  background:var(--nz369-soft)!important;
  border-color:var(--nz369-border)!important;
  color:var(--nz-ink)!important;
}
html[data-nz-theme] body.inferno-core #lbv-root :is(.lbv-type,.lbv-view).active,
html[data-nz-theme] body.inferno-core #lbv-root :is(.lbv-actions button.lbv-primary) {
  background:var(--nz-gradient)!important;
  border-color:var(--nz-accent)!important;
  color:white!important;
}
html[data-nz-theme] body.inferno-core #lbv-root :is(.lbv-type,.lbv-view):not(.active):hover,
html[data-nz-theme] body.inferno-core #lbv-root .lbv-card:hover {
  background:color-mix(in srgb,var(--nz-accent) 13%,var(--nz-surface))!important;
  border-color:var(--nz-accent)!important;
}
html[data-nz-theme] body.inferno-core #lbv-root .lbv-pill {
  border-color:var(--nz369-border)!important;
}
/* White theme: badges keep their meanings, but use light fills/dark writing. */
html[data-nz-light="true"] body.inferno-core #lbv-root .lbv-pill {
  background:var(--nz-surface)!important;
  color:var(--nz-ink)!important;
}
html[data-nz-light="true"] body.inferno-core #lbv-root .lbv-pill.type {
  color:var(--nz369-link)!important;
  background:color-mix(in srgb,var(--nz-accent) 10%,white)!important;
}
html[data-nz-light="true"] body.inferno-core #lbv-root .lbv-pill.active {
  background:#e2f6ed!important;
  color:#166348!important;
  border-color:#9bd5ba!important;
}
html[data-nz-light="true"] body.inferno-core #lbv-root .lbv-pill.expired {
  background:#fff1dc!important;
  color:#82500c!important;
  border-color:#eac88a!important;
}
html[data-nz-light="true"] body.inferno-core #lbv-root .lbv-pill.permanent {
  background:#fce8ef!important;
  color:#8a3154!important;
  border-color:#e3aec3!important;
}
html[data-nz-light="true"] body.inferno-core #lbv-root .lbv-pill.temporary {
  background:#eeebff!important;
  color:#5841a0!important;
  border-color:#c9bdf2!important;
}
html[data-nz-light="true"] body.inferno-core #lbv-root :is(.lbv-type,.lbv-view).active,
html[data-nz-light="true"] body.inferno-core #lbv-root .lbv-actions button.lbv-primary {
  background:linear-gradient(115deg,
    color-mix(in srgb,var(--nz-accent) 46%,var(--nz-ink)),
    color-mix(in srgb,var(--nz-accent2) 43%,var(--nz-ink)))!important;
  color:#fff!important;
}
/* Limit card layout overflow on narrow screens; buttons remain available. */
html[data-nz-theme] body.inferno-core #lbv-root :is(.lbv-card,.lbv-card-main,.lbv-player,.lbv-reason-holder,.lbv-meta),
html[data-nz-theme] body.inferno-core #lbv-root .lbv-card>div {
  min-width:0;
}
html[data-nz-theme] body.inferno-core #lbv-root .lbv-card {
  max-width:100%;
  box-sizing:border-box;
}
@media(max-width:760px){
  html[data-nz-theme] body.inferno-core #lbv-root .lbv-card {
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"name actions" "reason reason" "meta meta"!important;
  }
  html[data-nz-theme] body.inferno-core #lbv-root .lbv-card-main {
    flex-wrap:wrap;
    gap:7px;
  }
}
@media(max-width:560px){
  html[data-nz-theme] body.inferno-core #lbv-root .lbv-filter-grid {
    grid-template-columns:minmax(0,1fr)!important;
  }
  html[data-nz-theme] body.inferno-core #lbv-root .lbv-tabs {
    gap:3px;
  }
  html[data-nz-theme] body.inferno-core #lbv-root .lbv-type {
    flex:1 1 auto;
    padding:7px 9px;
  }
  html[data-nz-theme] body.inferno-core #lbv-root .lbv-player strong {
    white-space:normal;
    overflow-wrap:anywhere;
  }
}
/* 3. Staff activity/profile: inherited rose-on-dark text was unreadable on white. */
html[data-nz-theme] body.inferno-core .sp-wrap {
  color:var(--nz-ink)!important;
}
html[data-nz-theme] body.inferno-core :is(.sp-hero,.sp-stat,.sp-panel,.sp-toolbar) {
  background:var(--nz369-panel)!important;
  border-color:var(--nz369-border)!important;
  color:var(--nz-ink)!important;
}
html[data-nz-theme] body.inferno-core :is(.sp-hero h1,.sp-stat strong,.sp-panel h2,.sp-mini-rows strong,.sp-event strong,.sp-activity-unknown strong) {
  color:var(--nz-ink)!important;
}
html[data-nz-theme] body.inferno-core :is(.sp-hero p,.sp-stat-label,.sp-stat small,.sp-chart .sp-bar-day,.sp-chart .sp-bar-count,.sp-note,.sp-disclaimer,.sp-mini-rows span,.sp-event small,.sp-event time,.sp-empty,.sp-toolbar label,.sp-toolbar-simple strong) {
  color:var(--nz-ink-muted)!important;
}
html[data-nz-theme] body.inferno-core :is(.sp-eyebrow,.sp-chip) {
  color:var(--nz369-link)!important;
}
html[data-nz-theme] body.inferno-core .sp-chart,
html[data-nz-theme] body.inferno-core :is(.sp-mini-rows>div,.sp-event) {
  border-color:var(--nz369-border)!important;
}
html[data-nz-theme] body.inferno-core .sp-bar {
  background:var(--nz-gradient)!important;
  box-shadow:none!important;
}
html[data-nz-theme] body.inferno-core .sp-activity-unknown {
  background:color-mix(in srgb,var(--nz-surface) 88%,#df9e45)!important;
  border-color:color-mix(in srgb,var(--nz-line) 70%,#b58a55)!important;
}
html[data-nz-theme] body.inferno-core .sp-activity-unknown p {
  color:var(--nz-ink-muted)!important;
}
html[data-nz-theme] body.inferno-core :is(.sp-toolbar select,.sp-range a:not(.active)) {
  background:var(--nz-surface)!important;
  border-color:var(--nz369-border)!important;
  color:var(--nz-ink)!important;
}
html[data-nz-light="true"] body.inferno-core .sp-activity-unknown span {
  color:#80500c!important;
}
html[data-nz-light="true"] body.inferno-core :is(.sp-toolbar select,.sp-toolbar label,.sp-event strong,.sp-event time) {
  color:var(--nz-ink)!important;
}
html[data-nz-light="true"] body.inferno-core .sp-hero-mark {
  color:color-mix(in srgb,var(--nz-accent) 10%,transparent)!important;
}
html[data-nz-light="true"] body.inferno-core .sp-chart .sp-bar-count {
  color:var(--nz369-link)!important;
}
@media(max-width:700px){
  html[data-nz-theme] body.inferno-core .sp-columns {grid-template-columns:minmax(0,1fr)}
  html[data-nz-theme] body.inferno-core .sp-event {grid-template-columns:8px minmax(0,1fr)}
  html[data-nz-theme] body.inferno-core .sp-event time {grid-column:2;white-space:normal}
}
