/* Портал для админов. Макет — Figma «NoNames Portal»: почти чёрный фон, тонкие линии вместо карточек,
   Geist для текста и Geist Mono для цифр. Оранжевый — только акцент, как курсор на аве */
:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --line: #1c1c1c;
  --line-strong: #2c2c2c;
  --text: #ededed;
  --muted: #8a8a8a;
  --faint: #525252;
  --accent: #ff7a1a;
  --online: #4ade80;
  --danger: #f05252;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --column: 880px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/20px var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #000; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---- лого: белая N и оранжевый курсор ---- */
.logo {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #16171b;
}

.logo::before {
  content: "N";
  position: absolute;
  left: 5px;
  top: 4px;
  font: 700 14px/14px var(--sans);
}

.logo::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 15px;
  width: 6px;
  height: 2px;
  background: var(--accent);
}

.brand { display: flex; align-items: center; gap: 10px; font: 500 14px/20px var(--mono); }

/* ---- элементы ---- */
.input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: none;
  font-size: 13px;
  transition: border-color 0.15s;
}

.input:focus { border-color: var(--muted); }
.input::placeholder { color: var(--faint); }

.button {
  height: 36px;
  padding: 0 14px;
  background: var(--text);
  color: var(--bg);
  border: 0;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.button:hover { background: #fff; }
.button:disabled { opacity: 0.3; cursor: default; }

.link { padding: 0; background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; }
.link:hover { color: var(--text); }

/* ---- вход ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login__form { width: 100%; max-width: 280px; display: grid; gap: 12px; }
.login__form .brand { margin-bottom: 20px; }
.login__label { color: var(--muted); font-size: 12px; line-height: 16px; }
.login__error { margin: -4px 0 0; color: var(--danger); font-size: 12px; line-height: 16px; }
.login__foot { position: fixed; left: 0; right: 0; bottom: 32px; text-align: center; color: var(--faint); font: 12px/16px var(--mono); }

/* ---- каркас ---- */
.header { border-bottom: 1px solid var(--line); }

.header__inner {
  max-width: calc(var(--column) + 32px);
  height: 56px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav { display: flex; gap: 24px; margin-right: auto; height: 100%; }

.nav a {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s;
}

.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

.content { max-width: calc(var(--column) + 32px); margin: 0 auto; padding: 48px 16px 96px; }

.title-row { display: flex; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.title { margin: 0 auto 0 0; font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: -0.4px; }
.title-row__meta { color: var(--faint); font: 12px/16px var(--mono); }

/* ---- цифры ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 40px; }
.stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat__value { font: 28px/32px var(--mono); letter-spacing: -1px; }
.stat__label { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 18px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--online); flex-shrink: 0; }

/* ---- фильтры и поиск ---- */
.toolbar { display: flex; align-items: center; gap: 24px; padding-bottom: 14px; }
.filters { display: flex; gap: 24px; margin-right: auto; }
.filter { display: flex; align-items: baseline; gap: 6px; padding: 0; background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; white-space: nowrap; }
.filter:hover { color: var(--text); }
.filter__count { color: var(--faint); font: 12px/16px var(--mono); }
.filter[aria-pressed="true"] { color: var(--text); }
.filter[aria-pressed="true"] .filter__count { color: var(--accent); }
.toolbar .input { width: 220px; height: 32px; }

/* ---- таблица игроков ---- */
.table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.table th { height: 36px; padding: 0; color: var(--faint); font-size: 12px; font-weight: 400; text-align: left; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.table td { height: 48px; padding: 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table .col-mod { width: 196px; }
.table .col-seen { width: 120px; text-align: right; }

.who { display: flex; align-items: center; gap: 12px; min-width: 0; padding-right: 16px; }
.who__head { width: 20px; height: 20px; flex-shrink: 0; border-radius: 3px; background: var(--line-strong); image-rendering: pixelated; }
.who__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who__check { color: var(--faint); font: 12px/16px var(--mono); }

.mod { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.mod__letter { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--text); font: 12px/1 var(--mono); }
.mod--s .mod__letter { border-color: var(--accent); color: var(--accent); }

.seen { color: var(--muted); font: 12px/16px var(--mono); }
.seen--online { display: inline-flex; align-items: center; gap: 7px; color: var(--online); font: 13px/18px var(--sans); }

.empty { padding: 48px 0; color: var(--faint); text-align: center; font-size: 13px; }
.error { padding: 16px 0; color: var(--danger); font-size: 13px; }

.skeleton { height: 48px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.skeleton::after { content: ""; position: absolute; left: 0; top: 18px; width: 30%; height: 12px; border-radius: 3px; background: var(--surface); }

/* ---- объявления ---- */
.compose { margin-bottom: 48px; }
.compose__text { height: auto; min-height: 120px; padding: 12px; resize: vertical; font-size: 14px; line-height: 20px; }
.compose__foot { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.compose__count { margin-right: auto; color: var(--faint); font: 12px/16px var(--mono); }
.compose__count--over { color: var(--danger); }
.compose__hint { color: var(--faint); font: 12px/16px var(--mono); }

.feed__title { padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.feed__title .mono { color: var(--faint); margin-left: 6px; }

.post { display: flex; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.post__date { flex: 0 0 112px; padding-top: 2px; color: var(--muted); font: 12px/16px var(--mono); }
.post__text { flex: 1; min-width: 0; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.post__delete { align-self: flex-start; color: var(--faint); }
.post__delete:hover, .post__delete--armed { color: var(--danger); }

/* ---- всплывашка ---- */
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: calc(100vw - 32px);
  padding: 9px 12px;
  background: var(--text);
  color: var(--bg);
  border-radius: 6px;
  font-size: 13px;
}

.toast--error { background: var(--danger); color: #fff; }

/* ---- телефон ---- */
@media (max-width: 640px) {
  .header__inner { gap: 20px; }
  .brand span { display: none; }
  .content { padding-top: 28px; }
  .title-row__meta, .compose__hint { display: none; }
  .stats { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 14px; }
  .toolbar .input { width: 100%; order: -1; }
  .filters { overflow-x: auto; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .table .col-mod { width: 34px; }
  .table .col-seen { width: 84px; }
  .mod__name { display: none; }
  .post { flex-wrap: wrap; gap: 6px 16px; }
  .post__date { flex: 1 0 auto; }
  .post__text { flex-basis: 100%; order: 3; }
}
