:root {
  --bg: #0a0c10;
  --bg-2: #0f1218;
  --panel: #141821;
  --panel-2: #1a1f2b;
  --panel-3: #222837;
  --line: #232a36;
  --line-2: #2e3645;
  --text: #eef0f3;
  --muted: #8a93a3;
  --muted-2: #6a7384;
  --accent: #5fd17a;
  --accent-2: #4cb069;
  --accent-soft: rgba(95, 209, 122, 0.12);
  --warn: #f0a04b;
  --bad: #e06363;
  --shadow-lg: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 8px 20px -10px rgba(0, 0, 0, 0.5);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(76, 176, 105, 0.08) 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(95, 209, 122, 0.05) 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-soft); color: var(--accent); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a4458; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 36px 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.85), rgba(10, 12, 16, 0.6));
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0a0d11;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.brand-text h1 {
  margin: 0;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand-text p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 92px;
  transition: border-color 0.15s, transform 0.15s;
}

.stat:hover { border-color: var(--line-2); }

.stat b {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.stat span {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1px;
  font-weight: 500;
}

.stat.ghost b { color: var(--muted); }

.toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 36px;
  flex-wrap: wrap;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 91px;
  z-index: 40;
}

.search {
  position: relative;
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
}

.search svg {
  position: absolute;
  left: 12px;
  color: var(--muted-2);
  pointer-events: none;
}

.search input {
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px 10px 36px;
  font: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.search input::placeholder { color: var(--muted-2); }

.search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.select {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  cursor: pointer;
  height: 40px;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.select:hover {
  border-color: var(--line-2);
  background: var(--panel-2);
  color: var(--muted);
}

.select:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.select select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  padding: 0 22px 0 0;
  cursor: pointer;
  outline: none;
  line-height: 1;
}

.select::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted-2);
  border-bottom: 1.5px solid var(--muted-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  transition: border-color 0.12s;
}

.select:hover::after,
.select:focus-within::after {
  border-color: var(--accent);
}

.select select option {
  background: var(--panel-2);
  color: var(--text);
  padding: 8px 12px;
  font-weight: 500;
}

.select select option:checked {
  background: var(--accent-soft);
  color: var(--accent);
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
  padding: 0 4px;
  font-variant-numeric: tabular-nums;
}

.pulse {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 1.6s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(95, 209, 122, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(95, 209, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(95, 209, 122, 0); }
}

.chips {
  display: flex;
  gap: 6px;
  padding: 16px 36px 4px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.chips::-webkit-scrollbar { height: 0; }

.chip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.chip:hover { border-color: var(--line-2); background: var(--panel-2); }

.chip.active {
  background: var(--accent);
  color: #0a0d11;
  border-color: var(--accent);
  font-weight: 600;
}

.chip .count {
  font-size: 11px;
  color: var(--muted);
  background: var(--panel-3);
  padding: 1px 7px;
  border-radius: 99px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.chip.active .count {
  background: rgba(10, 13, 17, 0.18);
  color: rgba(10, 13, 17, 0.7);
}

.quick {
  display: flex;
  gap: 12px;
  padding: 8px 36px 12px;
  flex-wrap: wrap;
  align-items: center;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 12px 6px 8px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--muted);
  user-select: none;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.toggle:hover { border-color: var(--line-2); }

.toggle input {
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--panel-2);
  cursor: pointer;
  position: relative;
  display: grid;
  place-items: center;
}

.toggle input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle input:checked::after {
  content: '';
  width: 7px;
  height: 4px;
  border-left: 1.6px solid #0a0d11;
  border-bottom: 1.6px solid #0a0d11;
  transform: rotate(-45deg) translate(1px, -1px);
}

.toggle:has(input:checked) { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 14px;
  padding: 12px 36px 60px;
  align-items: stretch;
}

.empty, .error {
  grid-column: 1/-1;
  text-align: center;
  color: var(--muted);
  padding: 80px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.skeleton {
  height: 196px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border: 1px solid var(--line);
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(400px 200px at 50% 0%, rgba(95, 209, 122, 0.06), transparent 60%);
  transition: opacity 0.2s;
}

.card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card:hover::before { opacity: 1; }

.card .icon {
  grid-area: icon;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}

.card .icon img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.card .icon .ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.card .body {
  grid-area: body;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card .head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card .name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.badge.ver b {
  color: var(--text);
  font-weight: 600;
  font-size: 11.5px;
}

.badge.ver i {
  font-style: normal;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1;
}

.badge.ver em {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
}

.badge.ver.proxy {
  border-color: rgba(95, 209, 122, 0.25);
  background: var(--accent-soft);
}

.badge.ver.proxy b { color: var(--accent); }
.badge.ver.proxy em { color: var(--accent-2); }

.motd {
  font-size: 12.5px;
  line-height: 1.45;
  color: #c8ccd4;
  white-space: pre-wrap;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.6em;
  word-break: break-word;
  font-family: 'Inter', sans-serif;
}

.motd.empty-motd { color: var(--muted-2); font-style: italic; }

.mc-bold { font-weight: 700; }
.mc-italic { font-style: italic; }
.mc-underline { text-decoration: underline; }
.mc-strike { text-decoration: line-through; }
.mc-obf { filter: blur(0.4px); opacity: 0.7; }

.players {
  display: grid;
  grid-template-columns: 1fr 84px;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.players .bar {
  height: 5px;
  background: var(--panel-3);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.players .bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 99px;
}

.players .bar.full > span { background: linear-gradient(90deg, var(--warn), #ff7a3d); }
.players .bar.empty > span { background: var(--line-2); }

.players .nums {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
  justify-self: end;
}

.players .nums b { color: var(--text); font-weight: 600; }

.card-footer {
  grid-area: footer;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}

.meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
  row-gap: 6px;
}

.meta > * { flex-shrink: 0; }

.meta .addr {
  font-family: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  color: #aac6b3;
  background: var(--panel-2);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  letter-spacing: -0.01em;
  cursor: copy;
  font-weight: 500;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.meta .addr:hover {
  background: var(--panel-3);
  border-color: var(--accent);
  color: var(--accent);
}

.meta .addr:active { transform: translateY(1px); }

button.addr { font: inherit; font-family: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace; }

.meta .ping {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.meta .ping .pdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.meta .ping.good { color: var(--accent); }
.meta .ping.mid { color: var(--warn); }
.meta .ping.bad { color: var(--bad); }

.meta .seen { color: var(--muted-2); }

.meta .cc {
  font-size: 14px;
  line-height: 1;
  padding: 2px 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

.actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 12.5px;
  border-radius: 8px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s, transform 0.06s, color 0.12s;
  letter-spacing: 0.01em;
}

.btn:active { transform: translateY(1px); }

.btn.primary {
  background: var(--accent);
  color: #0a0d11;
  box-shadow: 0 4px 12px -4px rgba(95, 209, 122, 0.4);
}

.btn.primary:hover { background: #6dde8a; }

.btn.ghost {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 7px 10px;
}

.btn.ghost:hover { background: var(--panel-3); border-color: var(--line-2); }

.btn svg { display: block; }

.foot {
  text-align: center;
  color: var(--muted-2);
  font-size: 11.5px;
  padding: 24px 36px 32px;
  letter-spacing: 0.02em;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

.foot-line { margin: 0 0 8px; }

.disclaimer {
  margin: 0 auto;
  max-width: 720px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted-2);
  opacity: 0.85;
}

#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: #0a0d11;
  padding: 11px 20px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 16px 40px -12px rgba(95, 209, 122, 0.5), 0 4px 10px -2px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 900px) {
  .topbar { padding: 18px 20px; }
  .toolbar { padding: 14px 20px; top: 110px; }
  .chips { padding: 12px 20px 4px; }
  .quick { padding: 6px 20px 10px; }
  .grid { padding: 8px 20px 40px; }
  .foot { padding: 12px 20px 24px; }
  .stats { width: 100%; gap: 6px; }
  .stat { flex: 1; min-width: 0; padding: 8px 12px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .stat b { font-size: 16px; }
  .card { padding: 14px; gap: 12px 14px; grid-template-columns: 56px 1fr; }
  .card .icon { width: 56px; height: 56px; }
  .card-footer { grid-template-columns: 1fr; gap: 10px; }
  .actions { justify-self: stretch; }
  .actions .btn { width: 100%; justify-content: center; }
  .controls { width: 100%; justify-content: space-between; }
  .toolbar { top: 130px; }
  .quick { gap: 8px; }
  .toggle { font-size: 12px; padding: 5px 10px 5px 6px; }
}

.nav { display: flex; align-items: center; gap: 10px; }
.navlink { color: var(--muted); text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 8px; transition: color 0.12s, background 0.12s; }
.navlink:hover { color: var(--text); background: var(--panel-2); }
.userchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; font-weight: 500; font-size: 13px; }
.userchip img, .userchip .avatar-ph { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0a0d11; font-weight: 700; font-size: 12px; }

.hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px 36px 12px; flex-wrap: wrap; }
.hero-text h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.02em; font-weight: 700; }
.hero-text p { margin: 0; color: var(--muted); font-size: 14px; max-width: 560px; }
.hero-stats { display: flex; gap: 8px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 13px; transition: background 0.12s, transform 0.08s, color 0.12s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #0a0d11; box-shadow: 0 4px 14px -6px rgba(95, 209, 122, 0.5); }
.btn.primary:hover { background: #6dde8a; }
.btn.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--panel-3); border-color: var(--line-2); }
.btn.danger { background: rgba(224, 99, 99, 0.12); color: var(--bad); border: 1px solid rgba(224, 99, 99, 0.3); }
.btn.danger:hover { background: rgba(224, 99, 99, 0.2); }

.toolbar { gap: 12px; }

.card { padding: 0; overflow: hidden; }
.card .banner { width: 100%; height: 96px; background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.card .card-main { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 16px 16px 12px; }
.card .ico { width: 64px; height: 64px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; image-rendering: pixelated; font-weight: 700; color: var(--muted); font-size: 22px; }
.card .ico.ph { background: linear-gradient(135deg, var(--panel-2), var(--panel-3)); color: var(--accent); }

.card .body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.card .head { display: flex; align-items: baseline; gap: 8px; }
.card .name { margin: 0; font-size: 15px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.status-pill { font-size: 10px; line-height: 1; }
.status-pill.on { color: var(--accent); }
.status-pill.off { color: var(--muted-2); }
.status-pill.pending { background: rgba(240, 160, 75, 0.12); color: var(--warn); padding: 2px 8px; border-radius: 99px; border: 1px solid rgba(240, 160, 75, 0.3); font-size: 11px; font-weight: 600; }
.status-pill.approved { background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 99px; border: 1px solid rgba(95, 209, 122, 0.3); font-size: 11px; font-weight: 600; }
.status-pill.rejected { background: rgba(224, 99, 99, 0.12); color: var(--bad); padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; }

.addr-line { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.card .addr { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; padding: 3px 9px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; color: #aac6b3; cursor: copy; font-weight: 500; }
.card .addr:hover { border-color: var(--accent); color: var(--accent); }
.card .ver { font-size: 11px; color: var(--muted); padding: 2px 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; }

.desc { margin: 4px 0 2px; font-size: 12.5px; color: #c8ccd4; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag { font-size: 10.5px; padding: 2px 8px; background: var(--panel-2); border-radius: 99px; color: var(--muted); border: 1px solid var(--line); }

.card-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--bg-2); }
.vote { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; transition: all 0.12s; }
.vote:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.vote.voted { background: var(--accent); color: #0a0d11; border-color: var(--accent); }
.vote.voted:hover { background: #6dde8a; }
.vote svg { display: block; }
.links { display: flex; gap: 10px; flex: 1; }
.links a { font-size: 12px; color: var(--muted); text-decoration: none; padding: 4px 8px; border-radius: 6px; }
.links a:hover { color: var(--accent); background: var(--panel-2); }
.card-foot .join { padding: 7px 14px; font-size: 12.5px; }

.card.offline { opacity: 0.7; }
.card.offline .ico { filter: grayscale(0.4); }

.modal { position: fixed; inset: 0; background: rgba(5, 7, 10, 0.7); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 1000; padding: 20px; animation: fadeIn 0.15s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; width: 100%; max-width: 420px; position: relative; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6); }
.modal-card.wide { max-width: 640px; }
.modal-card h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; }
.modal-card .sub { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.modal-close { position: absolute; top: 16px; right: 18px; background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 24px; padding: 0; line-height: 1; }
.modal-close:hover { color: var(--text); }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.form input, .form select, .form textarea { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 13.5px; transition: border-color 0.12s, background 0.12s; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); background: var(--panel); box-shadow: 0 0 0 3px var(--accent-soft); }
.form textarea { resize: vertical; min-height: 70px; font-family: inherit; }
.form input[type="file"] { padding: 8px; cursor: pointer; }
.form input[type="file"]::-webkit-file-upload-button { background: var(--panel-3); color: var(--text); border: 0; padding: 6px 12px; border-radius: 6px; font: inherit; font-size: 12px; cursor: pointer; margin-right: 10px; }
.form .row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-foot { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.form-foot a { color: var(--accent); text-decoration: none; font-weight: 600; }

.page { max-width: 980px; margin: 0 auto; padding: 28px 36px 60px; }
.page-title { font-size: 18px; letter-spacing: -0.01em; margin: 28px 0 14px; display: flex; align-items: center; gap: 10px; }
.page-title span { font-size: 12px; color: var(--muted); background: var(--panel-2); padding: 2px 9px; border-radius: 99px; font-weight: 500; }

.profile-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.prof-row { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.big-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.big-avatar.ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0a0d11; font-weight: 700; font-size: 28px; }
.prof-info h2 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.role-pill { font-size: 10px; padding: 2px 8px; background: var(--accent-soft); color: var(--accent); border-radius: 99px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.prof-info .muted { margin: 4px 0; color: var(--muted); font-size: 13px; }
.prof-info .bio { margin: 8px 0 0; color: #c8ccd4; font-size: 13.5px; }

.queue { display: flex; flex-direction: column; gap: 14px; }
.qcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.qcard .banner { width: 100%; height: 120px; background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.qbody { padding: 18px 20px; }
.qhead { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.qhead .ico { width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0; }
.qhead h3 { margin: 0; font-size: 16px; }
.qhead .addr { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--muted); }
.qcat { margin-left: auto; font-size: 11px; padding: 4px 10px; background: var(--panel-2); border-radius: 99px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.qbody .desc { margin: 8px 0; color: #c8ccd4; font-size: 13.5px; -webkit-line-clamp: unset; line-height: 1.55; }
.qmeta { font-size: 12px; color: var(--muted); margin: 12px 0; }
.qmeta a { color: var(--accent); text-decoration: none; }
.qactions { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.reject-reason { color: var(--bad); font-size: 12.5px; margin: 8px 0 0; padding: 8px 12px; background: rgba(224, 99, 99, 0.08); border-radius: 6px; border-left: 3px solid var(--bad); }

#toast.err { background: var(--bad); color: #fff; }
#toast { box-shadow: 0 16px 40px -12px rgba(0,0,0,0.6); }

@media (max-width: 720px) {
  .hero { padding: 20px; }
  .hero-stats { width: 100%; }
  .form .row.two { grid-template-columns: 1fr; }
  .modal-card { padding: 22px; }
  .qhead { flex-wrap: wrap; }
  .qcat { margin-left: 0; }
  .nav { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
}

.profile-page { max-width: 880px; padding-top: 0; }
.profile-hero { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 24px; }
.profile-hero .banner { width: 100%; height: 200px; background-size: cover; background-position: center; background-color: var(--panel-2); }
.profile-hero .banner.gradient { background: linear-gradient(135deg, #1a2233 0%, #16231a 50%, #1a2233 100%); position: relative; }
.profile-hero .banner.gradient::after { content:''; position:absolute; inset:0; background: radial-gradient(600px 200px at 30% 100%, rgba(95,209,122,0.15) 0%, transparent 70%); }
.hero-row { display: flex; gap: 20px; padding: 0 24px 24px; margin-top: -48px; align-items: flex-end; flex-wrap: wrap; }
.avatar { border-radius: 50%; object-fit: cover; border: 4px solid var(--panel); background: var(--panel-2); flex-shrink: 0; }
.avatar.ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0a0d11; font-weight: 800; }
.hero-info { flex: 1; min-width: 240px; padding-bottom: 6px; }
.hero-name { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.hero-handle { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.hero-bio { margin: 8px 0 8px; color: #c8ccd4; font-size: 14px; max-width: 600px; line-height: 1.55; }
.hero-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.hero-links a { font-size: 12.5px; color: var(--accent); text-decoration: none; padding: 4px 10px; background: var(--accent-soft); border-radius: 99px; border: 1px solid rgba(95,209,122,0.2); transition: background 0.12s; }
.hero-links a:hover { background: rgba(95,209,122,0.2); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; padding: 0 4px; overflow-x: auto; }
.tab { background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 12px 18px; font: inherit; font-weight: 500; font-size: 13px; border-bottom: 2px solid transparent; transition: color 0.12s, border-color 0.12s; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.prof-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px; }
.ps { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; }
.ps b { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.ps span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; font-weight: 500; }

.hint { color: var(--muted); font-size: 13px; line-height: 1.6; padding: 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.hint a { color: var(--accent); text-decoration: none; font-weight: 500; }
.hint.small { font-size: 11.5px; color: var(--muted-2); padding: 0; background: transparent; border: 0; margin: -6px 0 0; }

.settings-form { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.set-h { margin: 18px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.set-h:first-child { margin-top: 0; }
.form input:disabled { opacity: 0.5; cursor: not-allowed; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }

.sub-list { display: flex; flex-direction: column; gap: 12px; }
.sub-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.sub-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sub-head .ico { width: 42px; height: 42px; border-radius: 8px; flex-shrink: 0; }
.sub-head h3 { margin: 0; font-size: 15px; }
.sub-head .addr { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--muted); }
.sub-card .desc { margin: 6px 0; font-size: 13px; color: #c8ccd4; line-height: 1.5; }
.sub-card .reject-reason { color: var(--bad); font-size: 12.5px; margin: 8px 0; padding: 8px 12px; background: rgba(224,99,99,0.08); border-radius: 6px; border-left: 3px solid var(--bad); }
.sub-card .muted.small { color: var(--muted-2); font-size: 11.5px; margin: 8px 0 0; }

@media (max-width: 600px) {
  .hero-row { padding: 0 16px 18px; gap: 14px; }
  .avatar { width: 76px !important; height: 76px !important; font-size: 30px !important; border-width: 3px; }
  .hero-name { font-size: 18px; }
  .profile-hero .banner { height: 140px; }
  .settings-form { padding: 16px; }
}
