/* HumanitZ Server Panel — Styles */
/* Post-outbreak field station: worn earth, dried blood accents, functional severity. */

body { background: var(--color-surface-300); color: var(--color-text); }

/* ── Modal Close Buttons — always visible ── */
.modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 2rem; height: 2rem; border-radius: 0.375rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(139,58,58,0.1); border: 1px solid rgba(139,58,58,0.2);
  color: var(--color-horde); cursor: pointer; transition: all 0.15s; z-index: 10;
}
.modal-close:hover { background: rgba(139,58,58,0.2); color: var(--color-text-bright); }
.modal-close svg, .modal-close i { width: 14px; height: 14px; }

/* ── Breadcrumbs ── */
.breadcrumb-bar {
  display: flex; align-items: center; gap: 0.25rem;
  font-size: 0.6875rem; color: var(--color-text-dim); padding: 0.5rem 0;
  border-bottom: 1px solid rgba(48,42,37,0.3); margin-bottom: 0.75rem;
}
.breadcrumb-bar:empty { display: none; }
.breadcrumb-item { color: var(--color-muted); cursor: pointer; transition: color 0.15s; }
.breadcrumb-item:hover { color: var(--color-accent); text-decoration: underline; }
.breadcrumb-item.current { color: var(--color-text-bright); cursor: default; }
.breadcrumb-item.current:hover { color: var(--color-text-bright); text-decoration: none; }
.breadcrumb-sep { color: var(--color-border-light); font-size: 0.5rem; margin: 0 0.125rem; }
.breadcrumb-sep::after { content: '›'; }

/* ── Entity Clickable ── */
.entity-link { color: var(--color-accent); cursor: pointer; font-weight: 500; transition: color 0.15s; }
.entity-link:hover { text-decoration: underline; color: var(--color-accent-hover); }

/* ── Landing Skyline Background ── */
.landing-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  transition: opacity 0.5s ease;
}
.landing-bg svg { width: 100%; height: 100%; }
.landing-content { position: relative; z-index: 1; }
/* Dim skyline when panel is active so it doesn't compete with admin content */
#panel:not(.hidden) ~ #skyline-bg,
#app:has(#panel:not(.hidden)) #skyline-bg,
#skyline-bg.panel-active { opacity: 0.35; }

/* ── Sidebar ── */
.sidebar-nav {
  width: 13rem;
  background: var(--color-surface-200);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .sidebar-nav { width: 3.5rem; }
  .sidebar-nav .nav-txt, .sidebar-nav .sidebar-full { display: none !important; }
  .sidebar-nav .sidebar-mini { display: block !important; }
  .sidebar-nav .sidebar-user { justify-content: center; }
  .sidebar-nav .sidebar-header { text-align: center; padding: 0.5rem; }
}

.nav-link {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.85rem;
  color: var(--color-muted); font-size: 0.8125rem;
  border-left: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.nav-link:hover { color: var(--color-text); background: rgba(212,145,92,0.04); }
.nav-link.active { color: var(--color-text-bright); border-left-color: var(--color-accent); background: rgba(212,145,92,0.06); font-weight: 500; }
.tier-hidden { display: none !important; }
.nav-sep { border-top: 1px solid var(--color-border); margin: 0.4rem 0.75rem; }
.nav-ico { width: 1rem; height: 1rem; flex-shrink: 0; opacity: 0.45; }
.nav-link:hover .nav-ico { opacity: 0.75; }
.nav-link.active .nav-ico { opacity: 1; }

/* ── Page Titles ── */
.page-title {
  font-family: 'Red Rose', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-bright);
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.page-title-sm {
  font-family: 'Red Rose', Georgia, serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-bright);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

/* ── Cards — flat, worn ── */
.card {
  background: var(--color-surface-200);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1.25rem;
}
.card-title {
  font-family: 'Red Rose', Georgia, serif;
  font-size: 0.8125rem; font-weight: 600;
  color: var(--color-text); margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}


/* ── Stat Cards ── */
.stat-card {
  background: var(--color-surface-200); border: 1px solid var(--color-border);
  border-radius: 0.5rem; padding: 0.875rem 1rem; min-width: 0; overflow: hidden;
}
.stat-label { font-size: 0.6875rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; white-space: nowrap; }
.stat-value { font-size: 1.125rem; font-weight: 600; color: var(--color-text-bright); margin-top: 0.25rem; font-feature-settings: 'tnum' 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Stat Chips (landing) ── */
.stat-chip { background: var(--color-surface-200); border: 1px solid var(--color-border); border-radius: 0.5rem; padding: 1rem 1.25rem; text-align: center; }
.stat-chip-label { display: block; font-size: 0.6875rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; margin-bottom: 0.25rem; }
.stat-chip-value { display: block; font-size: 1rem; font-weight: 600; color: var(--color-text-bright); line-height: 1.4; }

/* ── Dashboard Layout (two-column) ── */
.dash-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  align-items: start;
}
@media (min-width: 1024px) {
  .dash-layout { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1400px) {
  .dash-layout { grid-template-columns: 2fr 1fr; }
}
.dash-modules-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* Server info inside dashboard — larger, more breathing room */
#dash-server-info .srv-info-panel { border-top: none; margin-top: 0; padding-top: 0; gap: 0.75rem; }
#dash-server-info .srv-info-row { gap: 0.75rem; }
#dash-server-info .srv-info-item { font-size: 0.75rem; gap: 0.375rem; }
#dash-server-info .srv-ico { width: 0.875rem; height: 0.875rem; }
#dash-server-info .srv-info-val { font-size: 0.6875rem; }
#dash-server-info .srv-rule { font-size: 0.625rem; padding: 0.2rem 0.5rem; gap: 0.25rem; }
#dash-server-info .srv-rule-ico { width: 0.625rem; height: 0.625rem; }
#dash-server-info .srv-info-threats { gap: 0.5rem; }
#dash-server-info .srv-threat-head { margin-bottom: 0.25rem; }
#dash-server-info .srv-threat-label { font-size: 0.6875rem; }
#dash-server-info .srv-threat-track { height: 4px; }
#dash-server-info .srv-info-loot { gap: 0.375rem; }
#dash-server-info .srv-loot { font-size: 0.625rem; padding: 0.175rem 0.4rem; }
#dash-server-info .srv-info-stats { gap: 0.75rem; }
#dash-server-info .srv-stat-val { font-size: 0.875rem; }
#dash-server-info .srv-stat-label { font-size: 0.5625rem; }
#dash-server-info .srv-stat-ico { width: 0.875rem; height: 0.875rem; }

/* ── Landing Card Layout ── */
/* Full-viewport landing — no scroll */
.landing-viewport {
  position: relative; z-index: 1;
  height: 100vh; width: 100%;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0 2.5rem; /* room for fixed footer */
  overflow: hidden;
}
.landing-top {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  padding: 0.5rem 1.5rem 0;
  flex-shrink: 0;
}
.landing-carousel {
  flex: 1; /* fill remaining space between top and bottom */
  display: flex; flex-direction: column;
  align-items: center;
  justify-content: center;
}
.landing-bottom {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 0 1.5rem 0.5rem;
  flex-shrink: 0;
  margin-top: auto; /* push to bottom of viewport */
}

/* Server tabs — horizontal name buttons above the slide */
.landing-server-tabs {
  display: flex; align-items: center; justify-content: center;
  gap: 0.25rem;
  padding: 0;
  flex-shrink: 0;
}
.landing-server-tabs.single { display: none; }
.landing-tab {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.375rem;
  background: rgba(25,22,20,0.5);
  border: 1px solid var(--color-border);
  font-size: 0.6875rem; font-weight: 500;
  color: var(--color-text-dim);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.landing-tab:hover { color: var(--color-muted); border-color: var(--color-border-light); background: rgba(30,27,24,0.7); }
.landing-tab.active { color: var(--color-text-bright); border-color: rgba(212,145,92,0.4); background: rgba(212,145,92,0.08); }
.landing-tab-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.landing-tab-dot.online { background: var(--color-calm); }
.landing-tab-dot.offline { background: var(--color-text-dim); }
.landing-tab-dot.stale { background: var(--color-surge); }

/* Slide area — base layout is in .landing-viewport above, here we add slide-specific sizing */
.landing-carousel {
  padding: 0 2rem;
  position: relative;
  width: 100%;
  max-width: 900px;
  overflow: hidden;
}
@media (min-width: 1600px) { .landing-carousel { max-width: 1000px; } }
.landing-slides {
  position: relative;
  width: 100%;
}
/* Slide transition: physical slide left/right */
.landing-slide {
  position: absolute; top: 0; left: 0; right: 0;
  opacity: 0; pointer-events: none;
  transform: translateX(60px);
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.landing-slide.active {
  opacity: 1; pointer-events: auto;
  position: relative;
  transform: translateX(0);
}
.landing-slide.exit-left {
  opacity: 0;
  transform: translateX(-60px);
  position: absolute;
}

/* Vertical server card */
.landing-server-slide {
  width: 100%;
  background: rgba(25,22,20,0.75);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  backdrop-filter: blur(8px);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  position: relative;
  overflow: hidden;
}
/* Progress bar — fills along bottom edge of card */
.landing-server-slide::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, rgba(212,145,92,0.4), var(--color-accent));
  border-radius: 0 0 0.75rem 0.75rem;
  pointer-events: none;
}
.landing-slide.active .landing-server-slide::after {
  animation: landing-progress var(--landing-delay, 12s) linear forwards;
}
@keyframes landing-progress {
  from { width: 0%; }
  to { width: 100%; }
}
/* Single server — no progress bar needed */
.landing-server-tabs.single ~ .landing-carousel .landing-server-slide::after { display: none; }
/* Paused state */
.landing-carousel.paused .landing-server-slide::after {
  animation-play-state: paused;
}

/* Server slide — identity row (horizontal on desktop) */
.slide-identity {
  display: flex; align-items: center; gap: 1.25rem;
  flex-wrap: wrap;
}
.slide-server-name {
  font-family: 'Red Rose', Georgia, serif;
  font-size: 1.25rem; font-weight: 600; color: var(--color-text-bright);
  display: flex; align-items: center; gap: 0.5rem;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}
.slide-status-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%; flex-shrink: 0;
}
.slide-meta {
  display: flex; align-items: center; gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.75rem; color: var(--color-muted);
}
.slide-meta-row {
  display: flex; align-items: center; gap: 0.35rem;
}
.slide-meta-icon { width: 0.8125rem; height: 0.8125rem; color: var(--color-text-dim); flex-shrink: 0; }
.slide-meta-val { color: var(--color-text); font-weight: 500; }
.slide-addr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem; color: var(--color-text-dim);
  letter-spacing: 0.02em;
}
.slide-divider {
  width: 100%; height: 1px;
  background: rgba(48,42,37,0.5);
}

/* Server slide — active modules pills */
.slide-modules {
  display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center;
}
.slide-mod-pill {
  display: inline-flex; align-items: center; gap: 0.2rem;
  font-family: 'IBM Plex Mono', 'Fira Code', monospace;
  font-size: 0.5625rem; font-weight: 500;
  color: rgba(200,190,175,0.55);
  background: rgba(48,42,37,0.35);
  padding: 0.15rem 0.4rem; border-radius: 0.25rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.slide-mod-pill:hover {
  color: rgba(200,190,175,0.8);
  background: rgba(48,42,37,0.55);
}
.slide-mod-pill i, .slide-mod-pill svg {
  width: 0.5625rem; height: 0.5625rem;
  stroke-width: 1.75;
}

/* Server slide — schedule section */
.slide-schedule {
  display: flex; flex-direction: column; gap: 0.375rem;
}
.slide-section-title {
  font-family: 'Red Rose', Georgia, serif;
  font-size: 0.6875rem; font-weight: 600; color: var(--color-text-dim);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 0.125rem;
}

/* Server slide — info section (rules/threats/loot stacked vertically) */
.slide-info { display: flex; flex-direction: column; gap: 0.5rem; }
/* Two-column layout for info sections on wider screens */
.slide-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .slide-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
  }
}
.slide-info .srv-info-panel { border-top: none; margin-top: 0; padding-top: 0; gap: 0.5rem; }
.slide-info .srv-info-row { gap: 0.5rem; }
.slide-info .srv-info-item { font-size: 0.6875rem; gap: 0.3rem; }
.slide-info .srv-ico { width: 0.75rem; height: 0.75rem; }
.slide-info .srv-info-val { font-size: 0.625rem; }
.slide-info .srv-rule { font-size: 0.5625rem; padding: 0.15rem 0.4rem; gap: 0.2rem; }
.slide-info .srv-rule-ico { width: 0.5625rem; height: 0.5625rem; }
.slide-info .srv-threat-label { font-size: 0.625rem; }
.slide-info .srv-threat-track { height: 3px; }
.slide-info .srv-loot { font-size: 0.5625rem; padding: 0.125rem 0.35rem; }
.slide-info .srv-info-stats { gap: 0.5rem; }
.slide-info .srv-stat-val { font-size: 0.75rem; }
.slide-info .srv-stat-label { font-size: 0.5rem; }
.slide-info .srv-stat-ico { width: 0.75rem; height: 0.75rem; }

@media (max-width: 480px) {
  .landing-top { padding: 1rem 1rem 0; }
  .landing-server-tabs { padding: 0.5rem 0.75rem 0; gap: 0.2rem; }
  .landing-tab { font-size: 0.625rem; padding: 0.25rem 0.5rem; }
  .landing-carousel { padding: 0.375rem 0.75rem; }
  .landing-server-slide { padding: 0.875rem 1rem; gap: 0.5rem; }
  .landing-bottom { padding: 0 1rem 0.5rem; }
  .slide-identity { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .slide-meta { flex-direction: column; align-items: flex-start; }
}

.landing-status-pill {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.2rem 0.625rem; border-radius: 9999px;
  background: rgba(18,16,14,0.6); border: 1px solid var(--color-border);
  font-size: 0.6875rem; flex-shrink: 0; vertical-align: middle;
}
.landing-status-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%; flex-shrink: 0;
}
.landing-status-dot.online { background: var(--color-calm); }
.landing-status-dot.offline { background: var(--color-text-dim); }

.landing-auth-section { text-align: center; }
.landing-discord-btn {
  display: inline-flex; align-items: center; gap: 0.625rem;
  background: #5865F2; color: #fff; font-weight: 600; font-size: 0.8125rem;
  padding: 0.625rem 1.5rem; border-radius: 0.5rem;
  transition: background 0.15s; text-decoration: none;
}
.landing-discord-btn:hover { background: #4752C4; }

.landing-links-row {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-size: 0.6875rem;
}

/* ── Landing Footer ── */
.landing-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.375rem 1.5rem;
  text-align: center;
  z-index: 2;
  pointer-events: none;
}
.landing-footer a { pointer-events: auto; }
.landing-footer-main {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin-bottom: 0.125rem;
  font-size: 0.6875rem;
}
.landing-footer-repo {
  display: inline-flex; align-items: center; gap: 0.375rem;
  color: var(--color-text-bright); text-decoration: none; font-weight: 600;
  transition: color 0.15s;
}
.landing-footer-repo:hover { color: var(--color-accent); }
.landing-footer-repo svg { opacity: 0.7; }
.landing-footer-repo:hover svg { opacity: 1; }
.landing-footer-sep { color: var(--color-border-light); }
.landing-footer-link {
  color: var(--color-muted); text-decoration: none; transition: color 0.15s;
}
.landing-footer-link:hover { color: var(--color-text-bright); }
.landing-footer-attr {
  font-size: 0.625rem;
  color: rgba(122,116,108,0.4);
  line-height: 1.6;
}
.landing-footer-attr a {
  color: rgba(122,116,108,0.5);
  text-decoration: none;
  transition: color 0.15s;
}
.landing-footer-attr a:hover { color: var(--color-muted); }

/* ── Inputs ── */
.input-field {
  background: var(--color-surface-300); border: 1px solid var(--color-border); border-radius: 0.375rem;
  color: var(--color-text-bright); padding: 0.4rem 0.75rem; font-size: 0.8125rem;
  outline: none; transition: border-color 0.15s;
}
.input-field.has-icon { padding-left: 2rem; }
.input-field:focus { border-color: var(--color-accent); }
.input-field::placeholder { color: var(--color-text-dim); }

/* ── Buttons ── */
.btn-primary {
  background: var(--color-accent); color: var(--color-surface-300); font-weight: 600;
  padding: 0.4rem 0.875rem; border-radius: 0.375rem; font-size: 0.8125rem;
  border: none; cursor: pointer; transition: background 0.15s;
}
.btn-primary:hover:not(:disabled) { background: var(--color-accent-hover); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-secondary {
  background: rgba(156,104,68,0.12); color: #c9a882; font-weight: 500;
  padding: 0.4rem 0.875rem; border-radius: 0.375rem; font-size: 0.8125rem;
  border: 1px solid rgba(156,104,68,0.25); cursor: pointer; transition: all 0.15s;
}
.btn-secondary:hover { background: rgba(156,104,68,0.22); border-color: rgba(156,104,68,0.4); }

.power-btn {
  padding: 0.4rem 0.875rem; border-radius: 0.375rem; font-size: 0.8125rem;
  font-weight: 500; cursor: pointer; transition: all 0.15s; border: 1px solid;
}
.power-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.power-start { background: rgba(109,186,130,0.08); color: var(--color-calm); border-color: rgba(109,186,130,0.2); }
.power-start:hover:not(:disabled) { background: rgba(109,186,130,0.15); }
.power-restart { background: rgba(212,168,67,0.08); color: var(--color-surge); border-color: rgba(212,168,67,0.2); }
.power-restart:hover:not(:disabled) { background: rgba(212,168,67,0.15); }
.power-stop { background: rgba(196,90,74,0.08); color: var(--color-horde); border-color: rgba(196,90,74,0.2); }
.power-stop:hover:not(:disabled) { background: rgba(196,90,74,0.15); }
.power-backup { background: rgba(212,145,92,0.08); color: var(--color-accent); border-color: rgba(212,145,92,0.2); }
.power-backup:hover:not(:disabled) { background: rgba(212,145,92,0.15); }

.quick-cmd {
  background: var(--color-surface-100); border: 1px solid var(--color-border); color: var(--color-text);
  padding: 0.3rem 0.65rem; border-radius: 0.375rem; font-size: 0.75rem;
  cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.quick-cmd:hover { border-color: var(--color-border-light); color: var(--color-text-bright); }

/* ── Feed ── */
.feed-item {
  display: flex; align-items: flex-start; gap: 0.5rem;
  padding: 0.35rem 0.5rem; border-radius: 0.25rem; font-size: 0.8125rem;
  transition: background 0.1s;
}
.feed-item:hover { background: rgba(255,255,255,0.02); }
.feed-time { color: var(--color-text-dim); font-size: 0.6875rem; white-space: nowrap; font-family: 'JetBrains Mono', monospace; min-width: 3rem; padding-top: 1px; }
.feed-ico { font-size: 0.8125rem; min-width: 1.1rem; text-align: center; flex-shrink: 0; }
.feed-txt { flex: 1; color: var(--color-text); line-height: 1.4; }
.feed-txt strong { color: var(--color-text-bright); font-weight: 500; }
.feed-txt .player-link { color: var(--color-accent); cursor: pointer; font-weight: 500; }
.feed-txt .player-link:hover { text-decoration: underline; }
.feed-empty { color: var(--color-text-dim); padding: 1.5rem; text-align: center; font-size: 0.8125rem; }

/* ── Chat ── */
.chat-msg { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.2rem 0.5rem; border-radius: 0.25rem; font-size: 0.8125rem; }
.chat-msg:hover { background: rgba(255,255,255,0.015); }
.chat-author { color: var(--color-accent); font-weight: 500; white-space: nowrap; cursor: pointer; }
.chat-author:hover { text-decoration: underline; }
.chat-author.outbound { color: var(--color-calm); }
.chat-author.system { color: var(--color-surge); }
.chat-text { color: var(--color-text); word-break: break-word; }

/* ── Console ── */
.console-line { padding: 1px 0; color: var(--color-text); white-space: pre-wrap; word-break: break-all; }
.console-line.cmd { color: var(--color-calm); }
.console-line.cmd::before { content: '› '; color: var(--color-text-dim); }
.console-line.resp { color: var(--color-text); }
.console-line.err { color: var(--color-horde); }
.console-line.sys { color: var(--color-text-dim); font-style: italic; }
.cmd-item { display: flex; align-items: center; padding: 0.35rem 0.75rem; font-size: 0.75rem; color: var(--color-text); cursor: pointer; font-family: 'JetBrains Mono', monospace; transition: background 0.1s; }
.cmd-item:hover { background: rgba(212,145,92,0.06); color: var(--color-text-bright); }
.cmd-desc { font-family: Inter, sans-serif; color: var(--color-text-dim); margin-left: auto; font-size: 0.625rem; }

/* ── Resource Bars ── */
.res-bar-track { height: 4px; background: var(--color-surface-100); border-radius: 2px; overflow: hidden; }
.res-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.res-bar-fill.cpu { background: var(--color-cpu); }
.res-bar-fill.mem { background: var(--color-mem); }
.res-bar-fill.disk { background: var(--color-surge); }

/* ── Player Table ── */
.player-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; table-layout: auto; }
.player-table th { text-align: left; padding: 0.5rem 0.75rem; color: var(--color-muted); font-weight: 500; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--color-border); position: sticky; top: 0; background: var(--color-surface-300); cursor: pointer; user-select: none; white-space: nowrap; }
.player-table th:hover { color: var(--color-text); }
.player-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid rgba(46,42,38,0.5); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-table tr:hover td { background: rgba(212,145,92,0.03); }
.player-table tr.clickable { cursor: pointer; }

/* ── Status Dot ── */
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.online { background: var(--color-calm); }
.status-dot.offline { background: var(--color-text-dim); }
.status-dot.inactive { background: var(--color-border-light); }

/* ── Vitals ── */
.vital-row { display: flex; align-items: center; gap: 0.5rem; }
.vital-label { font-size: 0.6875rem; color: var(--color-muted); min-width: 3.5rem; }
.vital-track { flex: 1; height: 5px; background: var(--color-surface-100); border-radius: 2px; overflow: hidden; }
.vital-fill { height: 100%; border-radius: 2px; transition: width 0.3s; }
.vital-val { font-size: 0.625rem; color: var(--color-text); min-width: 3.5rem; text-align: right; font-family: 'JetBrains Mono', monospace; }

/* ── Inventory ── */
.inv-grid { display: grid; gap: 3px; }
.inv-grid.equipment { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.inv-grid.quickslots { grid-template-columns: repeat(8, 1fr); }
.inv-grid.storage { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.inv-slot { background: var(--color-surface-300); border: 1px solid var(--color-border); border-radius: 3px; padding: 0.25rem 0.4rem; font-size: 0.625rem; color: var(--color-text); display: flex; flex-direction: column; justify-content: center; min-height: 1.75rem; transition: border-color 0.15s; position: relative; }
.inv-slot .inv-top { display: flex; justify-content: space-between; align-items: center; }
.inv-slot:hover { border-color: var(--color-border-light); }
.inv-slot.empty { opacity: 0.3; }
.inv-slot.inv-clickable { cursor: pointer; }
.inv-slot.inv-clickable:hover { border-color: var(--color-accent); background: rgba(212,145,92,0.04); }
.inv-slot .inv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-slot .inv-qty { color: var(--color-text-dim); font-family: 'JetBrains Mono', monospace; flex-shrink: 0; margin-left: 0.25rem; }
.inv-dur-track { height: 2px; background: var(--color-surface-100); border-radius: 1px; overflow: hidden; margin-top: 2px; }
.inv-dur-fill { height: 100%; border-radius: 1px; }

/* ── Item Popup ── */
.item-popup { background: var(--color-surface-200); border: 1px solid var(--color-border); border-radius: 0.5rem; box-shadow: 0 8px 24px rgba(0,0,0,0.5); width: 240px; overflow: hidden; }
.item-popup-header { background: var(--color-surface-100); padding: 0.5rem 0.75rem; font-size: 0.8125rem; font-weight: 600; color: var(--color-text-bright); border-bottom: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; }
.item-popup-body { padding: 0.5rem 0.75rem; }
.item-popup-owners { max-height: 150px; overflow-y: auto; }

/* ── Settings ── */
.settings-mode-btn { display: flex; align-items: center; gap: 0.375rem; padding: 0.3rem 0.625rem; font-size: 0.6875rem; font-weight: 500; color: var(--color-muted); border-radius: 0.375rem; cursor: pointer; transition: all 0.15s; background: transparent; border: none; white-space: nowrap; }
.settings-mode-btn:hover { color: var(--color-text); }
.settings-mode-btn.active { background: rgba(212,145,92,0.12); color: var(--color-accent); }
.settings-category { margin-bottom: 0.5rem; }
.settings-category-header { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; cursor: pointer; user-select: none; }
.settings-category-header:hover .cat-label { color: var(--color-text-bright); }
.cat-arrow { font-size: 0.625rem; color: var(--color-text-dim); transition: transform 0.15s; }
.cat-arrow.open { transform: rotate(90deg); }
.cat-label { font-size: 0.75rem; font-weight: 600; color: var(--color-text); text-transform: uppercase; letter-spacing: 0.04em; }
.cat-count { font-size: 0.625rem; color: var(--color-text-dim); }
.settings-category-items { display: none; }
.settings-category-items.open { display: block; }
.setting-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.625rem; border-radius: 0.375rem; border-bottom: 1px solid rgba(255,255,255,0.03); }
.setting-row:hover { background: rgba(255,255,255,0.03); }
.setting-name { font-size: 0.8125rem; font-weight: 500; color: var(--color-text); min-width: 200px; }
.setting-desc { font-size: 0.75rem; color: var(--color-muted); flex: 1; }
.setting-input { background: var(--color-surface-200); border: 1px solid var(--color-border-light); border-radius: 4px; color: var(--color-text-bright); padding: 0.35rem 0.5rem; font-size: 0.8125rem; width: 120px; outline: none; text-align: right; font-family: 'JetBrains Mono', monospace; }
.setting-input:focus { border-color: var(--color-accent); }
.setting-input.changed { border-color: var(--color-surge); background: rgba(212,168,67,0.04); }

/* ── Bot Config specific ── */
.setting-toggle { position: relative; width: 36px; height: 20px; flex-shrink: 0; cursor: pointer; }
.setting-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.setting-toggle .toggle-track { position: absolute; inset: 0; background: var(--color-border); border-radius: 999px; transition: background 0.2s; }
.setting-toggle input:checked + .toggle-track { background: rgba(109,186,130,0.3); }
.setting-toggle .toggle-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--color-muted); border-radius: 50%; transition: all 0.2s; }
.setting-toggle input:checked + .toggle-track + .toggle-thumb { left: 18px; background: var(--color-calm); }
.setting-sensitive-badge { font-size: 0.5625rem; color: var(--color-horde); background: rgba(196,90,74,0.08); border: 1px solid rgba(196,90,74,0.15); padding: 0.1rem 0.3rem; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.setting-commented { opacity: 0.5; }
.setting-commented .setting-name { color: var(--color-text-dim); }
.setting-env-key { font-family: 'JetBrains Mono', monospace; font-size: 0.625rem; color: var(--color-text-dim); margin-top: 0.1rem; }

/* ── Settings Diff ── */
.diff-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.625rem; border-radius: 0.375rem; background: rgba(255,255,255,0.015); margin-bottom: 0.375rem; }
.diff-row:hover { background: rgba(255,255,255,0.03); }
.diff-key { font-size: 0.8125rem; font-weight: 500; color: var(--color-text); flex: 1; min-width: 0; }
.diff-key-raw { font-size: 0.6875rem; color: var(--color-text-dim); font-family: 'JetBrains Mono', monospace; }
.diff-values { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.diff-old { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--color-horde); background: rgba(196,90,74,0.08); padding: 0.15rem 0.4rem; border-radius: 3px; text-decoration: line-through; text-decoration-color: rgba(196,90,74,0.4); }
.diff-arrow { color: var(--color-text-dim); font-size: 0.75rem; }
.diff-new { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--color-calm); background: rgba(109,186,130,0.08); padding: 0.15rem 0.4rem; border-radius: 3px; font-weight: 500; }

/* ── Server Cards ── */
.server-card { background: var(--color-surface-200); border: 1px solid var(--color-border); border-radius: 0.75rem; padding: 0.875rem 1rem; display: flex; flex-direction: column; gap: 0.25rem; height: 100%; min-width: 0; }
.server-card-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.125rem; min-width: 0; }
.server-card-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; flex-shrink: 0; }
.server-card-name { font-size: 0.8125rem; font-weight: 600; color: var(--color-text-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.server-card-status { font-size: 0.6875rem; flex-shrink: 0; font-weight: 500; }
.server-card-stats { display: flex; align-items: center; gap: 0.375rem; font-size: 0.6875rem; color: var(--color-muted); }
.server-card-world { font-size: 0.6875rem; color: var(--color-muted); }
.server-card-addr { font-family: 'JetBrains Mono', monospace; font-size: 0.625rem; color: var(--color-text-dim); letter-spacing: 0.02em; }
.server-card-schedule { margin-top: auto; padding-top: 0.5rem; border-top: 1px solid rgba(48,42,37,0.5); }
.server-card-schedule-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.375rem; }

/* ── Server Info Panel ── */
.srv-info-panel { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid rgba(48,42,37,0.5); display: flex; flex-direction: column; gap: 0.5rem; }
.srv-info-section { display: flex; flex-direction: column; gap: 0.25rem; }
.srv-info-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.srv-info-item { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.6875rem; color: var(--color-muted); cursor: default; }
.srv-ico { width: 0.75rem; height: 0.75rem; color: var(--color-text-dim); flex-shrink: 0; }
.srv-info-label { color: var(--color-muted); }
.srv-info-val { color: var(--color-text); font-family: 'JetBrains Mono', monospace; font-size: 0.625rem; font-weight: 500; }

/* Rules pills */
.srv-info-rules { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.srv-rule { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.5625rem; padding: 0.15rem 0.4rem; border-radius: 0.25rem; border: 1px solid; font-weight: 500; cursor: default; white-space: nowrap; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.03em; }
.srv-rule-ico { width: 0.5625rem; height: 0.5625rem; flex-shrink: 0; }
.rule-pvp { color: var(--color-horde); border-color: rgba(196,90,74,0.3); background: rgba(196,90,74,0.06); }
.rule-pve { color: var(--color-calm); border-color: rgba(109,186,130,0.3); background: rgba(109,186,130,0.06); }
.rule-easy { color: var(--color-calm); border-color: rgba(109,186,130,0.2); background: rgba(109,186,130,0.04); }
.rule-mid { color: var(--color-surge); border-color: rgba(212,168,67,0.2); background: rgba(212,168,67,0.04); }
.rule-hard { color: var(--color-horde); border-color: rgba(196,90,74,0.2); background: rgba(196,90,74,0.04); }
.rule-on { color: var(--color-muted); border-color: rgba(92,87,79,0.3); background: rgba(92,87,79,0.04); }

/* Threat bars */
.srv-info-threats { display: flex; flex-direction: column; gap: 0.375rem; }
.srv-threat { cursor: default; }
.srv-threat-head { display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.15rem; }
.srv-threat-ico { width: 0.625rem; height: 0.625rem; flex-shrink: 0; }
.srv-threat-label { font-size: 0.625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.srv-threat-amt { font-size: 0.5625rem; font-family: 'JetBrains Mono', monospace; color: var(--color-text-dim); margin-left: auto; }
.srv-threat-track { height: 3px; background: rgba(48,42,37,0.6); border-radius: 2px; overflow: hidden; }
.srv-threat-fill { height: 100%; border-radius: 2px; transition: width 0.3s ease; }
.threat-low .srv-threat-ico, .threat-low .srv-threat-label { color: var(--color-calm); }
.threat-low .srv-threat-fill { background: var(--color-calm); }
.threat-mid .srv-threat-ico, .threat-mid .srv-threat-label { color: var(--color-surge); }
.threat-mid .srv-threat-fill { background: linear-gradient(90deg, var(--color-surge), var(--color-accent)); }
.threat-high .srv-threat-ico, .threat-high .srv-threat-label { color: var(--color-horde); }
.threat-high .srv-threat-fill { background: linear-gradient(90deg, var(--color-accent), var(--color-horde)); }

/* Loot rarity grid */
.srv-info-loot { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.srv-loot { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.5625rem; padding: 0.125rem 0.3rem; border-radius: 0.2rem; cursor: default; border: 1px solid transparent; }
.srv-loot-ico { width: 0.5625rem; height: 0.5625rem; flex-shrink: 0; }
.srv-loot-label { font-weight: 500; }
.loot-scarce { color: var(--color-horde); border-color: rgba(196,90,74,0.15); background: rgba(196,90,74,0.04); }
.loot-normal { color: var(--color-muted); border-color: rgba(92,87,79,0.2); background: rgba(92,87,79,0.04); }
.loot-plenty { color: var(--color-calm); border-color: rgba(109,186,130,0.15); background: rgba(109,186,130,0.04); }
.loot-abundant { color: #5bb8e8; border-color: rgba(91,184,232,0.15); background: rgba(91,184,232,0.04); }

/* World stats */
.srv-info-stats { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.srv-stat { display: flex; flex-direction: column; align-items: center; gap: 0.05rem; cursor: default; min-width: 3rem; }
.srv-stat-ico { width: 0.75rem; height: 0.75rem; color: var(--color-text-dim); }
.srv-stat-val { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; font-weight: 600; color: var(--color-text); }
.srv-stat-label { font-size: 0.5rem; color: var(--color-text-dim); text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Schedule ── */
.sched-slot { display: flex; align-items: center; gap: 0.75rem; padding: 0.45rem 0.6rem; border-radius: 0.375rem; border: 1px solid transparent; background: transparent; position: relative; }
.sched-slot.active { border-color: rgba(212,145,92,0.2); background: rgba(212,145,92,0.04); }
.sched-slot:not(.active):hover { background: rgba(255,255,255,0.02); }
.sched-time { font-family: 'JetBrains Mono', monospace; color: var(--color-text-dim); font-size: 0.75rem; min-width: 7ch; }
.sched-name { font-weight: 600; font-size: 0.8125rem; }
.sched-name.calm { color: var(--color-calm); }
.sched-name.surge { color: var(--color-surge); }
.sched-name.horde { color: var(--color-horde); }
.sched-marker { color: var(--color-accent); font-size: 0.6875rem; margin-left: auto; font-weight: 500; }
.sched-hint { font-size: 0.625rem; color: var(--color-text-dim); margin-left: auto; }
.sched-slot.tomorrow { opacity: 0.45; }

/* ── Schedule Editor ── */
#sched-profiles-list { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 768px) { #sched-profiles-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); } }
.sched-profile-card { background: var(--color-surface-200); border: 1px solid var(--color-border); border-radius: 0.5rem; overflow: hidden; }
.sched-profile-hdr { display: flex; align-items: center; justify-content: space-between; padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--color-border); background: rgba(255,255,255,0.01); }
.sched-settings-group { border-bottom: 1px solid rgba(48,42,37,0.4); }
.sched-settings-group:last-child { border-bottom: none; }
.sched-group-hdr { display: flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; font-size: 0.5625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-dim); background: rgba(255,255,255,0.015); }
.sched-group-hdr i { width: 0.625rem; height: 0.625rem; }
.sched-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.125rem 0.75rem; padding: 0.375rem 0.75rem; }
.sched-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.125rem 0; }
.sched-setting-label { font-size: 0.625rem; color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Map sidebar ── */
.map-player-entry { display: flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.75rem; font-size: 0.75rem; cursor: pointer; transition: background 0.1s; }
.map-player-entry:hover { background: rgba(212,145,92,0.04); }
.map-player-entry .mp-name { color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-player-entry .mp-name.online { color: var(--color-text-bright); }

/* ── DB table ── */
.db-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.db-table th { text-align: left; padding: 0.4rem 0.5rem; color: var(--color-muted); font-weight: 500; font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--color-border); background: var(--color-surface-300); position: sticky; top: 0; }
.db-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid rgba(46,42,38,0.4); color: var(--color-text); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-table tr:hover td { background: rgba(212,145,92,0.03); }

/* ── Timeline Controls ── */
.tl-btn { background: var(--color-surface-200); border: 1px solid var(--color-border); color: var(--color-text); padding: 4px 10px; border-radius: 0.25rem; cursor: pointer; font-size: 0.8125rem; transition: all 0.15s; display: inline-flex; align-items: center; justify-content: center; }
.tl-btn:hover { background: var(--color-surface-50); border-color: var(--color-border-light); color: var(--color-text-bright); }
.tl-speed { background: var(--color-surface-200); border: 1px solid var(--color-border); color: var(--color-muted); padding: 2px 7px; font-size: 0.625rem; border-radius: 3px; cursor: pointer; transition: all 0.15s; font-weight: 500; }
.tl-speed:hover { color: var(--color-text); border-color: var(--color-border-light); }
.tl-speed.active { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-surface-300); }
.tl-layer { display: flex; align-items: center; gap: 3px; font-size: 0.625rem; cursor: pointer; white-space: nowrap; user-select: none; }
.tl-layer input { width: 12px; height: 12px; accent-color: var(--color-accent); cursor: pointer; }
.tl-popup { font-size: 0.75rem; line-height: 1.5; }
.tl-popup b { color: var(--color-accent); }
.tl-marker { background: transparent !important; border: none !important; }

/* ── Leaflet ── */
#map-container, #tl-map,
#map-container .leaflet-container, #tl-map .leaflet-container { background: #b8b5b0 !important; }
.map-terrain { filter: brightness(0.95) contrast(1.1) saturate(0) sepia(0.05); }
/* Blur right edge to hide map artifact */
.map-edge-mask {
  position: absolute; top: 0; right: 0; bottom: 0; width: 32px; z-index: 400;
  background: linear-gradient(to right, transparent, #b8b5b0 70%);
  pointer-events: none;
}
/* City/town name labels on map */
.map-city-label {
  background: none !important; border: none !important; box-shadow: none !important;
  font-family: 'Red Rose', Georgia, serif;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--color-border-light); text-transform: uppercase;
  text-shadow: 0 0 4px rgba(184,181,176,0.9), 0 0 8px rgba(184,181,176,0.7);
  white-space: nowrap; pointer-events: none;
}
.leaflet-control-zoom a { background: var(--color-surface-200) !important; color: var(--color-text) !important; border-color: var(--color-border) !important; }
.leaflet-control-zoom a:hover { background: var(--color-surface-50) !important; color: var(--color-text-bright) !important; }
.leaflet-popup-content-wrapper { background: var(--color-surface-200); color: var(--color-text-bright); border-radius: 0.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.leaflet-popup-tip { background: var(--color-surface-200); }
.leaflet-popup-content { margin: 0.625rem 0.875rem; font-size: 0.8125rem; line-height: 1.5; }
.leaflet-tooltip-dark { background: var(--color-surface-200); color: var(--color-text-bright); border: 1px solid var(--color-border); border-radius: 4px; font-size: 0.75rem; padding: 3px 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.leaflet-tooltip-dark::before { border-top-color: var(--color-border); }

/* ── Tippy ── */
.tippy-box[data-theme~='translucent'] { background-color: var(--color-surface-200); border: 1px solid var(--color-border); }
.tippy-box[data-theme~='translucent'] .tippy-arrow { color: var(--color-surface-200); }
.tippy-box[data-theme~='translucent'] .tippy-content { font-size: 0.75rem; padding: 0.3rem 0.5rem; }
.sched-tip { min-width: 180px; }
.sched-tip-title { font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.6875rem; margin-bottom: 0.375rem; padding-bottom: 0.25rem; border-bottom: 1px solid var(--color-border); }
.sched-tip-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.125rem 0; }
.sched-tip-key { color: var(--color-muted); font-size: 0.6875rem; white-space: nowrap; }
.sched-tip-val { color: var(--color-text-bright); font-family: 'JetBrains Mono', monospace; font-size: 0.6875rem; font-weight: 500; white-space: nowrap; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-border-light); }

/* ── Animations — only where meaningful ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeIn 0.15s ease-out; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

/* ── Landing Skyline Animations ── */
@keyframes fireFlicker {
  0%, 100% { opacity: 0.3; }
  25% { opacity: 0.5; }
  50% { opacity: 0.2; }
  75% { opacity: 0.45; }
}
@keyframes emberFloat {
  0% { transform: translateY(0) scale(1); opacity: 0.6; }
  50% { opacity: 0.9; }
  100% { transform: translateY(-80px) scale(0.3); opacity: 0; }
}
@keyframes zombieSway {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}
@keyframes smokeDrift {
  0% { transform: translateY(0) scaleY(1); opacity: 0.15; }
  50% { transform: translateY(-8px) scaleY(1.05); opacity: 0.1; }
  100% { transform: translateY(0) scaleY(1); opacity: 0.15; }
}
.fire-glow { animation: fireFlicker 3s ease-in-out infinite; }
.fire-glow-slow { animation: fireFlicker 5s ease-in-out infinite; animation-delay: -1.5s; }
.ember { animation: emberFloat 4s ease-out infinite; transform-origin: center bottom; }
.zombie-sway { animation: zombieSway 6s ease-in-out infinite; transform-origin: bottom center; }
.smoke-drift { animation: smokeDrift 8s ease-in-out infinite; }

/* ── Activity event groups ── */
.feed-group { border-left: 2px solid var(--color-blood); padding-left: 6px; }
.feed-group:hover { background: rgba(139,58,58,0.08); }
.feed-group-open { border-left-color: var(--color-rust); }
.feed-group-detail { padding-left: 24px; opacity: 0.8; font-size: 0.8125rem; border-left: 1px dashed rgba(139,58,58,0.3); margin-left: 8px; }

/* ── Activity category pills ── */
.activity-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.65rem; border-radius: 9999px; font-size: 0.6875rem; font-weight: 500;
  background: rgba(255,255,255,0.03); color: var(--color-muted); border: 1px solid var(--color-border);
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.activity-pill:hover { color: var(--color-text); background: rgba(255,255,255,0.06); border-color: var(--color-border-light); }
.activity-pill.active { color: var(--color-text-bright); background: rgba(212,145,92,0.12); border-color: rgba(212,145,92,0.35); }
.activity-pill i, .activity-pill svg { width: 12px; height: 12px; opacity: 0.6; }
.activity-pill.active i, .activity-pill.active svg { opacity: 1; }
.activity-pill .pill-count { font-size: 0.5625rem; color: var(--color-text-dim); margin-left: 0.125rem; font-family: 'JetBrains Mono', monospace; }
.activity-pill.active .pill-count { color: var(--color-accent); }

/* ── Fingerprint tracker ── */
#fingerprint-tracker .fp-movement-row {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem;
  font-size: 0.6875rem; border-radius: 4px; transition: background 0.15s;
}
#fingerprint-tracker .fp-movement-row:hover { background: rgba(255,255,255,0.03); }
#fingerprint-tracker .fp-movement-row .fp-time { color: #7a7067; font-family: 'JetBrains Mono', monospace; font-size: 0.625rem; flex-shrink: 0; min-width: 120px; }
#fingerprint-tracker .fp-movement-row .fp-arrow { color: var(--color-text-dim); font-size: 0.75rem; flex-shrink: 0; }
#fingerprint-tracker .fp-movement-row .fp-loc { color: var(--color-text); }
#fingerprint-tracker .fp-movement-row .fp-loc-type { color: #7a7067; font-size: 0.5625rem; text-transform: uppercase; letter-spacing: 0.04em; }
#fingerprint-tracker .fp-movement-row .fp-player { color: var(--color-accent); cursor: pointer; }
#fingerprint-tracker .fp-movement-row .fp-player:hover { text-decoration: underline; }
.fp-info-badge { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 6px; padding: 0.35rem 0.5rem; }
.fp-info-badge .fp-info-label { font-size: 0.5625rem; color: #7a7067; text-transform: uppercase; letter-spacing: 0.04em; }
.fp-info-badge .fp-info-value { font-size: 0.8125rem; color: var(--color-text-bright); margin-top: 1px; }
.fp-custody-arrow { color: var(--color-border-light); font-size: 0.75rem; }
.fp-custody-player { color: var(--color-accent); cursor: pointer; font-size: 0.6875rem; }
.fp-custody-player:hover { text-decoration: underline; }
.fp-custody-time { color: var(--color-text-dim); font-size: 0.5rem; font-family: 'JetBrains Mono', monospace; }

/* ── Chat timestamp separators ── */
.chat-time-sep { text-align: center; padding: 6px 0 2px; }
.chat-time-sep span { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-muted); background: var(--color-surface-200); padding: 1px 10px; border-radius: 3px; }
.chat-time-inline { font-size: 0.625rem; color: var(--color-muted); margin-right: 6px; flex-shrink: 0; min-width: 32px; }

/* ── Chat admin styling ── */
.chat-author.chat-admin { color: var(--color-surge); font-weight: 700; }
.chat-text.chat-admin { color: var(--color-surge); }

/* ── Entity link styling ── */
.entity-link { cursor: pointer; text-decoration: underline dotted rgba(196,90,74,0.4); text-underline-offset: 2px; transition: color 0.15s; }
.entity-link:hover { color: var(--color-accent); text-decoration-color: var(--color-accent); }

/* ── Player cards grid ── */
.player-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.player-card { background: var(--color-surface-200); border: 1px solid rgba(139,58,58,0.15); border-radius: 6px; padding: 14px; cursor: pointer; transition: border-color 0.15s, transform 0.1s; }
.player-card:hover { border-color: rgba(139,58,58,0.4); transform: translateY(-1px); }
.player-card.is-online { border-color: rgba(109,186,130,0.35); }
.pc-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; overflow: hidden; }
.pc-name { font-weight: 600; color: var(--color-text); font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-clan { color: var(--color-accent); font-size: 0.75rem; font-weight: 400; flex-shrink: 0; }
.pc-profession { font-size: 0.75rem; color: var(--color-muted); margin-bottom: 8px; }
.pc-health { position: relative; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; margin-bottom: 10px; overflow: hidden; }
.pc-health-bar { position: absolute; top: 0; left: 0; height: 100%; border-radius: 3px; transition: width 0.3s; }
.pc-health-label { position: absolute; right: 0; top: -14px; font-size: 0.625rem; color: var(--color-muted); }
.pc-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; text-align: center; }
.pc-stat-val { display: block; font-size: 0.875rem; font-weight: 600; color: var(--color-text); }
.pc-stat-lbl { display: block; font-size: 0.625rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Multi-Server Bar ── */
.server-carousel { display: flex; align-items: center; justify-content: center; gap: 0; padding: 0.4rem 0.75rem; background: var(--color-surface-300); border-bottom: 1px solid var(--color-border); flex-shrink: 0; }
.srv-carousel-btn { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 0.375rem; background: transparent; border: 1px solid transparent; color: var(--color-text-dim); cursor: pointer; transition: all 0.15s; flex-shrink: 0; }
.srv-carousel-btn:hover { color: var(--color-text-bright); background: rgba(255,255,255,0.05); border-color: var(--color-border); }
.srv-carousel-info { display: flex; align-items: center; gap: 0.5rem; min-width: 0; padding: 0 0.5rem; }
.srv-carousel-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--color-text-dim); transition: background 0.2s; }
.srv-carousel-dot.online { background: var(--color-calm); }
.srv-carousel-dot.stale { background: var(--color-surge); }
.srv-carousel-name { font-size: 0.8125rem; font-weight: 600; color: var(--color-text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; transition: opacity 0.15s; }
.srv-carousel-count { font-size: 0.625rem; color: var(--color-text-dim); font-weight: 500; white-space: nowrap; flex-shrink: 0; }

/* ── Server Scope Switcher Dropdown ── */
.switcher-wrap { position: relative; display: flex; align-items: center; }
.switcher-btn {
  display: flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem;
  border-radius: 0.375rem; background: rgba(255,255,255,0.04); border: 1px solid var(--color-border);
  color: var(--color-text-bright); cursor: pointer; transition: all 0.15s; font-size: 0.8125rem;
  font-weight: 500; white-space: nowrap; max-width: 280px;
}
.switcher-btn:hover { background: rgba(255,255,255,0.08); border-color: var(--color-border-light); }
.switcher-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher-menu {
  position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  min-width: 200px; max-width: 320px; max-height: 320px; overflow-y: auto;
  background: var(--color-surface-200); border: 1px solid var(--color-border); border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5); z-index: 100; padding: 0.25rem;
}
.switcher-item {
  display: flex; align-items: center; gap: 0.5rem; width: 100%;
  padding: 0.375rem 0.625rem; border-radius: 0.375rem; border: none;
  background: transparent; color: var(--color-text); cursor: pointer;
  font-size: 0.75rem; text-align: left; transition: background 0.1s;
}
.switcher-item:hover { background: rgba(255,255,255,0.06); color: var(--color-text-bright); }
.switcher-item-active { background: rgba(212,145,92,0.1); color: var(--color-accent); }
.switcher-item-active:hover { background: rgba(212,145,92,0.15); }
.switcher-sep { height: 1px; background: var(--color-border); margin: 0.25rem 0.375rem; }
.switcher-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--color-text-dim); transition: background 0.2s; }
.switcher-dot-online { background: var(--color-calm); }
.switcher-dot-offline { background: var(--color-horde); }
.switcher-dot-starting { background: var(--color-surge); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .stat-card { padding: 0.625rem; }
  .stat-value { font-size: 0.9375rem; }
  #map-sidebar { display: none; }
  .server-carousel { padding: 0.35rem 0.5rem; }
}

/* ── Servers Tab — Fleet management ── */

/* Server cards */
.srv-card {
  background: var(--color-surface-200);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  transition: border-color 0.2s;
}
.srv-card:hover { border-color: #4a433c; }

/* Status dots */
.srv-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.srv-dot-online { background: #34d399; box-shadow: 0 0 6px rgba(52,211,153,0.4); }
.srv-dot-offline { background: #6b7280; }
.srv-dot-starting { background: #fbbf24; box-shadow: 0 0 6px rgba(251,191,36,0.3); animation: srv-pulse 1.5s ease-in-out infinite; }

@keyframes srv-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Action buttons */
.srv-action-btn {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.6875rem; font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 0.375rem;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  border: none; background: none;
}

/* Modal overlay */
.srv-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: srv-fade-in 0.15s ease;
}
.srv-modal {
  background: var(--color-surface-200);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}
.srv-wizard { max-width: 640px; }

@keyframes srv-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Wizard steps */
.srv-step {
  display: flex; align-items: center; gap: 0.375rem;
  flex-shrink: 0;
}
.srv-step-num {
  width: 1.375rem; height: 1.375rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.625rem; font-weight: 600;
  border: 1px solid var(--color-border);
  color: var(--color-text-dim); background: transparent;
  transition: all 0.2s;
}
.srv-step-label {
  font-size: 0.6875rem; color: var(--color-text-dim);
  transition: color 0.2s;
}
.srv-step-active .srv-step-num {
  background: rgba(212,145,92,0.15);
  border-color: var(--color-accent); color: var(--color-accent);
}
.srv-step-active .srv-step-label { color: var(--color-text-bright); }
.srv-step-done .srv-step-num {
  background: rgba(52,211,153,0.15);
  border-color: #34d399; color: #34d399;
}
.srv-step-done .srv-step-label { color: var(--color-muted); }
.srv-step-connector {
  flex: 1; height: 1px; min-width: 1rem;
  background: var(--color-border);
}
.srv-step-connector-done { background: #34d399; }

/* Responsive */
@media (max-width: 640px) {
  .srv-step-label { display: none; }
  .srv-wizard { max-width: 100%; }
}

/* ── Welcome File Editor ─────────────────────────────────── */
.welcome-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; min-height: 500px; }
.welcome-editor-pane { display: flex; flex-direction: column; gap: 0.5rem; }
.welcome-toolbar { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.375rem; background: var(--color-surface-200); border: 1px solid var(--color-border); border-radius: 0.375rem 0.375rem 0 0; }
.welcome-toolbar-group { display: flex; gap: 0.25rem; align-items: center; }
.welcome-toolbar-divider { width: 1px; height: 20px; background: var(--color-border-light); margin: 0 0.25rem; }
.welcome-tag-btn { font-size: 0.6875rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 0.25rem; border: 1px solid transparent; cursor: pointer; transition: all 0.15s; line-height: 1.4; }
.welcome-tag-btn:hover { filter: brightness(1.2); border-color: rgba(255,255,255,0.15); }
.welcome-tag-btn[data-tag='PR'] { color: #4fc45c; background: rgba(79,196,92,0.1); }
.welcome-tag-btn[data-tag='SP'] { color: #e08840; background: rgba(224,136,64,0.1); }
.welcome-tag-btn[data-tag='CL'] { color: #48b8a0; background: rgba(72,184,160,0.1); }
.welcome-tag-btn[data-tag='FO'] { color: #c8c0b8; background: rgba(200,192,184,0.08); }
.welcome-tag-btn[data-tag='PN'] { color: #d45050; background: rgba(212,80,80,0.1); }
.welcome-placeholder-btn { font-size: 0.625rem; padding: 0.15rem 0.4rem; border-radius: 0.25rem; background: var(--color-surface-50); border: 1px solid var(--color-border); color: var(--color-muted); cursor: pointer; font-family: var(--font-mono); transition: all 0.15s; }
.welcome-placeholder-btn:hover { color: var(--color-text); border-color: var(--color-accent); }
.welcome-textarea { width: 100%; flex: 1; min-height: 400px; resize: vertical; background: var(--color-surface-300); border: 1px solid var(--color-border); border-top: none; border-radius: 0 0 0.375rem 0.375rem; color: var(--color-text-bright); font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.6; padding: 0.75rem; outline: none; tab-size: 2; }
.welcome-textarea:focus { border-color: var(--color-accent); }
.welcome-preview-box { flex: 1; min-height: 400px; background: rgba(0,0,0,0.85); border: 1px solid var(--color-border); border-radius: 0.375rem; padding: 1.25rem 1.5rem; overflow-y: auto; font-size: 0.875rem; line-height: 1.7; color: #e8e4dc; font-family: 'Inter', sans-serif; position: relative; }
.welcome-preview-box::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(30,40,30,0.3) 0%, rgba(20,18,16,0.6) 100%); border-radius: inherit; pointer-events: none; }
.welcome-preview-box > * { position: relative; z-index: 1; }
.welcome-preview-line { min-height: 1.4em; }
.welcome-preview-line:empty::before { content: '\00a0'; }
.wc-pr { color: #4fc45c; }
.wc-sp { color: #e08840; }
.wc-cl { color: #48b8a0; }
.wc-fo { color: #c8c0b8; }
.wc-pn { color: #d45050; }
.welcome-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.5rem; }
@media (max-width: 768px) { .welcome-editor { grid-template-columns: 1fr; } }
