:root {
  /* Aether: glass panels over a dusk landscape */
  --bg: #0a0c1c;
  --bg-2: rgba(6, 8, 22, .42);
  --panel: rgba(255, 255, 255, .06);
  --panel-2: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .15);
  --text: #eef0fb;
  --text-2: #b4b9d3;
  --muted: #7f86a8;
  --accent: #8f7dff;
  --accent-2: #b8acff;
  --accent-bg: rgba(143, 125, 255, .16);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035));
  --glass-blur: blur(20px) saturate(150%);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .09);
  --green: #3ddc84;
  --green-bg: rgba(61, 220, 132, .12);
  --amber: #f5b544;
  --amber-bg: rgba(245, 181, 68, .12);
  --red: #f26d6d;
  --red-bg: rgba(242, 109, 109, .12);
  --blue: #5aa8ff;
  --blue-bg: rgba(90, 168, 255, .12);
  --radius: 18px;
  --radius-sm: 9px;
  --shadow: 0 14px 44px rgba(0, 0, 0, .45);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --slot: 40px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 75% -10%, rgba(139, 124, 246, .10), transparent 60%), var(--bg);
  color: var(--text);
  font: 14px/1.45 Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-2); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.grow { flex: 1; min-width: 0; }
[hidden] { display: none !important; }

[data-icon] svg { width: 16px; height: 16px; display: block; }
.icon-btn [data-icon] svg, .icon-btn > svg { width: 16px; height: 16px; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 272px 1fr; height: 100vh; }
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  min-height: 0;
}
.main { overflow-y: auto; min-width: 0; }
.view { padding: 18px 22px 28px; max-width: 1500px; margin: 0 auto; }

.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #5b4ee0);
  color: white; box-shadow: 0 6px 20px rgba(139, 124, 246, .35);
}
.brand-logo svg { width: 22px; height: 22px; }
.brand-name { font-weight: 700; letter-spacing: .2px; }
.brand-sub { font-size: 11.5px; color: var(--muted); }

.side-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 6px 18px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.acct-list { flex: 1; overflow-y: auto; padding: 4px 10px 10px; }
.acct-group { font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; padding: 12px 8px 6px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.acct {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center;
  padding: 9px 10px; border-radius: 11px; cursor: pointer; border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.acct:hover { background: var(--panel); }
.acct.active { background: var(--panel-2); border-color: var(--line-2); }
.acct img { width: 34px; height: 34px; border-radius: 8px; image-rendering: pixelated; background: var(--panel-2); }
.acct-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.acct-actions { display: flex; align-items: center; gap: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.online { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.dot.connecting, .dot.joining, .dot.reconnecting { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }
.dot.auth { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.tag { font-size: 10px; padding: 1px 6px; border-radius: 6px; background: var(--accent-bg); color: var(--accent-2); font-weight: 600; }

.side-foot { border-top: 1px solid var(--line); padding: 10px; display: grid; gap: 4px; }
.side-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px;
  background: none; border: 0; cursor: pointer; color: var(--text-2); text-align: left;
}
.side-btn:hover { background: var(--panel); color: var(--text); }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13px;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text);
  transition: transform .06s, background .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
}
.btn:hover { border-color: #3a4459; background: #1a2130; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #9a8cff, #7b6af0); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(139, 124, 246, .25); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.success { background: linear-gradient(180deg, #45e08e, #2bbf6c); border-color: transparent; color: #04140a; }
.btn.danger { background: var(--red-bg); color: var(--red); border-color: rgba(242, 109, 109, .3); }
.btn.danger.solid { background: linear-gradient(180deg, #f47f7f, #df5555); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.wide { width: 100%; }
.icon-btn {
  width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 8px;
  background: transparent; border: 1px solid transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--panel-2); border-color: var(--line-2); color: var(--text); }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn.play { color: var(--green); }
.icon-btn.stop { color: var(--red); }
.icon-btn.del:hover { color: var(--red); }

input, select, textarea {
  width: 100%; height: 36px; padding: 0 11px; border-radius: 9px;
  background: var(--bg-2); border: 1px solid var(--line-2); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 70px; padding: 9px 11px; resize: vertical; font-family: var(--mono); font-size: 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
input:disabled, select:disabled { opacity: .55; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7486' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
select option { background: var(--panel); }

.form { display: grid; gap: 12px; }
.form.compact { gap: 10px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; color: var(--text-2); font-weight: 500; }
.row { display: flex; gap: 10px; align-items: flex-end; }
.row.between { justify-content: space-between; align-items: center; }
.port { width: 96px; flex: none; }

.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle i {
  width: 38px; height: 22px; border-radius: 22px; background: var(--line-2); position: relative; flex: none;
  transition: background .2s;
}
.toggle i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #cfd5e1; transition: transform .2s, background .2s;
}
.toggle input:checked + i { background: var(--accent); }
.toggle input:checked + i::after { transform: translateX(16px); background: #fff; }
.toggle span { font-size: 13px; color: var(--text-2); }
.toggle.sm i { width: 30px; height: 18px; }
.toggle.sm i::after { width: 12px; height: 12px; }
.toggle.sm input:checked + i::after { transform: translateX(12px); }

.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; }
.seg button {
  flex: 1; border: 0; background: none; padding: 6px 9px; border-radius: 7px; cursor: pointer; color: var(--text-2);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- topbar ---------- */
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.top-avatar { width: 46px; height: 46px; border-radius: 11px; image-rendering: pixelated; background: var(--panel); border: 1px solid var(--line); }
.top-title { min-width: 0; }
.top-name { font-size: 19px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.top-server { font-size: 13px; color: var(--muted); font-weight: 500; }
.top-sub { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.top-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pill { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; background: var(--line); color: var(--text-2); }
.pill.online { background: var(--green-bg); color: var(--green); }
.pill.connecting, .pill.joining, .pill.reconnecting { background: var(--amber-bg); color: var(--amber); }
.pill.auth { background: var(--blue-bg); color: var(--blue); }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--text-2);
  white-space: nowrap;
}
.chip.ping.good { color: var(--green); }
.chip.ping.ok { color: var(--amber); }
.chip.ping.bad { color: var(--red); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(139,124,246,.6);} 70% { box-shadow: 0 0 0 7px rgba(139,124,246,0);} 100% { box-shadow: 0 0 0 0 rgba(139,124,246,0);} }

.banner {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; margin-bottom: 12px;
  border: 1px solid; font-size: 13px;
}
.banner.warn { background: var(--blue-bg); border-color: rgba(90,168,255,.3); }
.banner.warn > [data-icon] { color: var(--blue); }
.banner.info { background: var(--amber-bg); border-color: rgba(245,181,68,.3); }
.banner.info > [data-icon] { color: var(--amber); }
.banner-body { flex: 1; }
.code {
  font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: .12em;
  padding: 3px 10px; margin-left: 4px; border-radius: 7px; border: 1px dashed var(--blue); background: rgba(0,0,0,.2); color: var(--text); cursor: pointer;
}

/* ---------- cards ---------- */
.grid { display: grid; gap: 14px; margin-bottom: 14px; }
.top-grid { grid-template-columns: 1fr 1fr 1.15fr; }
.mid-grid { grid-template-columns: 1.6fr 1fr; }
.card {
  background: linear-gradient(180deg, var(--panel), #0f131a);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.card-head h3 { margin: 0; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--text); }
.card-head h3 [data-icon] { color: var(--accent-2); }

.vitals { display: grid; gap: 12px; }
.vital-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.vital-label b { color: var(--text); font-weight: 600; font-family: var(--mono); font-size: 12px; }
.bar { height: 8px; border-radius: 8px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--line); }
.bar.thin { height: 6px; }
.bar i { display: block; height: 100%; width: 0; border-radius: 8px; transition: width .4s; }
.bar i.hp { background: linear-gradient(90deg, #ff5f6d, #ff8a8a); }
.bar i.hp.hit { animation: hit .6s ease-out; }
@keyframes hit { 0% { filter: brightness(2.2); box-shadow: 0 0 10px #ff5f6d; } 100% { filter: none; box-shadow: none; } }
.vital-label .sat { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 6px; }
.bar i.food { background: linear-gradient(90deg, #d68b3a, #f5b544); }
.bar i.xp { background: linear-gradient(90deg, #6ee36e, #b5f56c); }
.kv { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.kv > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; }
.kv-val { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.kv-val img { width: 18px; height: 18px; image-rendering: pixelated; }

.profit { display: grid; gap: 4px; }
.profit-row {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px;
  padding: 8px 6px; border-radius: 9px;
}
.profit-row:hover { background: rgba(255,255,255,.02); }
.profit-row span:nth-child(2) { color: var(--text-2); font-size: 13px; }
.profit-row b { font-family: var(--mono); font-size: 14.5px; font-weight: 600; }
.p-ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); }
.p-ico.money { color: var(--green); background: var(--green-bg); border-color: rgba(61,220,132,.25); }
#pfSession { color: var(--green); }

/* ---------- inventory / slots ---------- */
.inv-wrap { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 2px; }
.inv-side { display: flex; flex-direction: column; gap: 10px; }
.slot-col { display: grid; gap: 4px; }
.inv-main { display: grid; gap: 10px; }
.slots { display: grid; grid-template-columns: repeat(9, var(--slot)); gap: 4px; }
.slot {
  width: var(--slot); height: var(--slot); position: relative; border-radius: 7px;
  background: #0b0e14; border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.slot:hover { border-color: #3c475c; background: #121722; }
.slot.held { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg), inset 0 0 12px rgba(139,124,246,.18); }
.slot.sel { border-color: var(--amber); }
.slot.ph::before { content: attr(data-ph); font-size: 9px; color: #3b4456; font-weight: 700; letter-spacing: .04em; }
.slot img { width: 30px; height: 30px; image-rendering: pixelated; pointer-events: none; }
.slot .fallback { font-size: 10px; font-weight: 700; color: var(--text-2); text-align: center; line-height: 1.05; padding: 2px; pointer-events: none; word-break: break-all; }
.slot .count {
  position: absolute; right: 3px; bottom: 1px; font: 700 11px/1 var(--mono); color: #fff;
  text-shadow: 1px 1px 0 #000, -1px 0 0 #000; pointer-events: none;
}
.slot .num { position: absolute; left: 4px; top: 2px; font: 600 9px/1 var(--mono); color: #4a5468; pointer-events: none; }
.slot .dura { position: absolute; left: 5px; right: 5px; bottom: 4px; height: 3px; background: #000; border-radius: 2px; pointer-events: none; }
.slot .dura i { display: block; height: 100%; border-radius: 2px; }
.slot.glint img { filter: drop-shadow(0 0 3px rgba(190, 120, 255, .9)); }
.hotbar { padding-top: 10px; border-top: 1px dashed var(--line-2); }
.inv-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); flex-wrap: wrap; }
.inv-actions .row { gap: 6px; flex-wrap: wrap; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 10px; }

/* ---------- controls ---------- */
.controls { display: grid; gap: 4px; }
.control { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.control.col { flex-direction: column; align-items: stretch; }
.c-title { font-weight: 600; font-size: 13.5px; }
.c-desc { font-size: 12px; color: var(--muted); }
.sellaxe-cta {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px;
  padding: 12px; border-radius: 12px; background: var(--accent-bg); border: 1px solid rgba(139,124,246,.25);
}
.sellaxe-cta.running { background: var(--green-bg); border-color: rgba(61,220,132,.3); }

/* ---------- tabs ---------- */
.tabs-card { padding: 0; overflow: hidden; }
.tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs button:hover { color: var(--text-2); }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs em { font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 6px; background: var(--line); color: var(--text-2); }
.tab { display: none; padding: 16px; }
.tab.active { display: block; }

/* chat */
.chat-layout { display: grid; grid-template-columns: 1fr 260px; gap: 14px; }
.chat-main { min-width: 0; display: flex; flex-direction: column; }
.chat-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 10px; }
.search { position: relative; width: 220px; }
.search [data-icon] { position: absolute; left: 10px; top: 10px; color: var(--muted); }
.search [data-icon] svg { width: 14px; height: 14px; }
.search input { padding-left: 32px; height: 34px; }
.chat-log {
  height: 380px; overflow-y: auto; padding: 10px 12px; border-radius: 11px; background: #07090d; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
}
.chat-line { white-space: pre-wrap; word-break: break-word; padding: 1px 4px; border-radius: 4px; }
.chat-line:hover { background: rgba(255,255,255,.03); }
.chat-line .ts { color: #4b5466; margin-right: 8px; font-size: 11px; }
.chat-line.gain { background: rgba(61,220,132,.06); box-shadow: inset 2px 0 0 var(--green); }
.chat-line.self { color: var(--accent-2); }
.obf { filter: blur(2px); }
.actionbar { min-height: 22px; text-align: center; font-family: var(--mono); font-size: 12.5px; padding: 4px; }
.chat-input { display: flex; gap: 8px; align-items: center; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 11px; padding: 4px 4px 4px 12px; }
.chat-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.chat-input input { border: 0; background: none; box-shadow: none !important; padding: 0; height: 34px; font-family: var(--mono); font-size: 13px; }
.chat-input .prompt { color: var(--accent-2); font-weight: 700; font-family: var(--mono); }
.chat-input .btn { height: 34px; width: 40px; padding: 0; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quick button { border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text-2); border-radius: 7px; padding: 3px 9px; font: 500 12px var(--mono); cursor: pointer; }
.quick button:hover { color: var(--text); border-color: var(--accent); }
.chat-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.me { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.me img { width: 44px; height: 44px; border-radius: 9px; image-rendering: pixelated; }
.me-name { font-weight: 700; font-size: 15px; word-break: break-all; }
.me-bal { font-family: var(--mono); font-weight: 700; color: var(--green); font-size: 17px; }
.sb { padding: 12px 14px; border-radius: 12px; background: #07090d; border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; line-height: 1.7; min-height: 60px; }
.sb-title { text-align: center; font-weight: 700; margin-bottom: 4px; }
.sb:empty::before { content: 'No scoreboard'; color: var(--muted); }

/* sell axe */
.axe-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; }
.axe-form { display: grid; gap: 4px; }
.opt { display: grid; grid-template-columns: 1fr 220px; gap: 16px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.opt.sub { padding-left: 22px; }
.opt-title { font-weight: 600; font-size: 13.5px; }
.opt-desc { font-size: 12px; color: var(--muted); }
.opt-ctl { display: flex; justify-content: flex-end; }
.opt-ctl input, .opt-ctl select { max-width: 220px; }
.opt-section { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); font-weight: 700; padding: 16px 4px 4px; }
.axe-side { display: flex; flex-direction: column; gap: 12px; }
.axe-status { padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 8px; }
.axe-state { font-weight: 700; font-size: 15px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.stat .s-l { font-size: 11px; color: var(--muted); }
.stat .s-v { font-family: var(--mono); font-weight: 600; font-size: 14px; }

/* players */
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-height: 460px; overflow-y: auto; }
.player { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.player img { width: 24px; height: 24px; border-radius: 5px; image-rendering: pixelated; }
.player .pn { flex: 1; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .pp { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* activity */
.log { max-height: 460px; overflow-y: auto; font-family: var(--mono); font-size: 12.5px; display: grid; gap: 2px; }
.log-line { display: grid; grid-template-columns: 96px 64px 1fr; gap: 10px; padding: 5px 8px; border-radius: 6px; }
.log-line:hover { background: rgba(255,255,255,.02); }
.log-line .lt { color: var(--muted); }
.lv { font-size: 10.5px; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; text-align: center; align-self: start; }
.lv.info { background: var(--blue-bg); color: var(--blue); }
.lv.warn { background: var(--amber-bg); color: var(--amber); }
.lv.error { background: var(--red-bg); color: var(--red); }
.lv.success { background: var(--green-bg); color: var(--green); }

/* settings */
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.set-card { padding: 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.set-card h4 { margin: 0; font-size: 13.5px; }
.set-card .help { font-size: 12px; color: var(--muted); margin-top: -6px; }
.set-card.danger { border-color: rgba(242,109,109,.3); }

/* ---------- modals ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(4, 6, 10, .7); backdrop-filter: blur(6px);
  display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s;
}
@keyframes fade { from { opacity: 0; } }
.modal-card {
  width: 480px; max-width: 100%; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; padding: 18px; box-shadow: var(--shadow);
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-card.wide { width: 860px; }
.chunk-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 12px; }
.chunk-table th, .chunk-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.chunk-table th { color: var(--muted); font-weight: 600; }
.chunk-bots { overflow-x: auto; }
.chunk-farm { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 10px; }
.chunk-farm .grow { flex: 1; min-width: 180px; padding-bottom: 8px; }
.chunk-farm .row { gap: 6px; align-items: center; padding-bottom: 8px; }
.acct-group-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.farm-tag { font-size: 9px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 159, 67, .16); color: #ffb870; letter-spacing: .03em; text-transform: none; }
.chunk-form { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr auto; gap: 8px; align-items: end; margin-bottom: 12px; }
.chunk-verdict { padding: 10px 12px; border-radius: 10px; font-size: 13px; border: 1px solid var(--line-2); }
.chunk-verdict.ok { background: rgba(69, 224, 142, .12); border-color: rgba(69, 224, 142, .4); }
.chunk-verdict.warn { background: rgba(255, 196, 77, .12); border-color: rgba(255, 196, 77, .45); }
.chunk-verdict.bad { background: rgba(255, 99, 125, .12); border-color: rgba(255, 99, 125, .45); }
.chunk-map-wrap { display: grid; gap: 6px; margin-top: 8px; }
.chunk-map { width: 100%; max-height: 520px; background: var(--bg-2); border-radius: 10px; }
.chunk-map .cm-grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.chunk-map .cm-area { fill: rgba(255, 159, 67, .35); stroke: #ff9f43; stroke-width: 2; }
.chunk-map .cm-label { fill: var(--text); font-size: 11px; font-weight: 600; paint-order: stroke; stroke: rgba(0, 0, 0, .6); stroke-width: 3px; }
@media (max-width: 720px) { .chunk-form { grid-template-columns: 1fr 1fr; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; align-items: center; margin-top: 4px; }

.proxy-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; }
.proxy-list-wrap { display: flex; flex-direction: column; gap: 8px; }
.proxy-list { display: grid; gap: 6px; max-height: 420px; overflow-y: auto; }
.proxy-item { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; }
.proxy-item:hover { border-color: var(--line-2); }
.proxy-item.active { border-color: var(--accent); background: var(--accent-bg); }
.proxy-item .pi-name { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.proxy-item .pi-sub { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.proxy-empty { padding: 24px 12px; text-align: center; color: var(--muted); font-size: 12.5px; border: 1px dashed var(--line-2); border-radius: 10px; }

/* minecraft dialog / window */
.dialog-card, .window-card {
  position: relative; background: rgba(14, 16, 22, .97); border: 1px solid var(--line-2); border-radius: 16px;
  padding: 22px 22px 18px; box-shadow: var(--shadow); max-height: calc(100vh - 32px); overflow-y: auto;
  animation: pop .18s ease-out;
}
.dialog-card { width: 560px; max-width: 100%; text-align: center; }
.dialog-x { position: absolute; right: 10px; top: 10px; }
.dialog-title { font-size: 17px; font-weight: 700; margin: 0 30px 14px; font-family: var(--mono); }
.dialog-body { display: grid; gap: 8px; margin-bottom: 14px; font-family: var(--mono); font-size: 13px; }
.dialog-body .d-item { display: inline-flex; align-items: center; gap: 10px; justify-content: center; }
.dialog-body .d-item img { width: 32px; height: 32px; image-rendering: pixelated; }
.dialog-inputs { display: grid; gap: 10px; text-align: left; margin-bottom: 14px; }
.dialog-inputs:empty { display: none; }
.dialog-buttons { display: grid; gap: 8px; }
.mc-btn {
  min-height: 40px; padding: 8px 12px; border-radius: 9px; cursor: pointer;
  background: linear-gradient(180deg, #232a37, #1b212c); border: 1px solid #333d50; color: var(--text);
  font: 600 13px var(--mono); transition: border-color .12s, transform .06s, background .12s;
}
.mc-btn:hover { border-color: var(--accent); background: linear-gradient(180deg, #2a3242, #1f2633); }
.mc-btn:active { transform: translateY(1px); }
.dialog-exit { margin-top: 10px; display: flex; justify-content: center; }
.dialog-exit:empty { display: none; }
.dialog-exit .mc-btn { min-width: 200px; }

.window-card { width: auto; }
.window-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 12px; }
.window-title { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.window-sep { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 14px 0 8px; }
.window-slots { --slot: 44px; }
.window-slots .slot img { width: 32px; height: 32px; }

/* logs */
.logs-list { display: grid; gap: 14px; max-height: 60vh; overflow-y: auto; }
.logs-group h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-2); }
.log-file { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12.5px; margin-bottom: 4px; }
.log-file .lf-name { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-file a { color: var(--accent-2); text-decoration: none; font-weight: 600; }
.log-file a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 12px; background: var(--bg-2); padding: 1px 5px; border-radius: 5px; }

/* tooltip */
.tooltip {
  position: fixed; z-index: 100; pointer-events: none; max-width: 360px;
  background: rgba(16, 4, 20, .96); border: 2px solid #2b0f5c; outline: 1px solid #12041f; border-radius: 6px;
  padding: 7px 9px; font-family: var(--mono); font-size: 12px; line-height: 1.5; box-shadow: var(--shadow);
}
.tooltip .tt-name { font-weight: 700; margin-bottom: 2px; }
.tooltip .tt-dim { color: #8b8b9b; }

/* toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 200; }
.toast {
  padding: 11px 14px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  font-size: 13px; max-width: 360px; animation: pop .2s ease-out; display: flex; gap: 10px; align-items: flex-start;
}
.toast.error { border-color: rgba(242,109,109,.4); }
.toast.error > [data-icon] { color: var(--red); }
.toast.ok > [data-icon] { color: var(--green); }

/* empty */
.empty { height: 100%; display: grid; place-items: center; padding: 24px; }
.empty-card { text-align: center; max-width: 380px; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 18px; background: var(--accent-bg); color: var(--accent-2); }
.empty-icon svg { width: 30px; height: 30px; }
.empty h2 { margin: 0 0 8px; font-size: 19px; }
.empty p { color: var(--text-2); margin: 0 0 18px; }

.mobile-only { display: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #232a37; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #2f3849; background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Aether glass theme ---------- */
body {
  background:
    linear-gradient(180deg, rgba(8, 9, 24, .10), rgba(8, 9, 24, .40)),
    url('/bg.svg') center / cover fixed,
    var(--bg);
}
.sidebar {
  background: rgba(10, 12, 30, .46);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid rgba(255, 255, 255, .08);
}
.brand { padding: 20px 18px 16px; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px; background: none; box-shadow: none;
  filter: drop-shadow(0 6px 18px rgba(143, 125, 255, .45));
}
.brand-name { font-size: 16px; letter-spacing: .4px; background: linear-gradient(90deg, #ffffff, #c9c0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card, .tabs-card {
  background: var(--glass);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .32), var(--glass-edge);
}
.card-head h3 { font-size: 14px; }
.card-head h3 [data-icon] {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px;
  background: var(--accent-bg); border: 1px solid rgba(143, 125, 255, .3); color: var(--accent-2);
}
.card-head h3 [data-icon] svg { width: 15px; height: 15px; }
.chip {
  background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: var(--glass-edge);
}
.acct:hover { background: rgba(255, 255, 255, .06); }
.acct.active { background: rgba(143, 125, 255, .14); border-color: rgba(143, 125, 255, .35); box-shadow: var(--glass-edge); }
.side-btn:hover { background: rgba(255, 255, 255, .07); }
.btn { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }
.btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); }
.btn.primary { background: linear-gradient(135deg, #a58bff, #6f86ff); box-shadow: 0 8px 22px rgba(124, 110, 255, .35); }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(242, 109, 109, .14); border-color: rgba(242, 109, 109, .35); }
.toggle i { background: rgba(255, 255, 255, .14); }
.toggle input:checked + i { background: linear-gradient(135deg, #a58bff, #6f86ff); box-shadow: 0 0 12px rgba(143, 125, 255, .45); }
.seg button.on { background: rgba(143, 125, 255, .22); box-shadow: inset 0 0 0 1px rgba(143, 125, 255, .45); }
input, select, textarea { background: rgba(4, 6, 18, .45); border-color: rgba(255, 255, 255, .12); }
select option { background: #15172e; }
.bar { background: rgba(0, 0, 0, .35); border-color: rgba(255, 255, 255, .08); }
.bar i.hp { background: linear-gradient(90deg, #ff4f9a, #c46bff); box-shadow: 0 0 10px rgba(255, 79, 154, .45); }
.bar i.food { background: linear-gradient(90deg, #f7d64a, #f59e44); box-shadow: 0 0 10px rgba(247, 214, 74, .35); }
.bar i.xp { background: linear-gradient(90deg, #58e08a, #b5f56c); }
.kv { border-top-color: rgba(255, 255, 255, .08); }
.p-ico { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
.profit-row:hover { background: rgba(255, 255, 255, .04); }
.slot { background: rgba(4, 6, 18, .42); border-color: rgba(255, 255, 255, .09); }
.slot:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .22); }
.slot.held { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg), inset 0 0 14px rgba(143, 125, 255, .28); }
.hotbar { border-top-color: rgba(255, 255, 255, .12); }
.control { border-bottom-color: rgba(255, 255, 255, .08); }
.sellaxe-cta { background: rgba(143, 125, 255, .14); border-color: rgba(143, 125, 255, .32); }
.tabs { border-bottom-color: rgba(255, 255, 255, .08); }
.tabs button.active { border-bottom-color: var(--accent); text-shadow: 0 0 14px rgba(143, 125, 255, .6); }
.chat-log, .sb { background: rgba(3, 5, 14, .5); border-color: rgba(255, 255, 255, .08); }
.chat-input { background: rgba(4, 6, 18, .45); border-color: rgba(255, 255, 255, .12); }
.me, .axe-status, .stat, .player, .set-card, .inv-actions, .proxy-item, .log-file { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .09); }
.quick button { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
.opt { border-bottom-color: rgba(255, 255, 255, .08); }
.modal { background: rgba(4, 6, 16, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal-card, .dialog-card, .window-card {
  background: rgba(22, 24, 48, .72);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, .14); box-shadow: var(--shadow), var(--glass-edge);
}
.mc-btn { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }
.mc-btn:hover { background: rgba(143, 125, 255, .18); }
.toast { background: rgba(22, 24, 48, .82); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.empty-card { padding: 30px; border-radius: 22px; background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid rgba(255, 255, 255, .12); box-shadow: var(--shadow), var(--glass-edge); }
.login-card { background: var(--glass) !important; backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border-color: rgba(255, 255, 255, .14) !important; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .24); background-clip: padding-box; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .top-grid { grid-template-columns: 1fr 1fr; }
  .top-grid > .card:last-child { grid-column: 1 / -1; }
  .mid-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); background: rgba(12, 14, 34, .88); }
  .sidebar.open { transform: none; }
  .mobile-only { display: inline-grid; }
  .view { padding: 14px 16px 24px; }
  .top-grid { grid-template-columns: 1fr; }
  .chat-layout, .axe-layout, .proxy-layout { grid-template-columns: 1fr; }
  .opt { grid-template-columns: 1fr; }
  .opt-ctl { justify-content: flex-start; }
  .top-right .chip#activityChip { display: none; }
  :root { --slot: 34px; }
  .slot img { width: 26px; height: 26px; }
  .search { width: 150px; }
}
