:root {
  --bg: #0e131b;
  --panel: #131a24;
  --panel-2: #1f2836;
  --row-hover: #283244;
  --line: #1e2734;
  --text: #e9edf3;
  --muted: #6f7a8c;
  --t1: #f2a93b;
  --t2: #aeb6c2;
  --t3: #e0874a;
  --t4: #c5ccd6;
  --t5: #c5ccd6;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-width: thin; scrollbar-color: #2a3445 transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.wrap { max-width: 1382px; margin: 0 auto; padding: 0 16px; }
button { font: inherit; color: inherit; }
svg { display: block; }

/* Top bar */
.nav { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; height: 64px; padding: 0 18px; margin-top: 32px; border: 1px solid var(--line); border-radius: 12px; }
.brand { color: var(--text); text-decoration: none; font-size: 22px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.brand { display: flex; align-items: center; }
.brand img { height: 40px; width: auto; display: block; }
.search { justify-self: end; display: flex; align-items: center; gap: 8px; width: 272px; max-width: 100%; height: 40px; padding: 0 8px 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.search:focus-within { border-color: #3a4558; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14px; }
.search input::placeholder { color: var(--muted); }
.search kbd { font: 600 11px Inter, sans-serif; color: var(--muted); background: var(--panel-2); padding: 2px 7px; border-radius: 5px; }

/* Tabs attached to the panel */
.tabs { display: flex; gap: 6px; margin: 52px 0 0; padding: 0 2px; overflow-x: auto; scrollbar-width: none; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 110px; height: 60px; flex: none; padding: 7px 0 0; background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; cursor: pointer; color: var(--muted); font-weight: 700; font-size: 15px; }
.tab svg { width: 24px; height: 24px; color: var(--t1); opacity: .55; }
.tab span { padding-bottom: 4px; border-bottom: 2px solid transparent; width: 84%; }
.tab.active { color: #fff; }
.tab.active svg { opacity: 1; }
.tab.active span { border-bottom-color: #fff; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 0 12px 12px 12px; padding: 16px 32px 32px; min-height: 400px; }
.toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-bottom: 13px; }
.title h1 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 700; }
.title p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.ipbox { display: flex; flex-direction: column; gap: 2px; }
.ip-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.ip { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 0; border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text); }
.ip svg { color: var(--muted); }
.ip:hover svg { color: var(--text); }

.status { color: var(--muted); text-align: center; padding: 40px 0; margin: 0; }
.status:empty { display: none; }

/* Tier columns */
.tiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.col-head { background: var(--h); height: 55px; border-radius: 8px 8px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.col-head h2 { margin: 0; font-size: 26px; font-weight: 700; color: var(--c); }
.col-head svg { width: 28px; height: 28px; flex: none; color: var(--c); }
.col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.col li { display: flex; align-items: center; gap: 0; height: 36px; padding: 0 8px 0 0; background: var(--panel-2); min-width: 0; }
.reg { align-self: stretch; flex: none; width: 3px; margin-right: 7px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--r); color: transparent; font-size: 13px; font-weight: 700; letter-spacing: .02em; transition: width .2s ease, margin .2s ease, background-color .2s ease, color .15s ease; }
.col li:hover .reg, .col li:focus-visible .reg { width: 34px; margin-right: 4px; background: color-mix(in srgb, var(--r) 28%, var(--panel-2)); color: var(--r); box-shadow: inset 3px 0 0 var(--r); }
.col li[data-uuid] { cursor: pointer; }
.col li.ht { background: #263043; }
.col li.lt { background: #1b2331; }
.col li.ht:hover { background: #2e3a50; }
.col li.lt:hover { background: #222a38; }
.col li:hover, .col li:focus-visible { background: var(--row-hover); outline: none; }
.col li .head { width: 28px; height: 28px; margin-right: 10px; }
.col li .name { font-size: 16px; font-weight: 400; }
.col .empty { color: var(--muted); font-size: 13px; background: none; border-left: 0; padding: 0 12px; }
.chev { width: 22px; height: 22px; flex: none; color: #3e4c64; }
.head { object-fit: contain; flex: none; }
.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; min-width: 0; flex: 1; }

/* Profile popup */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(5, 8, 12, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-card { position: relative; width: 100%; max-width: 380px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; display: grid; place-items: center; background: var(--panel-2); border: 0; border-radius: 8px; color: var(--muted); cursor: pointer; }
.modal-x:hover { color: var(--text); }
.pf-top { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pf-skin { width: 130px; height: 200px; object-fit: contain; }
.pf-top h3 { margin: 6px 0 0; font-size: 26px; font-weight: 800; word-break: break-all; text-align: center; }
.pf-namemc { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; background: var(--panel-2); padding: 3px 10px; border-radius: 6px; }
.pf-namemc:hover { color: var(--text); }
.pf-tier { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; background: var(--h); border-radius: 8px; padding: 12px 16px; }
.pf-tier-name { font-size: 22px; font-weight: 700; color: var(--c); }
.pf-tier-sub { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.pf-tier-sub .chev { color: var(--c); }
.pf-stats { margin: 8px 0 0; display: grid; gap: 2px; }
.pf-stats div { display: flex; justify-content: space-between; align-items: center; background: var(--panel-2); padding: 10px 16px; }
.pf-stats div:first-child { border-radius: 8px 8px 0 0; }
.pf-stats div:last-child { border-radius: 0 0 8px 8px; }
.pf-stats div:only-child { border-radius: 8px; }
.pf-stats dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.pf-stats dd { margin: 0; font-weight: 700; }
.pf-stats dd span { color: var(--muted); font-weight: 500; }

.foot { color: var(--muted); font-size: 13px; padding: 32px 0 40px; text-align: center; }
.foot code { color: var(--text); background: var(--panel); padding: 2px 6px; border-radius: 4px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600; }

@media (max-width: 1100px) {
  .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .nav { grid-template-columns: 1fr auto; height: auto; padding: 12px; gap: 10px; }
  .search { width: 160px; }
  .search kbd { display: none; }
  .tabs { margin-top: 24px; }
  .tab { width: 96px; font-size: 14px; }
  .panel { padding: 12px 12px 20px; }
  .toolbar { margin-bottom: 14px; flex-wrap: wrap; }
  .title h1 { font-size: 20px; }
  .nav { margin-top: 12px; }
  .tiers { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .brand img { height: 26px; }
}
@media (max-width: 400px) {
  .search { width: 130px; }
}
