:root {
  --bg: #0d1017; --bg2: #141923; --card: #181e2a; --line: #262e3d; --text: #e7eaf0; --muted: #8b94a7;
  --accent: #ff8a1f; --accent2: #ffb347; --go: #2fbf71; --warn: #e5a50a; --stop: #e5484d; --blue: #4f8cff;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 "Segoe UI", "Rubik", "Heebo", system-ui, -apple-system, Arial, sans-serif; }
body { min-height: 100vh; background: radial-gradient(1200px 500px at 85% -10%, #2a1a0c 0%, transparent 60%), var(--bg); }
.hidden { display: none !important; }
button, input, select { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--stop); min-height: 1.4em; margin: 6px 0 0; }

/* brand */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .3px; font-size: 18px; }
.brand.big { font-size: 26px; justify-content: center; }
.cube { width: 22px; height: 22px; border-radius: 6px; transform: rotate(45deg) scale(.85);
  background: linear-gradient(135deg, var(--accent2), var(--accent) 55%, #c4520b); box-shadow: 0 0 18px #ff8a1f66; }
.brand.big .cube { width: 30px; height: 30px; }

/* cards & buttons */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.btn { border: 1px solid var(--line); background: #222a39; border-radius: 10px; padding: 10px 16px; cursor: pointer;
  font-weight: 600; transition: filter .15s, transform .05s; white-space: nowrap; }
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a0d00; }
.btn.go { background: #17382a; border-color: #23573e; color: #7ff0b0; }
.btn.warn { background: #3a2e0e; border-color: #5c4914; color: #ffd76a; }
.btn.stop { background: #3d1719; border-color: #612326; color: #ff9b9e; }
.btn.ghost { background: transparent; }
.btn.google { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f;
  border-color: #dadce0; text-decoration: none; padding: 11px 16px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(380px, 100%); display: grid; gap: 12px; text-align: center; padding: 28px; }
.login-card label { display: grid; gap: 6px; text-align: start; color: var(--muted); font-size: 13px; }
input, select { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; }
input:focus, select:focus { border-color: var(--accent); }

/* header */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 22px;
  background: #0d1017e6; backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.grow { flex: 1; }
.me { color: var(--muted); font-size: 13px; }
.status-pill { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 99px;
  background: var(--bg2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.status-pill.on .dot { background: var(--go); box-shadow: 0 0 10px var(--go); }
.status-pill.off .dot { background: var(--stop); }
.status-pill.mid .dot { background: var(--warn); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

main { max-width: 1180px; margin: 0 auto; padding: 22px; display: grid; gap: 18px; }

/* power + stats */
.power { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; justify-content: space-between; }
.power-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { min-width: 108px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px;
  display: grid; text-align: center; }
.stat b { font-size: 20px; direction: ltr; }
.stat span { color: var(--muted); font-size: 12px; }

/* tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { background: none; border: none; padding: 10px 16px; cursor: pointer; color: var(--muted); font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.active { color: var(--text); border-color: var(--accent); }
.count { background: #3d1719; color: #ff9b9e; border-radius: 99px; padding: 0 7px; font-size: 12px; margin-inline-start: 4px; }
.count:empty { display: none; }
.pane-head { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
#wlName, #tmEmail { width: 260px; }
.grow { flex: 1; }
.search { width: min(320px, 100%); }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* players */
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.player { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.face { width: 56px; height: 56px; border-radius: 10px; image-rendering: pixelated; background: var(--bg2);
  box-shadow: 0 2px 10px #0006; }
.pname { font-weight: 700; font-size: 16px; direction: ltr; text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmeta { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.tag { font-size: 11px; padding: 1px 8px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); direction: ltr; }
.tag.java { color: #ffb36b; border-color: #5c3a14; }
.tag.bedrock { color: #8fd18f; border-color: #285c28; }
.tag.rank-owner, .tag.rank-cowowner { color: #ffd36b; border-color: #5c4914; }
.tag.rank-admin { color: #ff8f8f; border-color: #612326; }
.tag.rank-mod { color: #7ff0b0; border-color: #23573e; }
.tag.rank-helper { color: #8fb4ff; border-color: #253f75; }
.pact { display: flex; gap: 6px; }
.pact .btn { flex: 1; }

/* bans */
.bans { display: grid; gap: 8px; }
.ban { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.ban .face { width: 40px; height: 40px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { width: 170px; }

/* console */
.log { height: 56vh; min-height: 300px; overflow: auto; background: #07090d; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; font: 12.5px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; word-break: break-word; margin: 0; }
.log .l { color: #c9cfdb; }
.log .ts { color: #5a6477; margin-inline-end: 8px; }
.log .e { color: #ff8f8f; }
.log .w { color: #ffd36b; }
.log .p { color: #8fb4ff; }
.log .ok { color: #7ff0b0; }
.cmd { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.cmd input { flex: 1; font-family: ui-monospace, Consolas, monospace; }
.prompt { color: var(--accent); font-weight: 800; }

/* modal & toast */
.modal { position: fixed; inset: 0; background: #000a; display: grid; place-items: center; z-index: 20; padding: 16px; }
.modal-card { width: min(420px, 100%); display: grid; gap: 10px; }
.modal-card h3 { margin: 0; }
#mFields { display: grid; gap: 8px; }
#mFields label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.modal-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #222a39; border: 1px solid var(--line);
  padding: 10px 18px; border-radius: 10px; z-index: 30; box-shadow: 0 6px 24px #0008; max-width: 90vw; }
.toast.bad { border-color: #612326; color: #ff9b9e; }
.toast.good { border-color: #23573e; color: #7ff0b0; }

@media (max-width: 640px) {
  main { padding: 14px; }
  .top { padding: 10px 14px; gap: 8px; }
  .me { display: none; }
  .power-btns .btn { flex: 1; }
  .stat { min-width: 0; flex: 1; }
}
