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

body { background: #12100e; color: #c8c2b8; }

/* ── 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: #c45a4a; cursor: pointer; transition: all 0.15s; z-index: 10;
}
.modal-close:hover { background: rgba(139,58,58,0.2); color: #e8e3db; }
.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: #5c574f; 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: #7a746c; cursor: pointer; transition: color 0.15s; }
.breadcrumb-item:hover { color: #d4915c; text-decoration: underline; }
.breadcrumb-item.current { color: #e8e3db; cursor: default; }
.breadcrumb-item.current:hover { color: #e8e3db; text-decoration: none; }
.breadcrumb-sep { color: #3d3630; font-size: 0.5rem; margin: 0 0.125rem; }
.breadcrumb-sep::after { content: '›'; }

/* ── Entity Clickable ── */
.entity-link { color: #d4915c; cursor: pointer; font-weight: 500; transition: color 0.15s; }
.entity-link:hover { text-decoration: underline; color: #e0a472; }

/* ── 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: #191614;
  border-right: 1px solid #302a25;
  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: #7a746c; 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: #c8c2b8; background: rgba(212,145,92,0.04); }
.nav-link.active { color: #e8e3db; border-left-color: #d4915c; background: rgba(212,145,92,0.06); font-weight: 500; }
.tier-hidden { display: none !important; }
.nav-sep { border-top: 1px solid #302a25; 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: #e8e3db;
  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: #e8e3db;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

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


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

/* ── Stat Chips (landing) ── */
.stat-chip { background: #191614; border: 1px solid #302a25; border-radius: 0.5rem; padding: 1rem 1.25rem; text-align: center; }
.stat-chip-label { display: block; font-size: 0.6875rem; color: #7a746c; 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: #e8e3db; line-height: 1.4; }

/* ── Landing Card Layout ── */
.landing-card {
  max-width: 760px;
  background: rgba(25,22,20,0.85);
  border: 1px solid #302a25;
  border-radius: 0.75rem;
  padding: 2rem 2rem 1.5rem;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (max-width: 480px) {
  .landing-card { padding: 1.25rem 1rem 1rem; }
}
.landing-header { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.375rem; }
.landing-title-row {
  display: flex; align-items: center; justify-content: center;
}
.landing-status-row {
  display: flex; justify-content: center;
}
.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 #302a25;
  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: #6dba82; }
.landing-status-dot.offline { background: #5c574f; }
/* (dead elements removed — connect bar, stats row, subtitle now live in server cards or footer) */

.landing-server-grid {
  display: grid; grid-template-columns: 1fr; gap: 0.625rem;
  margin: 0 auto; width: 100%;
}
/* Single server: centered, comfortable width */
.landing-server-grid:not(:has(.server-card:nth-child(2))) {
  max-width: 480px;
}
.landing-server-grid:not(:has(.server-card:nth-child(2))) .server-card {
  padding: 1.125rem 1.25rem;
}
/* 2 servers */
@media (min-width: 500px) {
  .landing-server-grid:has(.server-card:nth-child(2)) {
    grid-template-columns: 1fr 1fr;
  }
}
/* 3+ servers */
@media (min-width: 768px) {
  .landing-server-grid:has(.server-card:nth-child(3)) {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* 4+ servers */
@media (min-width: 1024px) {
  .landing-server-grid:has(.server-card:nth-child(4)) {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

.landing-auth-section { text-align: center; padding-top: 0.25rem; }
.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 {
  padding: 1rem 1.5rem 0.75rem;
  text-align: center;
  border-top: 1px solid rgba(48,42,37,0.3);
}
.landing-footer-main {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
}
.landing-footer-repo {
  display: inline-flex; align-items: center; gap: 0.375rem;
  color: #e8e3db; text-decoration: none; font-weight: 600;
  transition: color 0.15s;
}
.landing-footer-repo:hover { color: #d4915c; }
.landing-footer-repo svg { opacity: 0.7; }
.landing-footer-repo:hover svg { opacity: 1; }
.landing-footer-sep { color: #3d3630; }
.landing-footer-link {
  color: #7a746c; text-decoration: none; transition: color 0.15s;
}
.landing-footer-link:hover { color: #e8e3db; }
.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: #7a746c; }

/* ── Inputs ── */
.input-field {
  background: #12100e; border: 1px solid #302a25; border-radius: 0.375rem;
  color: #e8e3db; 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: #d4915c; }
.input-field::placeholder { color: #5c574f; }

/* ── Buttons ── */
.btn-primary {
  background: #d4915c; color: #141210; 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: #e0a472; }
.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: #6dba82; 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: #d4a843; 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: #c45a4a; 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: #d4915c; border-color: rgba(212,145,92,0.2); }
.power-backup:hover:not(:disabled) { background: rgba(212,145,92,0.15); }

.quick-cmd {
  background: #1f1c1a; border: 1px solid #302a25; color: #c8c2b8;
  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: #3d3630; color: #e8e3db; }

/* ── 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: #5c574f; 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: #c8c2b8; line-height: 1.4; }
.feed-txt strong { color: #e8e3db; font-weight: 500; }
.feed-txt .player-link { color: #d4915c; cursor: pointer; font-weight: 500; }
.feed-txt .player-link:hover { text-decoration: underline; }
.feed-empty { color: #5c574f; 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: #d4915c; font-weight: 500; white-space: nowrap; cursor: pointer; }
.chat-author:hover { text-decoration: underline; }
.chat-author.outbound { color: #6dba82; }
.chat-author.system { color: #d4a843; }
.chat-text { color: #c8c2b8; word-break: break-word; }

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

/* ── Resource Bars ── */
.res-bar-track { height: 4px; background: #1f1c1a; border-radius: 2px; overflow: hidden; }
.res-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.res-bar-fill.cpu { background: #5b8fd4; }
.res-bar-fill.mem { background: #9b72cf; }
.res-bar-fill.disk { background: #d4a843; }

/* ── 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: #7a746c; font-weight: 500; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid #302a25; position: sticky; top: 0; background: #12100e; cursor: pointer; user-select: none; white-space: nowrap; }
.player-table th:hover { color: #c8c2b8; }
.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: #6dba82; }
.status-dot.offline { background: #5c574f; }
.status-dot.inactive { background: #3d3630; }

/* ── Vitals ── */
.vital-row { display: flex; align-items: center; gap: 0.5rem; }
.vital-label { font-size: 0.6875rem; color: #7a746c; min-width: 3.5rem; }
.vital-track { flex: 1; height: 5px; background: #1f1c1a; border-radius: 2px; overflow: hidden; }
.vital-fill { height: 100%; border-radius: 2px; transition: width 0.3s; }
.vital-val { font-size: 0.625rem; color: #c8c2b8; 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: #12100e; border: 1px solid #302a25; border-radius: 3px; padding: 0.25rem 0.4rem; font-size: 0.625rem; color: #c8c2b8; 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: #3d3630; }
.inv-slot.empty { opacity: 0.3; }
.inv-slot.inv-clickable { cursor: pointer; }
.inv-slot.inv-clickable:hover { border-color: #d4915c; background: rgba(212,145,92,0.04); }
.inv-slot .inv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-slot .inv-qty { color: #5c574f; font-family: 'JetBrains Mono', monospace; flex-shrink: 0; margin-left: 0.25rem; }
.inv-dur-track { height: 2px; background: #1f1c1a; border-radius: 1px; overflow: hidden; margin-top: 2px; }
.inv-dur-fill { height: 100%; border-radius: 1px; }

/* ── Item Popup ── */
.item-popup { background: #191614; border: 1px solid #302a25; border-radius: 0.5rem; box-shadow: 0 8px 24px rgba(0,0,0,0.5); width: 240px; overflow: hidden; }
.item-popup-header { background: #1f1c1a; padding: 0.5rem 0.75rem; font-size: 0.8125rem; font-weight: 600; color: #e8e3db; border-bottom: 1px solid #302a25; 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: #7a746c; border-radius: 0.375rem; cursor: pointer; transition: all 0.15s; background: transparent; border: none; white-space: nowrap; }
.settings-mode-btn:hover { color: #c8c2b8; }
.settings-mode-btn.active { background: rgba(212,145,92,0.12); color: #d4915c; }
.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: #e8e3db; }
.cat-arrow { font-size: 0.625rem; color: #5c574f; transition: transform 0.15s; }
.cat-arrow.open { transform: rotate(90deg); }
.cat-label { font-size: 0.75rem; font-weight: 600; color: #c8c2b8; text-transform: uppercase; letter-spacing: 0.04em; }
.cat-count { font-size: 0.625rem; color: #5c574f; }
.settings-category-items { display: none; }
.settings-category-items.open { display: block; }
.setting-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 0.5rem; border-radius: 0.25rem; }
.setting-row:hover { background: rgba(255,255,255,0.015); }
.setting-name { font-size: 0.8125rem; font-weight: 500; color: #c8c2b8; min-width: 200px; }
.setting-desc { font-size: 0.6875rem; color: #5c574f; flex: 1; }
.setting-input { background: #12100e; border: 1px solid #302a25; border-radius: 4px; color: #e8e3db; padding: 0.3rem 0.5rem; font-size: 0.8125rem; width: 120px; outline: none; text-align: right; font-family: 'JetBrains Mono', monospace; }
.setting-input:focus { border-color: #d4915c; }
.setting-input.changed { border-color: #d4a843; 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: #302a25; 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: #7a746c; border-radius: 50%; transition: all 0.2s; }
.setting-toggle input:checked + .toggle-track + .toggle-thumb { left: 18px; background: #6dba82; }
.setting-sensitive-badge { font-size: 0.5625rem; color: #c45a4a; 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: #5c574f; }
.setting-env-key { font-family: 'JetBrains Mono', monospace; font-size: 0.625rem; color: #5c574f; 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: #c8c2b8; flex: 1; min-width: 0; }
.diff-key-raw { font-size: 0.6875rem; color: #5c574f; 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: #c45a4a; 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: #5c574f; font-size: 0.75rem; }
.diff-new { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: #6dba82; background: rgba(109,186,130,0.08); padding: 0.15rem 0.4rem; border-radius: 3px; font-weight: 500; }

/* ── Server Cards ── */
.server-card { background: #191614; border: 1px solid #302a25; border-radius: 0.75rem; padding: 0.875rem 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.server-card-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.125rem; }
.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: #e8e3db; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.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: #7a746c; }
.server-card-world { font-size: 0.6875rem; color: #7a746c; }
.server-card-addr { font-family: 'JetBrains Mono', monospace; font-size: 0.625rem; color: #5c574f; letter-spacing: 0.02em; }
.server-card-schedule { margin-top: 0.5rem; 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; }

/* ── 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: #5c574f; font-size: 0.75rem; min-width: 7ch; }
.sched-name { font-weight: 600; font-size: 0.8125rem; }
.sched-name.calm { color: #6dba82; }
.sched-name.surge { color: #d4a843; }
.sched-name.horde { color: #c45a4a; }
.sched-marker { color: #d4915c; font-size: 0.6875rem; margin-left: auto; font-weight: 500; }
.sched-hint { font-size: 0.625rem; color: #5c574f; margin-left: auto; }
.sched-slot.tomorrow { opacity: 0.45; }

/* ── 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: #7a746c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-player-entry .mp-name.online { color: #e8e3db; }

/* ── 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: #7a746c; font-weight: 500; font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid #302a25; background: #12100e; position: sticky; top: 0; }
.db-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid rgba(46,42,38,0.4); color: #c8c2b8; 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: #191614; border: 1px solid #302a25; color: #c8c2b8; 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: #262220; border-color: #3d3630; color: #e8e3db; }
.tl-speed { background: #191614; border: 1px solid #302a25; color: #7a746c; padding: 2px 7px; font-size: 0.625rem; border-radius: 3px; cursor: pointer; transition: all 0.15s; font-weight: 500; }
.tl-speed:hover { color: #c8c2b8; border-color: #3d3630; }
.tl-speed.active { background: #d4915c; border-color: #d4915c; color: #141210; }
.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: #d4915c; cursor: pointer; }
.tl-popup { font-size: 0.75rem; line-height: 1.5; }
.tl-popup b { color: #d4915c; }
.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: #3d3630; 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: #191614 !important; color: #c8c2b8 !important; border-color: #302a25 !important; }
.leaflet-control-zoom a:hover { background: #262220 !important; color: #e8e3db !important; }
.leaflet-popup-content-wrapper { background: #191614; color: #e8e3db; border-radius: 0.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.leaflet-popup-tip { background: #191614; }
.leaflet-popup-content { margin: 0.625rem 0.875rem; font-size: 0.8125rem; line-height: 1.5; }
.leaflet-tooltip-dark { background: #191614; color: #e8e3db; border: 1px solid #302a25; 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: #302a25; }

/* ── Tippy ── */
.tippy-box[data-theme~='translucent'] { background-color: #191614; border: 1px solid #302a25; }
.tippy-box[data-theme~='translucent'] .tippy-arrow { color: #191614; }
.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 #302a25; }
.sched-tip-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.125rem 0; }
.sched-tip-key { color: #7a746c; font-size: 0.6875rem; white-space: nowrap; }
.sched-tip-val { color: #e8e3db; 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: #302a25; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3d3630; }

/* ── 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, #8b3a3a); padding-left: 6px; }
.feed-group:hover { background: rgba(139,58,58,0.08); }
.feed-group-open { border-left-color: var(--color-rust, #9c6844); }
.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: #7a746c; border: 1px solid #302a25;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.activity-pill:hover { color: #c8c2b8; background: rgba(255,255,255,0.06); border-color: #3d3630; }
.activity-pill.active { color: #e8e3db; 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: #5c574f; margin-left: 0.125rem; font-family: 'JetBrains Mono', monospace; }
.activity-pill.active .pill-count { color: #d4915c; }

/* ── 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: #5c574f; font-size: 0.75rem; flex-shrink: 0; }
#fingerprint-tracker .fp-movement-row .fp-loc { color: #c8c2b8; }
#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: #d4915c; 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: #e8e3db; margin-top: 1px; }
.fp-custody-arrow { color: #3d3630; font-size: 0.75rem; }
.fp-custody-player { color: #d4915c; cursor: pointer; font-size: 0.6875rem; }
.fp-custody-player:hover { text-decoration: underline; }
.fp-custody-time { color: #5c574f; 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, #7a7067); background: var(--color-surface-200, #2a2622); padding: 1px 10px; border-radius: 3px; }
.chat-time-inline { font-size: 0.625rem; color: var(--color-muted, #7a7067); margin-right: 6px; flex-shrink: 0; min-width: 32px; }

/* ── Chat admin styling ── */
.chat-author.chat-admin { color: #d4a843; font-weight: 700; }
.chat-text.chat-admin { color: #d4a843; }

/* ── 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, #c45a4a); text-decoration-color: var(--color-accent, #c45a4a); }

/* ── 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, #2a2622); 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, #e8e0d8); font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-clan { color: var(--color-accent, #c45a4a); font-size: 0.75rem; font-weight: 400; flex-shrink: 0; }
.pc-profession { font-size: 0.75rem; color: var(--color-muted, #7a7067); 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, #7a7067); }
.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, #e8e0d8); }
.pc-stat-lbl { display: block; font-size: 0.625rem; color: var(--color-muted, #7a7067); text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Multi-Server Bar ── */
.server-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; background: #12100e; border-bottom: 1px solid #302a25; flex-shrink: 0; }
.server-bar-label { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.06em; color: #5c574f; font-weight: 600; margin-right: 0.25rem; white-space: nowrap; }
.server-pill { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.3rem 0.65rem; border-radius: 9999px; font-size: 0.6875rem; font-weight: 500; background: rgba(255,255,255,0.03); color: #7a746c; border: 1px solid #302a25; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.server-pill:hover { color: #c8c2b8; background: rgba(255,255,255,0.06); border-color: #3d3630; }
.server-pill.active { color: #e8e3db; background: rgba(212,145,92,0.12); border-color: rgba(212,145,92,0.35); }
.server-pill-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: #5c574f; }
.server-pill-dot.online { background: #6dba82; }
.server-pill-dot.stale { background: #d4a843; }

/* ── Dashboard Server Boxes ── */
.srv-box { background: #191614; border: 1px solid #302a25; border-radius: 0.75rem; overflow: hidden; transition: border-color 0.15s; align-self: start; }
.srv-box:hover { border-color: #3d3630; }
.srv-box-header { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; cursor: pointer; user-select: none; transition: background 0.15s; }
.srv-box-header:hover { background: rgba(255,255,255,0.02); }
.srv-box-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; flex-shrink: 0; }
.srv-box-name { font-size: 0.8125rem; font-weight: 600; color: #e8e3db; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.srv-box-status { font-size: 0.6875rem; font-weight: 500; flex-shrink: 0; }
.srv-box-meta { display: flex; align-items: center; gap: 0.75rem; font-size: 0.6875rem; color: #7a746c; flex-shrink: 0; }
.srv-box-toggle { color: #5c574f; transition: transform 0.2s, color 0.15s; flex-shrink: 0; }
.srv-box-header:hover .srv-box-toggle { color: #c8c2b8; }
.srv-box-toggle.collapsed { transform: rotate(-90deg); }
.srv-box-body { border-top: 1px solid rgba(48,42,37,0.5); }
.srv-box-body.collapsed { display: none; }
.srv-box-body .srv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 0.5rem; padding: 0.75rem 1rem; }
.srv-box-body .srv-stat { text-align: center; }
.srv-box-body .srv-stat-label { font-size: 0.5625rem; color: #5c574f; text-transform: uppercase; letter-spacing: 0.04em; }
.srv-box-body .srv-stat-value { font-size: 0.9375rem; font-weight: 600; color: #e8e3db; }
.srv-box-body .srv-section { padding: 0.75rem 1rem; border-top: 1px solid rgba(48,42,37,0.3); }
.srv-box-body .srv-section-title { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.05em; color: #5c574f; font-weight: 600; margin-bottom: 0.5rem; }
.srv-box-body .srv-feeds { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 0.75rem 1rem; border-top: 1px solid rgba(48,42,37,0.3); }
.srv-box-body .srv-feed { min-height: 0; }
.srv-box-body .srv-feed-title { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.05em; color: #5c574f; font-weight: 600; margin-bottom: 0.375rem; }
.srv-box-body .srv-feed-content { max-height: 180px; overflow-y: auto; }

/* Dashboard grid adapts to multi-server — side-by-side when space allows */
.dash-multi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (max-width: 1024px) {
  .dash-multi-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .srv-box-body .srv-feeds { grid-template-columns: 1fr; }
  .srv-box-body .srv-stats { grid-template-columns: repeat(2, 1fr); }
}

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

