/* ============================================
   SQXIBZ — portal.css
   Ban appeals + ticket chat + staff panel
   (extends style.css)
   ============================================ */

/* ── AURORA BACKDROP (shared) ── */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
/* soft radial gradients only — no blur filter, stays cheap on weak GPUs */
.aurora::before, .aurora::after {
  content: '';
  position: absolute;
  width: 70vmax; height: 70vmax;
  border-radius: 50%;
  opacity: 0.16;
  will-change: transform;
  animation: auroraDrift 26s ease-in-out infinite alternate;
}
.aurora::before {
  background: radial-gradient(circle, rgba(224,0,15,0.8) 0%, rgba(224,0,15,0.25) 30%, transparent 65%);
  top: -30vmax; left: -20vmax;
}
.aurora::after {
  background: radial-gradient(circle, rgba(122,0,26,0.9) 0%, rgba(122,0,26,0.3) 30%, transparent 65%);
  bottom: -35vmax; right: -25vmax;
  animation-delay: -13s;
}
@keyframes auroraDrift {
  from { transform: translate(0, 0); }
  to   { transform: translate(7vmax, 5vmax); }
}
@media (prefers-reduced-motion: reduce) {
  .aurora::before, .aurora::after { animation: none; }
}

/* ── PORTAL LAYOUT ── */
.portal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 28px 110px;
  position: relative;
  z-index: 2;
}
.portal-wrap.wide { max-width: 1180px; }

.portal-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}
.portal-eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--red);
}
.portal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(44px, 7vw, 68px);
  letter-spacing: 4px;
  line-height: 1;
  margin-bottom: 14px;
  background: linear-gradient(100deg, #fff 30%, #ff8a94 50%, #fff 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.portal-sub {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 34px;
}
.portal-sub strong { color: var(--text); font-weight: 500; }

/* ── GLOW PANEL ── */
.glow-panel {
  position: relative;
  background: rgba(15, 15, 15, 0.82);
  border: 1px solid var(--border);
  padding: 36px 34px;
  backdrop-filter: blur(8px);
}
.glow-panel::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  background: linear-gradient(130deg, rgba(224,0,15,0.55), transparent 30%, transparent 70%, rgba(224,0,15,0.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glow-panel + .glow-panel { margin-top: 20px; }

/* ── FILE DROP ── */
.file-drop {
  border: 1px dashed var(--border-red);
  background: var(--bg);
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.file-drop:hover, .file-drop.dragover {
  border-color: var(--red);
  background: var(--red-dim);
}
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-drop .fd-icon { font-size: 26px; color: var(--red); display: block; margin-bottom: 8px; }
.file-drop .fd-text {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.file-drop .fd-hint {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: #4a4a55;
  margin-top: 6px;
  text-transform: none;
  letter-spacing: 0;
}
.file-drop.has-file { border-style: solid; border-color: var(--red); }
.file-drop.has-file .fd-text { color: var(--red2); }
.fd-preview {
  max-height: 160px;
  max-width: 100%;
  margin: 12px auto 0;
  display: none;
  border: 1px solid var(--border-red);
}
.file-drop.has-file .fd-preview { display: block; }

/* ── TICKET CODE REVEAL ── */
.ticket-reveal { text-align: center; padding: 20px 6px; }
.ticket-reveal .tr-icon { font-size: 40px; color: var(--red); margin-bottom: 14px; display: block; }
.ticket-code-box {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 30px;
  letter-spacing: 6px;
  color: #fff;
  border: 1px solid var(--border-red);
  background: var(--red-dim);
  padding: 14px 26px;
  margin: 14px 0 6px;
  text-shadow: 0 0 18px var(--red-glow);
}
.ticket-warn {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 300;
  color: var(--muted);
  max-width: 480px;
  margin: 14px auto 22px;
  line-height: 1.7;
}
.ticket-warn strong { color: #ffb3ba; font-weight: 500; }

/* ── STATUS BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid;
  white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.st-open          { color: #ffb020; border-color: rgba(255,176,32,0.4); background: rgba(255,176,32,0.08); }
.badge.st-under_review  { color: #38bdf8; border-color: rgba(56,189,248,0.4); background: rgba(56,189,248,0.08); }
.badge.st-accepted      { color: #4ade80; border-color: rgba(74,222,128,0.4); background: rgba(74,222,128,0.08); }
.badge.st-denied        { color: #f43f5e; border-color: rgba(244,63,94,0.4); background: rgba(244,63,94,0.08); }
.badge.st-pending       { color: #ffb020; border-color: rgba(255,176,32,0.4); background: rgba(255,176,32,0.08); }
.badge.st-shortlisted   { color: #38bdf8; border-color: rgba(56,189,248,0.4); background: rgba(56,189,248,0.08); }

/* ── CHAT ── */
.chat-box {
  display: flex;
  flex-direction: column;
  height: 440px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--red-dim) transparent;
}
.chat-msg { max-width: 78%; animation: fadeUp 0.25s ease; }
.chat-msg .cm-meta {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
  display: flex;
  gap: 8px;
}
.chat-msg .cm-body {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.6;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg.from-user { align-self: flex-end; text-align: right; }
.chat-msg.from-user .cm-meta { justify-content: flex-end; }
.chat-msg.from-user .cm-body {
  background: rgba(224,0,15,0.12);
  border-color: var(--border-red);
}
.chat-msg.from-staff .cm-meta .cm-author { color: var(--red2); }
.chat-msg.from-staff .cm-body { border-left: 2px solid var(--red); }
.chat-msg.from-system { align-self: center; max-width: 92%; text-align: center; }
.chat-msg.from-system .cm-body {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 11.5px;
}

.chat-input-row {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1;
  background: var(--bg2);
  border: none;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  padding: 15px 16px;
  resize: none;
  max-height: 120px;
}
.chat-input:focus { outline: none; background: #141414; }
.chat-send {
  background: var(--red);
  border: none;
  color: #fff;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0 26px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.chat-send:hover { background: var(--red2); box-shadow: 0 0 22px var(--red-glow); }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.chat-closed-note {
  border-top: 1px solid var(--border);
  padding: 14px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

/* live connection pill */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.live-pill::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #666;
}
.live-pill.on { color: #4ade80; }
.live-pill.on::before { background: #4ade80; animation: pulse 2s infinite; }

/* ── TICKET META GRID ── */
.tmeta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.tmeta {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 12px 14px;
}
.tmeta .tm-k {
  font-size: 8.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.tmeta .tm-v {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}

/* ══════════════════════════════════════════
   STAFF PANEL
   ══════════════════════════════════════════ */

/* login */
.login-card {
  max-width: 400px;
  margin: 10vh auto 0;
}
.login-card .portal-title { font-size: 44px; }
.login-lock {
  width: 54px; height: 54px;
  margin: 0 auto 18px;
  border: 1px solid var(--border-red);
  background: var(--red-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--red);
  box-shadow: 0 0 34px rgba(224,0,15,0.18);
}
.login-err {
  display: none;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #f43f5e;
  border: 1px solid rgba(244,63,94,0.35);
  background: rgba(244,63,94,0.07);
  padding: 10px 14px;
  margin-bottom: 16px;
}
.login-err.show { display: block; animation: fadeUp 0.3s ease; }

/* panel shell */
.panel-shell { display: none; }
.panel-shell.active { display: block; }

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.panel-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.panel-user b { color: var(--red2); }

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.stile {
  border: 1px solid var(--border);
  background: var(--bg2);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.stile::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--red), transparent);
}
.stile .sv {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 34px;
  color: #fff;
  line-height: 1;
}
.stile .sk {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* tabs */
.panel-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.ptab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 18px;
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}
.ptab:hover { color: var(--text); }
.ptab.active { color: var(--red2); border-bottom-color: var(--red); }
.ptab .count {
  display: inline-block;
  min-width: 18px;
  padding: 1px 5px;
  margin-left: 6px;
  font-size: 9px;
  background: var(--red);
  color: #fff;
  border-radius: 9px;
}
.ptab .count:empty, .ptab .count[data-n="0"] { display: none; }

/* filter row */
.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.fbtn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.fbtn:hover { color: var(--text); border-color: var(--muted); }
.fbtn.active { color: var(--red2); border-color: var(--border-red); background: var(--red-dim); }

/* list rows */
.row-list { display: flex; flex-direction: column; gap: 10px; }
.prow {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: var(--bg2);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  animation: fadeUp 0.3s ease;
}
.prow:hover {
  border-color: var(--border-red);
  transform: translateX(4px);
  box-shadow: -4px 0 0 var(--red);
}
.prow .pr-code {
  font-size: 12px;
  color: var(--red2);
  letter-spacing: 1px;
  min-width: 96px;
}
.prow .pr-main { flex: 1; min-width: 0; }
.prow .pr-name {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prow .pr-sub {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 300;
  color: var(--muted);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prow .pr-time {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  white-space: nowrap;
}
.empty-note {
  text-align: center;
  padding: 44px 20px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px dashed var(--border);
}

/* detail view */
.detail-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.back-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.back-btn:hover { color: var(--text); border-color: var(--muted); }

.action-row { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.abtn {
  border: 1px solid;
  background: transparent;
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 15px;
  cursor: pointer;
  transition: all 0.15s;
}
.abtn:disabled { opacity: 0.4; cursor: not-allowed; }
.abtn.review { color: #38bdf8; border-color: rgba(56,189,248,0.4); }
.abtn.review:hover { background: rgba(56,189,248,0.12); }
.abtn.accept { color: #4ade80; border-color: rgba(74,222,128,0.4); }
.abtn.accept:hover { background: rgba(74,222,128,0.12); }
.abtn.deny { color: #f43f5e; border-color: rgba(244,63,94,0.4); }
.abtn.deny:hover { background: rgba(244,63,94,0.12); }
.abtn.reopen { color: #ffb020; border-color: rgba(255,176,32,0.4); }
.abtn.reopen:hover { background: rgba(255,176,32,0.12); }

.appeal-chat-head { display: flex; justify-content: space-between; gap: 12px; }
.appeal-claim-state { color: var(--muted); font-size: 9px; text-align: right; }
.appeal-claim-state.mine { color: #4ade80; }
.appeal-claim-state.locked { color: #f43f5e; }

.detail-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) { .detail-cols { grid-template-columns: 1fr; } }

.evidence-wrap { margin-top: 16px; }
.evidence-wrap img {
  max-width: 100%;
  border: 1px solid var(--border-red);
  cursor: zoom-in;
}
.reason-block {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.7;
  color: #ccc;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
}

/* application answers */
.qa-list { display: flex; flex-direction: column; gap: 12px; }
.qa {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 13px 15px;
}
.qa .qa-q {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}
.qa .qa-a {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* audit table */
.audit-list { font-size: 11.5px; }
.audit-row {
  display: grid;
  grid-template-columns: 150px 110px 1fr 110px;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
}
.audit-row b { color: var(--red2); font-family: 'Space Mono', monospace; font-weight: 400; }
@media (max-width: 720px) { .audit-row { grid-template-columns: 1fr 1fr; } }

/* image lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 10005;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 30px;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border: 1px solid var(--border-red); }

/* generic */
.mt-20 { margin-top: 20px; }
.hidden { display: none !important; }

@media (max-width: 560px) {
  .glow-panel { padding: 26px 20px; }
  .chat-msg { max-width: 92%; }
  .prow { flex-wrap: wrap; gap: 8px; }
  .prow .pr-time { width: 100%; }
}

/* ── SERVER TAB (Minecraft bridge) ── */
.mc-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.mc-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.mc-status-head .live-pill { font-size: 11px; }
.mc-updated { font-size: 10px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.mc-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 12px;
}
.mc-metric { text-align: center; }
.mc-metric .mm-v {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px;
  line-height: 1;
  color: var(--red2);
}
.mc-metric .mm-k {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.mc-version { margin-top: 16px; font-size: 11px; color: var(--muted); text-align: center; }

.mc-cmd-form { display: flex; flex-direction: column; gap: 10px; }
.mc-cmd-row { display: flex; gap: 8px; }
.mc-cmd-row .mc-action { flex: 0 0 130px; }
.mc-cmd-row .mc-target { flex: 1; }
.mc-cmd-row .mc-duration { flex: 0 0 100px; }

.mc-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mc-players { display: flex; flex-wrap: wrap; gap: 8px; }
.mc-pchip {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--red2);
  background: var(--red-dim);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 6px;
  padding: 6px 11px;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.mc-pchip:hover { border-color: var(--red); transform: translateY(-1px); }

.mc-cmd-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.mc-cmd-row-item {
  border: 1px solid rgba(255, 255, 255, .08);
  border-left: 3px solid #666;
  border-radius: 6px;
  padding: 9px 12px;
}
.mc-cmd-row-item.st-cmd-pending, .mc-cmd-row-item.st-cmd-sent { border-left-color: #d6a327; }
.mc-cmd-row-item.st-cmd-done { border-left-color: #4ade80; }
.mc-cmd-row-item.st-cmd-failed { border-left-color: var(--red); }
.mc-cmd-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mc-cmd-head b { font-size: 13px; color: #fff; }
.mc-cmd-status { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.mc-cmd-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }

@media (max-width: 760px) {
  .mc-status-grid, .mc-lists { grid-template-columns: 1fr; }
}

/* Server sub-navigation */
.mc-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  padding-bottom: 12px;
}
.mc-subtab {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  padding: 7px 14px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.mc-subtab:hover { color: var(--red2); border-color: var(--red); }
.mc-subtab.active { color: #fff; background: var(--red-dim); border-color: var(--red); }

/* Bans & mutes list */
.mc-punish-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.mc-punish-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  padding: 9px 12px;
}
.mc-punish-info { flex: 1; min-width: 0; }
.mc-punish-name {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--red2);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.mc-punish-name:hover { text-decoration: underline; }
.mc-punish-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mc-punish-row .abtn { flex: 0 0 auto; }

/* Whitelist chips */
.mc-wl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red-dim);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 6px;
  padding: 5px 6px 5px 11px;
}
.mc-wl-name {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--red2);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.mc-wl-name:hover { text-decoration: underline; }
.mc-wl-x {
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
  border: none;
  border-radius: 4px;
  width: 18px; height: 18px;
  cursor: pointer;
}
.mc-wl-x:hover { color: #fff; background: var(--red); }

/* Chat relay */
.mc-chat-scroll { min-height: 320px; max-height: 420px; }
.mc-chat-line { font-size: 13px; padding: 3px 0; line-height: 1.5; }
.mc-chat-time { color: var(--muted); font-size: 10px; margin-right: 8px; font-family: 'Space Mono', monospace; }
.mc-chat-name { color: var(--red2); font-weight: 500; margin-right: 6px; }
.mc-chat-name::after { content: ':'; color: var(--muted); }
.mc-chat-msg { color: #e8e8e8; }
.mc-chat-event .mc-chat-event, .mc-chat-line.mc-chat-join .mc-chat-event { color: #4ade80; font-style: italic; }
.mc-chat-line.mc-chat-leave .mc-chat-event { color: #d98a8a; font-style: italic; }
.mc-chat-event { color: var(--muted); font-style: italic; }

/* Console + log tail */
.mc-log {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  line-height: 1.55;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  padding: 12px 14px;
  height: 360px;
  overflow-y: auto;
}
.mc-log-line { display: flex; gap: 8px; white-space: pre-wrap; word-break: break-word; }
.mc-log-lvl { flex: 0 0 auto; color: var(--muted); }
.mc-log-line.lvl-WARN .mc-log-lvl { color: #d6a327; }
.mc-log-line.lvl-ERROR .mc-log-lvl, .mc-log-line.lvl-FATAL .mc-log-lvl { color: var(--red); }
.mc-log-msg { color: #d8d8d8; }
.mc-console-off { color: var(--muted); font-size: 10px; letter-spacing: 0; text-transform: none; }
.mc-console-input { font-family: 'Space Mono', monospace; }

/* Player profile modal */
.mc-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  z-index: 60;
}
.mc-modal.show { display: flex; }
.mc-modal-card { width: 100%; max-width: 640px; }
.mc-profile-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px;
  letter-spacing: 1px;
  color: #fff;
}
.mc-sec-label { margin: 20px 0 10px; }
.mc-profile-punish { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.mc-pp-card {
  border: 1px solid rgba(255, 255, 255, .1);
  border-left: 3px solid var(--red);
  border-radius: 6px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mc-pp-card.mute { border-left-color: #d6a327; }
.mc-pp-title { font-size: 12px; letter-spacing: 1px; color: #fff; font-weight: 700; }
.mc-pp-sub { font-size: 12px; color: var(--muted); }
.mc-pp-card .abtn { align-self: flex-start; margin-top: 6px; }
.mc-hist-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  font-size: 12px;
}
.mc-hist-act { flex: 0 0 90px; color: var(--red2); font-weight: 500; }
.mc-hist-detail { flex: 1; color: #ccc; }
.mc-hist-time { color: var(--muted); font-size: 10px; white-space: nowrap; }

/* Player heads */
.mc-head-sm { width: 18px; height: 18px; border-radius: 3px; margin-right: 7px; vertical-align: middle; image-rendering: pixelated; }
.mc-head-lg { width: 34px; height: 34px; border-radius: 5px; margin-right: 12px; vertical-align: middle; image-rendering: pixelated; }
.mc-pchip { display: inline-flex; align-items: center; }
.mc-profile-name { display: inline-flex; align-items: center; }

/* Role badge */
.role-badge {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .16);
  color: var(--muted);
}
.role-badge.role-owner { color: #ffd76a; border-color: #ffd76a66; }
.role-badge.role-admin { color: #ff6a6a; border-color: #ff6a6a66; }
.role-badge.role-mod { color: #6ab8ff; border-color: #6ab8ff66; }
.role-badge.role-helper { color: #6ade9b; border-color: #6ade9b66; }

/* Staff management list */
.staff-list { display: flex; flex-direction: column; gap: 8px; }
.staff-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 7px;
  padding: 10px 13px;
}
.staff-main { flex: 1; min-width: 140px; }
.staff-name { font-size: 14px; color: #fff; }
.staff-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.staff-role-sel { flex: 0 0 110px; }
.staff-locked { font-size: 10px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }

/* Generated credentials + link code */
.cred-box {
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 7px;
  padding: 12px 14px;
  margin: 12px 0;
}
.cred-line { font-family: 'Space Mono', monospace; font-size: 14px; color: var(--red2); word-break: break-all; }
.cred-note { font-size: 11px !important; color: #d6a327 !important; margin-top: 6px !important; }
.link-code {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 44px;
  letter-spacing: 8px;
  color: var(--red2);
  text-align: center;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
}

/* Inventory / ender-chest grid (owner only) */
.inv-section { margin-top: 12px; }
.inv-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
}
.inv-cell {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 4px;
  background: rgba(255, 255, 255, .04);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  overflow: hidden;
  cursor: default;
}
.inv-cell.empty { background: rgba(0, 0, 0, .22); border-color: rgba(255, 255, 255, .05); }
.inv-cell .inv-name {
  font-size: 7px;
  line-height: 1.1;
  text-align: center;
  color: #d8d8d8;
  text-transform: uppercase;
  letter-spacing: .3px;
  word-break: break-word;
}
.inv-cell .inv-amt {
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px #000;
}
.inv-cell.inv-ench {
  border-color: #b483ff88;
  background: linear-gradient(135deg, rgba(180, 131, 255, .16), rgba(255, 255, 255, .04));
}
.inv-cell.inv-ench .inv-name { color: #e6d4ff; }
@media (max-width: 560px) {
  .inv-cell .inv-name { font-size: 6px; }
}
