/* Шрифты лежат вместе с панелью (npm @fontsource), без внешних сервисов */
@font-face { font-family: 'Unbounded'; font-weight: 500; font-display: swap; src: url('/fonts/unbounded-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 500; font-display: swap; src: url('/fonts/unbounded-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Unbounded'; font-weight: 700; font-display: swap; src: url('/fonts/unbounded-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 700; font-display: swap; src: url('/fonts/unbounded-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-weight: 400; font-display: swap; src: url('/fonts/golos-text-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 400; font-display: swap; src: url('/fonts/golos-text-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-weight: 500; font-display: swap; src: url('/fonts/golos-text-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 500; font-display: swap; src: url('/fonts/golos-text-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-weight: 600; font-display: swap; src: url('/fonts/golos-text-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-weight: 600; font-display: swap; src: url('/fonts/golos-text-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Панель модерации Arizona: «ночная пустыня» — тёмный индиго, песчаник, шалфей, роза. */
:root {
    --night: #1C1A2B;
    --surface: #27243A;
    --surface-2: #322E49;
    --line: #3D3857;
    --sand: #E2B983;
    --sage: #86B89C;
    --rose: #E46F8E;
    --text: #ECE7F5;
    --muted: #A39CBC;
    --radius-s: 6px;
    --radius-m: 12px;
    --display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
    --body: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--text); font: 15px/1.5 var(--body); }
a { color: var(--sand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sand); outline-offset: 2px; border-radius: 4px; }
img { display: block; }

/* --- Каркас --- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; }
.brand-name { font: 700 14px/1.2 var(--display); letter-spacing: 0.01em; }
.brand-sub { color: var(--muted); font-size: 12px; }
.server-select { width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { color: var(--text); padding: 9px 12px; border-radius: var(--radius-s); display: block; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--sand); }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.me .who { flex: 1; min-width: 0; }
.me .who div:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.level-tag { color: var(--muted); font-size: 12px; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; }
.link-btn:hover { color: var(--rose); }

.main { padding: 32px 40px 64px; max-width: 1180px; width: 100%; }
h1 { font: 700 26px/1.2 var(--display); margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font: 500 15px/1.3 var(--display); margin: 32px 0 12px; color: var(--text); }
.lead { color: var(--muted); margin: 0 0 24px; }
.muted { color: var(--muted); }
.avatar { border-radius: 50%; background: var(--surface-2); object-fit: cover; flex: none; }

/* --- Показатели: строка цифр без карточек --- */
/* Линии между ячейками — тенью справа и снизу; у крайних ячеек тень обрезается рамкой, пустых серых клеток нет */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.figure { padding: 16px 18px; box-shadow: 1px 1px 0 var(--line); }
.figure .num { font: 500 22px/1.2 var(--display); }
.figure .label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.num.good { color: var(--sage); }
.num.bad { color: var(--rose); }
.num.warn { color: var(--sand); }

/* --- Таблицы --- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 13px; background: var(--surface); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--surface); }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { display: block; color: var(--muted); }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; min-width: 80px; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--sand); }
.empty { color: var(--muted); padding: 18px; text-align: center; }
.more { background: none; border: 1px solid var(--line); border-radius: var(--radius-s); color: var(--sand); padding: 6px 14px; cursor: pointer; margin-top: 10px; }
.more:hover { border-color: var(--sand); }

/* --- Формы --- */
.search { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 16px; font-size: 16px; }
.search::placeholder { color: var(--muted); }
.period { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.chip.on { border-color: var(--sand); color: var(--sand); }
.period input[type=date] { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 5px 8px; color-scheme: dark; }

/* --- Профиль игрока: главный акцент страницы --- */
.hero { display: flex; gap: 24px; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); margin: 0; word-break: break-word; }
.hero .sub { color: var(--muted); margin-top: 6px; }
.hero .lvl { margin-left: auto; text-align: center; flex: none; }
.hero .lvl b { display: block; font: 700 48px/1 var(--display); color: var(--sand); }
.hero .lvl span { color: var(--muted); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.tag i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.badge { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.test { background: rgba(226, 185, 131, 0.15); color: var(--sand); }
.badge.out { background: rgba(228, 111, 142, 0.15); color: var(--rose); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.log li:last-child { border-bottom: 0; }
.log .meta { color: var(--muted); font-size: 13px; }
.type { font-weight: 600; }
.type.mute { color: var(--sand); }
.type.ban { color: var(--rose); }
.type.warn { color: #C9A3E8; }

/* --- Мини-график по дням --- */
.spark { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding: 8px 0; }
.spark div { flex: 1; background: var(--sand); border-radius: 3px 3px 0 0; min-height: 2px; opacity: 0.85; position: relative; }
.spark div:hover { opacity: 1; }
.spark-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }

/* --- Вход --- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-box { width: 100%; max-width: 420px; }
.login-box h1 { font-size: 30px; margin-bottom: 10px; }
.login-box p { color: var(--muted); margin: 0 0 28px; }
.discord-btn { display: inline-flex; align-items: center; gap: 10px; background: #5865F2; color: #fff; border: 0; border-radius: var(--radius-m); padding: 13px 22px; font-weight: 600; cursor: pointer; }
.discord-btn:hover { background: #4752C4; text-decoration: none; }
.error { color: var(--rose); margin-top: 18px; }
.loading { color: var(--muted); padding: 40px 0; }

@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; }
    .nav { flex-direction: row; }
    .me { margin: 0 0 0 auto; border: 0; padding: 0; }
    .main { padding: 20px 16px 48px; }
    .cols { grid-template-columns: 1fr; }
    .hero { flex-wrap: wrap; }
    .hero .lvl { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
