/* Оформление кабинета — в стиле главной страницы (тёмная тема, золотые кнопки, скруглённые карточки) */
:root {
  --bg: #0f1418; --card: #161d23; --line: #25303a; --text: #e7ecef; --muted: #9aa7b2;
  --gold: #d9a441; --gold2: #f0c46a; --green: #4fb37a; --red: #ef5d52; --blue: #5aa9ff; --radius: 14px;
  color-scheme: dark;                                     /* системные элементы (select, скроллбары, автозаполнение) — тёмные */
}
::placeholder { color: #8b97a2; opacity: 1; }
/* видимый фокус с клавиатуры (мышь не подсвечивает) */
:focus-visible { outline: 3px solid var(--gold2); outline-offset: 2px; }
.btn:focus-visible, button.bigbtn:focus-visible { outline-color: #fff; }
summary:focus-visible { outline-offset: 4px; border-radius: 6px; }
/* ссылка «К содержимому»: видна только при фокусе с клавиатуры */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: #1b1406; padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
a { color: var(--gold2); }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 0 20px; min-height: 60px; height: auto; flex-wrap: nowrap;
       background: rgba(15, 20, 24, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .3px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand svg { width: 38px; height: 38px; filter: drop-shadow(0 2px 6px rgba(217, 164, 65, .35)); }
nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
nav button { background: none; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 10px; cursor: pointer; font: inherit; font-size: 15px; white-space: nowrap; }
nav button:hover { color: var(--text); }
nav button.on { background: rgba(217, 164, 65, .14); color: var(--gold2); }
.who { color: var(--muted); display: flex; gap: 10px; align-items: center; white-space: nowrap; }
#lang { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font: inherit; }
main { max-width: 1000px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 30px; line-height: 1.2; margin: 6px 0 18px; } h2 { font-size: 19px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 24px; } .stat span { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); } .small { font-size: 14px; }
button.btn, a.btn { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1b1406; border: 0; border-radius: 12px; padding: 10px 20px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; box-shadow: 0 6px 20px rgba(217, 164, 65, .22); }
button.btn:hover, a.btn:hover { filter: brightness(1.06); }
a.btn.ghost { background: none; color: var(--text); border: 1px solid var(--line); box-shadow: none; font-weight: 600; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 7px 13px; font: inherit; cursor: pointer; }
button.ghost:hover { border-color: var(--muted); }
button.danger { color: var(--red); border-color: var(--red); }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.ok { background: rgba(62, 207, 142, .15); color: var(--green); } .bad, .badge.bad { background: rgba(239, 93, 82, .15); color: #ff7b72; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--muted); margin-right: 8px; }
.dot.on { background: var(--green); }
.warn { background: rgba(240, 180, 41, .15); color: var(--gold); }
.dot.off { background: var(--red); } .dot.stop { background: var(--gold); }
.code { font: 700 34px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 4px; color: var(--gold); margin: 10px 0; }
pre.out { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 10px 0 0; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; font-size: 13px; }
img.shot { max-width: 100%; border-radius: 8px; margin-top: 10px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
.scroll { overflow-x: auto; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 24px); font-size: 16px; background: var(--card); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
input[type=text], input[type=number], input[type=email], input[type=password], textarea, select { background: #0b1013; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; }
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(217, 164, 65, .55); outline-offset: 1px; }
@media (max-width: 640px) { .top { padding: 10px 12px; } .code { font-size: 26px; } }
.bigrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
button.bigbtn { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 16px 12px; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; }
button.bigbtn:hover:not(:disabled) { border-color: var(--muted); }
button.bigbtn.go:not(:disabled) { background: rgba(62, 207, 142, .15); border-color: var(--green); color: var(--green); }
button.bigbtn.stopb:not(:disabled) { background: rgba(239, 93, 82, .12); border-color: var(--red); color: var(--red); }
button.bigbtn:disabled { opacity: .45; cursor: default; }
ol.steps { margin: 6px 0 0; padding-left: 20px; color: var(--muted); } ol.steps li { margin: 6px 0; }
.charrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
button.chip { border-radius: 999px; padding: 5px 14px; }
button.chip.on { border-color: var(--gold); color: var(--gold2); opacity: 1; }
.rscreen { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
img.rscreen-img { width: 100%; max-width: 960px; cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; display: block; background: #0b0d0f; }
/* связки по IGG-аккаунту и график ресурсов */
.igg-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid #2c2c2c; border-left: 4px solid #3a4046; border-radius: 12px; background: #181c20; margin-top: 6px; }
.igg-head.on { border-left-color: var(--gold); }
.igg-title { font-weight: 700; font-size: 17px; }
.chart-box { padding: 10px 12px; }
.res-chart { width: 100%; height: auto; display: block; background: #0f1215; border-radius: 8px; }
.chart-leg { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); }
.chart-food { color: #e39a3b; } .chart-wood { color: #4fb37a; } .chart-stone { color: #b6c0c9; } .chart-gold { color: #f0c46a; }
.task-scope label { gap: 6px; } .task-scope { margin-top: 8px; }
/* «Спросить помощника» */
.ask-out { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0f1215; }
.ask-a { margin-top: 6px; white-space: pre-wrap; }
/* живые логи сессии под экраном */
.slog { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: #0f1215; overflow: hidden; }
.slog-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.slog-live { color: var(--green); font-size: 13px; }
.slog-lines { max-height: 220px; overflow-y: auto; padding: 6px 12px; font: 13px/1.5 ui-monospace, Consolas, monospace; font-size: 13px; }
.slog-ln { display: flex; gap: 10px; padding: 2px 0; border-bottom: 1px dashed rgba(255, 255, 255, .04); word-break: break-word; }
.slog-t { color: var(--muted); flex: none; }
/* смартфон: экран игры во всю ширину, точка нажатия считается по реальному размеру картинки, промахов нет */
@media (max-width: 640px) {
  .rscreen { padding: 6px; margin-left: -10px; margin-right: -10px; border-radius: 8px; }
  img.rscreen-img { max-width: none; }
  .slog-lines { max-height: 160px; font-size: 13px; }
}
/* шапка на узком телефоне (360px): только щит, кнопка меню и «Выйти» */
@media (max-width: 480px) { .top .brand { font-size: 0; gap: 0; } .top .brand svg { width: 32px; height: 32px; } .who > span:first-child { display: none; } .top { gap: 6px; } }
/* цели касания не меньше 44px на телефонах и планшетах */
@media (pointer: coarse), (max-width: 640px) {
  button, .btn, a.btn, select, input[type=text], input[type=number], input[type=email], input[type=password], input[type=search] { min-height: 44px; }
  button.chip, span.chip { min-height: 40px; padding: 6px 14px; font-size: 15px; }
  button.qbtn { width: 44px; height: 44px; }
  .note-x { width: 44px; height: 44px; }
  input.switch { width: 52px; height: 30px; border-radius: 15px; }
  input.switch::after { width: 24px; height: 24px; }
  input.switch:checked::after { left: 25px; }
  .nav-links a { padding: 10px 4px; font-size: 14px; }
}

.acc-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .acc-grid { grid-template-columns: 1fr; } }
input.acc-search { width: 100%; margin-bottom: 10px; }
.acc-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; color: var(--text); border: 1px solid transparent; border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; }
.acc-item:hover { border-color: var(--line); }
.acc-item.on { background: var(--bg); border-color: var(--gold); }
.acc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
input.acc-int { width: 70px; }
input.switch { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 12px; background: var(--line); position: relative; cursor: pointer; margin: 0; flex: none; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
input.switch:checked { background: var(--gold); }
input.switch:checked::after { left: 21px; }

.acc-tmplbar { flex-wrap: wrap; margin: 10px 0; }
select.acc-tmpl { min-width: 160px; }

.acc-tmplbar { flex-wrap: wrap; margin: 10px 0; }
select.acc-tmpl { min-width: 160px; }

.acc-chips, .acc-tags { flex-wrap: wrap; gap: 6px; margin: 8px 0; }
button.chip, span.chip { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 2px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.chip.on { border-color: var(--gold); }

.banners { max-width: 1100px; margin: 10px auto 0; padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); border-left: 4px solid var(--gold); }
.banner.warn { border-left-color: #e0a030; }
.banner.alert { border-left-color: #d9534f; }
a.btn { text-decoration: none; display: inline-block; }

/* кружок «?» с инструкцией (облачная ферма) */
button.qbtn { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid var(--gold); background: transparent; color: var(--gold2); font: inherit; font-weight: 700; cursor: pointer; line-height: 1; }
button.qbtn:hover { background: var(--gold); color: #1b1406; }
.helpbox { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(240, 180, 41, .06); }
.helprow { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; }
.helpnum { flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #1b1406; font-weight: 700; text-align: center; line-height: 24px; font-size: 13px; }

/* Статус синхронизации фермы (виджет на панели) */
.sync-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 10px 0; }
@media (max-width: 640px) { .sync-grid { grid-template-columns: repeat(2, 1fr); } }
.sync-card { border-radius: 10px; padding: 12px 14px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.sync-card .sync-num { font-size: 26px; line-height: 1.1; }
.sync-card span { font-size: 13px; color: var(--muted); }
.sync-ok { background: rgba(62, 207, 142, .12); border-color: var(--green); } .sync-ok .sync-num { color: var(--green); }
.sync-wait { background: rgba(240, 180, 41, .12); border-color: var(--gold); } .sync-wait .sync-num { color: var(--gold2); }
.sync-bad { background: rgba(239, 93, 82, .12); border-color: var(--red); } .sync-bad .sync-num { color: var(--red); }
.sync-all { background: rgba(152, 162, 179, .10); } .sync-all .sync-num { color: var(--text); }
.sync-acc summary { cursor: pointer; padding: 6px 0; font-weight: 600; }
.sync-log { margin-top: 6px; }
.sync-warn { padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }

.login-err { color: var(--red); font-weight: 600; margin: 8px 0; }

/* Вход, регистрация, восстановление пароля */
.auth-title { text-align: center; }
.auth-card { max-width: 460px; margin: 0 auto 24px; padding: 26px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; color: var(--muted); }
.field input { width: 100%; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: 14px; cursor: pointer; }
.check-row input { margin-top: 4px; }
.robot-box { display: flex; align-items: center; gap: 12px; background: #0b1013; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 6px 0 14px; max-width: 300px; }
.robot-box input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--green); cursor: pointer; flex: none; }
.robot-box label { flex: 1; cursor: pointer; user-select: none; }
.robot-logo { font-size: 22px; opacity: .8; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.auth-card .row { margin-top: 6px; }
@media (max-width: 640px) { nav button { padding: 6px 8px; font-size: 14px; } .top { gap: 8px; padding: 0 10px; } }

/* «Акции»: реферальная программа */
.promo-card { background: linear-gradient(135deg, rgba(212,168,67,.12), rgba(20,20,28,.9)); border: 1px solid rgba(212,168,67,.35); }
.promo-kicker { color: #d4a843; font-size: 12px; letter-spacing: .12em; font-weight: 700; }
.promo-big { font-size: 48px; font-weight: 800; color: #f0c24b; margin: 6px 0 10px; }
.ref-link { width: 100%; box-sizing: border-box; margin-top: 10px; }
.promo-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.promo-stat { border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px; text-align: center; }
.promo-stat.gold { border-color: rgba(212,168,67,.45); }
.promo-num { font-size: 26px; font-weight: 800; color: #f0c24b; }
@media (max-width: 520px) { .promo-stats { grid-template-columns: 1fr; } }

/* «Новости»: блог */
.blog-channel { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border: 1px solid rgba(212,168,67,.3); }
.blog-post h2 { margin: 10px 0 8px; }
.blog-meta { justify-content: space-between; align-items: center; }
.blog-body { white-space: pre-wrap; line-height: 1.55; color: var(--text, #e8e8ee); }
.blog-tag { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(212,168,67,.15); color: #f0c24b; border: 1px solid rgba(212,168,67,.35); }
.blog-tag.tag-Обновление { background: rgba(76,195,138,.12); color: #4cc38a; border-color: rgba(76,195,138,.35); }
.blog-tag.tag-Функционал { background: rgba(120,110,255,.14); color: #a79bff; border-color: rgba(120,110,255,.35); }

/* «База знаний» */
.kb-cat { margin: 18px 0 8px; font-size: 18px; color: #f0c24b; }
.kb-item summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style-position: inside; }
.kb-item p { margin: 10px 0 0; line-height: 1.55; }
.kb-item[open] { border-color: rgba(212,168,67,.4); }

/* «Поддержка» */
.sup-log { display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow-y: auto; padding: 8px 2px; }
.sup-row { display: flex; flex-direction: column; max-width: 85%; }
.sup-row.me { align-self: flex-end; align-items: flex-end; }
.sup-row.other { align-self: flex-start; }
.sup-bubble { padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.sup-row.me .sup-bubble { background: linear-gradient(135deg, #d4a843, #b88a2a); color: #1a1405; }
.sup-row.other .sup-bubble { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
.sup-kind { font-size: 12px; font-weight: 700; margin-bottom: 4px; opacity: .8; }
.sup-thread { cursor: pointer; }
button.sup-thread { display: block; width: 100%; text-align: left; font: inherit; color: inherit; }   /* обращение — кнопка: открывается и с клавиатуры */
.sup-thread:hover { border-color: rgba(212,168,67,.45); }

/* «Статистика» */
.stats-card table { width: 100%; }
.stats-card td:not(:first-child), .stats-card th:not(:first-child) { text-align: right; white-space: nowrap; }
.stats-card tr:nth-child(2) td { font-weight: 800; color: #f0c24b; }

/* Меню слева (как на сайте конкурента): широкий экран — постоянная боковая панель, узкий — выезжающая по кнопке ☰ */
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; width: 40px; height: 40px; font-size: 20px; cursor: pointer; }
#navBackdrop { display: none; }
nav { position: fixed; left: 0; top: 60px; bottom: 0; width: 230px; flex: none; flex-direction: column; gap: 4px; padding: 14px 12px;
      overflow-y: auto; overflow-x: hidden; background: var(--card); border-right: 1px solid var(--line); z-index: 9; }
nav:empty { display: none; }
nav button { width: 100%; text-align: left; padding: 10px 14px; font-size: 15px; }
nav button.on { border-left: 3px solid var(--gold); }
.top .who { margin-left: auto; }
body:has(#nav button) main { max-width: 1246px; padding-left: 246px; }
body:has(#nav button) .banners { margin-left: 230px; }
@media (max-width: 899px) {
  body:has(#nav button) .menu-btn { display: inline-block; }
  nav { top: 60px; width: 260px; transform: translateX(-105%); visibility: hidden; transition: transform .2s ease, visibility .2s; z-index: 30; box-shadow: 6px 0 24px rgba(0,0,0,.5); }   /* скрытое меню недоступно и для Tab */
  body.nav-open nav { transform: none; visibility: visible; }
  body.nav-open #navBackdrop { display: block; position: fixed; inset: 60px 0 0 0; background: rgba(0,0,0,.5); z-index: 20; }
  body:has(#nav button) main { max-width: 1000px; padding-left: 16px; }
  body:has(#nav button) .banners { margin-left: 0; }
}
/* статистика правил */
.stat-ok { color: var(--green); font-weight: 700; }
.stat-mid { color: var(--gold2); font-weight: 700; }
.stat-bad { color: var(--red); font-weight: 700; }

/* ============================== Dashboard: боковое меню, карточки ферм, серверы, тарифы ============================== */
body.dash { --side: 250px; }
/* основная область кабинета: строго правее боковой панели (не центрируется по всему окну, иначе заголовок уезжает под панель) */
body.dash:has(#nav button) main { max-width: 1480px; margin: 0; padding: 22px 28px 60px calc(var(--side) + 28px); }
@media (min-width: 1800px) { body.dash:has(#nav button) main { padding-left: calc(var(--side) + 48px); } }
body.dash nav { width: var(--side); background: #181818; border-right: 1px solid #2a2a2a; padding: 16px 12px; gap: 2px; overflow-y: auto; }
body.dash nav .nav-h { color: #6f7a84; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 14px 14px 6px; }
body.dash nav .nav-h:first-child { padding-top: 4px; }
body.dash nav button { display: flex; align-items: center; gap: 12px; border-left: 3px solid transparent; border-radius: 10px; padding: 10px 14px; color: #c3ccd3; }
body.dash nav button .ic { width: 22px; text-align: center; font-size: 17px; }
body.dash nav button:hover { background: #222; color: #fff; }
body.dash nav button.on { background: rgba(217, 164, 65, .12); border-left-color: var(--gold); color: var(--gold2); }
body.dash main { max-width: 1320px; padding-left: calc(var(--side) + 20px); }
body.dash .banners { margin-left: var(--side); }

/* карточки ферм */
.farm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.farm-card { background: #1e1e1e; border: 1px solid #2c2c2c; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, box-shadow .15s; }
.farm-card.on { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(217, 164, 65, .25), 0 10px 28px rgba(0, 0, 0, .35); }
.farm-card.alert { border-color: var(--red); }
.farm-card.wide { grid-column: 1 / -1; }
.fc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fc-name { font-size: 20px; font-weight: 700; color: #fff; line-height: 1.2; word-break: break-word; }
.fc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.fc-stat { display: flex; flex-direction: column; min-width: 0; }
.fc-stat b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.fc-stat b.fc-might { font-size: 20px; color: var(--gold2); }
.txt-ok { color: var(--green); } .txt-warn { color: var(--gold2); } .txt-bad { color: var(--red); }
.fc-group-row { display: flex; align-items: center; gap: 10px; }
.fc-group-row select { flex: 1; min-width: 0; }
.fc-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.fc-bar .btn, .fc-bar button { padding: 8px 14px; font-size: 14px; }
.fc-err { color: var(--red); flex-basis: 100%; }
.fc-hint { margin: 0; }
/* «Дела фермы»: как вкладка «Дела» в программе для ПК */
.fc-tasks { padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .03); }
.tasks-box { padding: 12px; }
.task-presets { margin-bottom: 8px; }
/* вкладки «Дела фермы»: антрацитовая сталь, у активной — бронзовая рамка */
.task-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 8px; margin-top: 6px; }
.task-tabs::-webkit-scrollbar { display: none; }
.task-tab { flex: 1 0 auto; white-space: nowrap; padding: 8px 12px; border-radius: 10px; border: 1px solid #3a4046; background: #1f2327; color: #c9ced3; font-size: 14px; cursor: pointer; }
.task-tab.on { border-color: var(--bronze, #a8905c); color: #f1e6c8; background: #262b30; box-shadow: inset 0 0 0 1px rgba(196, 173, 120, .35); }
.task-tab-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: #3a4046; color: #e6e6e6; font-size: 11px; line-height: 18px; text-align: center; }
.task-tab.on .task-tab-count { background: var(--bronze, #a8905c); color: #16181a; }
.task-tab-panel { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.task-tab-panel .task-row:first-child { border-top: 0; }
.task-group { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.task-group-title { padding: 6px 12px; font-weight: 600; color: var(--gold); background: rgba(240, 180, 41, .08); font-size: 13px; letter-spacing: .3px; }
.task-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); }
.task-row.on { background: rgba(79, 179, 122, .07); }
.task-main { display: flex; align-items: center; gap: 12px; flex: 1 1 200px; min-width: 0; cursor: pointer; }   /* тумблер + текст в одной подписи: клик по тексту переключает */
.task-text { flex: 1 1 160px; min-width: 0; }
.task-title { font-weight: 500; }
.task-every { flex: none; white-space: nowrap; }
.task-every input { margin: 0 4px; }
@media (max-width: 480px) { .task-every { flex-basis: 100%; padding-left: 54px; } }
.fc-toggle { gap: 8px; flex: none; cursor: pointer; color: var(--muted); }

/* серверы */
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; }
.srv-card { background: #1e1e1e; border: 1px solid #2c2c2c; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.srv-card.off { opacity: .7; }
.meter { height: 12px; border-radius: 6px; background: #2a2a2a; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 6px; transition: width .4s; }
.meter-fill.ok { background: var(--green); } .meter-fill.warn { background: var(--gold); } .meter-fill.bad { background: var(--red); }
.srv-line { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.alert-box { background: rgba(239, 93, 82, .12); border: 1px solid var(--red); color: #ffb4ad; border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.srv-farms { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-farm { border: 1px solid #333; border-radius: 999px; padding: 2px 10px; font-size: 13px; color: var(--muted); }
.chip-farm.on { border-color: var(--gold); color: var(--gold2); }

/* Q-таблица */
.table-wrap { overflow-x: auto; margin-top: 12px; }
td.q-cell { white-space: nowrap; }
td.q-pos b { color: var(--green); } td.q-neg b { color: var(--red); }

/* тарифы */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 18px 0; max-width: 820px; }
.plan-card { position: relative; background: #1e1e1e; border: 1px solid #2c2c2c; border-radius: 18px; padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; }
.plan-card.featured { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(217, 164, 65, .3), 0 14px 36px rgba(0, 0, 0, .4); }
.plan-card h2 { margin: 0; }
.plan-tag { position: absolute; top: -12px; right: 18px; background: var(--gold); color: #1b1406; font-weight: 700; font-size: 12px; padding: 3px 12px; border-radius: 999px; }
.plan-price { font-size: 44px; font-weight: 800; color: var(--gold2); line-height: 1.1; }
.plan-price span { font-size: 24px; }
.plan-list { list-style: none; padding: 0; margin: 8px 0 14px; display: flex; flex-direction: column; gap: 6px; }
.plan-list li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.plan-card button.btn { width: 100%; padding: 14px; font-size: 16px; }
.plan-card button.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

@media (max-width: 899px) {
  body.dash nav { width: 270px; }
  body.dash main, body.dash:has(#nav button) main { max-width: 1000px; margin: 0 auto; padding: 20px 16px 60px; }
  body.dash .banners { margin-left: 0; }
}
@media (max-width: 520px) { .farm-grid, .srv-grid { grid-template-columns: 1fr; } .plan-price { font-size: 36px; } }

.howto-text { white-space: pre-wrap; word-break: break-word; background: #151515; border: 1px solid #2c2c2c; border-radius: 12px; padding: 14px; font: inherit; }
.howto { border-color: var(--gold); }

.newver { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 12px;
  background: #1e1e1e; border: 1px solid var(--gold); border-radius: 14px; padding: 10px 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

/* меню по темам: сворачиваемые разделы */
body.dash nav .nav-h { display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: 0; border-left: 0;
  cursor: pointer; color: #7d8791; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 14px 14px 6px; border-radius: 0; }
body.dash nav .nav-h:hover { color: #c3ccd3; background: none; }
body.dash nav .nav-h .caret { transition: transform .15s; transform: rotate(-90deg); font-size: 12px; }
body.dash nav .nav-h.open .caret { transform: none; }
body.dash nav .nav-items { display: flex; flex-direction: column; gap: 2px; }
body.dash nav .nav-items[hidden] { display: none; }

/* обзор */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 4px; text-align: left; background: #1e1e1e; border: 1px solid #2c2c2c; border-radius: 16px; padding: 18px; color: var(--text); cursor: pointer; font: inherit; }
.kpi:hover { border-color: var(--gold); }
.kpi.ok { border-color: rgba(79, 179, 122, .5); } .kpi.warn { border-color: var(--gold); } .kpi.bad { border-color: var(--red); }
.kpi-big { font-size: 28px; color: var(--gold2); line-height: 1.2; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tile { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; background: #1e1e1e; border: 1px solid #2c2c2c; border-radius: 14px; padding: 16px; color: var(--text); cursor: pointer; font: inherit; }
.tile:hover { border-color: var(--gold); }
.tile-ic { font-size: 24px; }

/* значки меню, нижняя часть панели, шапка */
body.dash nav button .ic { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: rgba(255, 255, 255, .04); color: #9aa4ad; flex: none; }
body.dash nav button:hover .ic { color: #e7ecef; }
body.dash nav button.on .ic { color: #1b1406; background: linear-gradient(180deg, var(--gold2), var(--gold)); }
body.dash nav { display: flex; flex-direction: column; }
/* боковая панель: строгая сталь — антрацитовый фон, холодное северное золото (патинированная бронза), гравированные заголовки */
body.dash { --side: 268px; --bronze: #a8905c; --bronze2: #c4ad78; --steel: #1b1e21; --steel-line: #2a2f34; }
body.dash nav { background: var(--steel); border-right: 1px solid var(--steel-line); padding: 14px 12px 12px; }
.nav-brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 14px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--steel-line); margin-bottom: 8px; }
.nav-brand svg { flex: none; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .6)); }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.nav-brand-text b { font-size: 17px; letter-spacing: .6px; font-weight: 600; color: var(--bronze2); text-shadow: 0 -1px 0 rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .05); }
.nav-user { display: flex; align-items: center; gap: 12px; padding: 10px 10px; margin: 2px 0 8px; border: 1px solid var(--steel-line); border-radius: 10px; background: #202428; }
.nav-ava { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(180deg, var(--bronze2), #7d6a40); color: #15120b; font-weight: 700; font-size: 17px; flex: none; border: 1px solid #5c4f30; }
.nav-user-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.nav-user-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-text .ok { color: var(--green); background: none; padding: 0; } .nav-user-text .warn { color: var(--gold2); background: none; padding: 0; } .nav-user-text .bad { color: var(--red); background: none; padding: 0; }
.nav-login { margin: 2px 0 10px; width: 100%; text-align: center; padding: 11px 12px; background: linear-gradient(180deg, var(--bronze2), #8f7a4a); box-shadow: none; color: #15120b; }
body.dash nav .nav-h { color: #9aa4ad; font-size: 12.5px; font-weight: 500; letter-spacing: .18em; padding: 14px 10px 6px; text-shadow: 0 -1px 0 rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .04); }
body.dash nav .nav-h span:first-child::before { content: "ᛟ "; color: var(--bronze); opacity: .65; font-size: 11px; }
body.dash nav button { font-size: 15px; padding: 8px 10px; gap: 12px; border-left: 0; }
body.dash nav button.on { background: rgba(168, 144, 92, .13); color: #f2efe8; box-shadow: inset 2px 0 0 var(--bronze); }
body.dash nav button.on .ic { color: #15120b; background: linear-gradient(180deg, var(--bronze2), #8f7a4a); }
body.dash nav button .ic { background: #23272b; color: #8f99a2; }
.nav-user-text .ok { color: #8fb98a; } .nav-user-text .warn { color: var(--bronze2); }
.nav-foot { border-top: 1px solid var(--steel-line); }
.nav-install, .nav-q { border-color: var(--steel-line); background: #202428; }
.nav-install:hover, .nav-q:hover, .nav-links a:hover { border-color: var(--bronze); color: var(--bronze2); }
.brand svg { filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .6)); }
body.dash nav button.locked { color: #98a2ab; }
body.dash nav button.locked .ic { opacity: .7; }
.nav-label { flex: 1; text-align: left; }
.nav-lock { font-size: 12px; opacity: .55; }
.nav-foot { margin-top: auto; padding: 16px 4px 4px; border-top: 1px solid #2a2a2a; display: flex; flex-direction: column; gap: 12px; }
.nav-install { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 14px; border: 1px solid #333; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 600; }
.nav-install:hover { border-color: var(--gold); color: var(--gold2); }
.nav-quick { display: flex; gap: 10px; }
.nav-q { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; border: 1px solid #333; background: #1e1e1e; color: #c3ccd3; cursor: pointer; text-decoration: none; padding: 0; }
.nav-q:hover { border-color: var(--gold); color: var(--gold2); }
.nav-links { display: flex; gap: 14px; font-size: 13px; }
.nav-links a { color: #7d8791; text-decoration: none; } .nav-links a:hover { color: var(--gold2); }
.crumb { font-size: 17px; font-weight: 700; color: #fff; padding-left: 16px; margin-left: 6px; border-left: 1px solid #2c2c2c; white-space: nowrap; }
@media (max-width: 640px) { .crumb { display: none; } }

/* карточки-уведомления */
.note { display: flex; align-items: center; gap: 16px; background: #1b1d22; border: 1px solid #2c2c2c; border-left: 4px solid var(--blue); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; }
.note.warn { border-left-color: #f0a73a; background: #211c12; }
.note.bad { border-left-color: var(--red); background: #241517; }
.note.info { border-left-color: var(--blue); background: #131c28; }
.note-ic { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: rgba(255, 255, 255, .06); color: var(--blue); }
.note.warn .note-ic { color: #f0a73a; } .note.bad .note-ic { color: var(--red); }
.note-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.note-body b { font-size: 17px; }
.note-body span { color: var(--muted); }
.note .btn { flex: none; padding: 9px 16px; }
.note-x { flex: none; background: transparent; border: 1px solid #333; color: #8d97a1; border-radius: 10px; width: 36px; height: 36px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
@media (max-width: 640px) { .note { flex-wrap: wrap; } .note-body { flex-basis: 70%; } }

.tile-ic { color: var(--gold2); display: inline-flex; }

/* полосы прокрутки в тёмной теме: у меню и у страницы — тонкая тёмная (скрытая полоса прятала бы, что меню прокручивается) */
body.dash nav { scrollbar-width: thin; scrollbar-color: #3a424a #1b1e21; }
body.dash nav::-webkit-scrollbar { width: 6px; }
body.dash nav::-webkit-scrollbar-thumb { background: #3a424a; border-radius: 3px; }
html { scrollbar-width: thin; scrollbar-color: #3a424a #0f1418; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 10px; }
html::-webkit-scrollbar-track { background: #0f1418; }
html::-webkit-scrollbar-thumb { background: #3a424a; border-radius: 6px; border: 2px solid #0f1418; }

.terms-list { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.terms-card h2 { margin-top: 0; }

/* лицензии */
.lic-card { border-color: #2c2c2c; background: #1e1e1e; }
.lic-key { font: 700 20px/1.3 ui-monospace, Consolas, monospace; letter-spacing: 1px; color: var(--gold2); word-break: break-all; }
