/* Родная деревня · бот — тёплая тёмная тема в духе township.mobi: кремовый текст, коричневое дерево, зелёные кнопки игры */
:root {
  --bg: #1a1412; --bg-2: #201915; --card: #271e1a; --card-2: #30251f; --card-3: #3b2e26;
  --ink: #fbf0dc; --ink-2: #e6d4b8; --muted: #a8977f; --line: #3a2d25; --line-2: #4a3a2f;
  --green: #8fd14f; --green-d: #5e9c00; --green-l: rgba(143, 209, 79, .14);
  --gold: #ffd36b; --gold-l: rgba(255, 211, 107, .13);
  --red: #ff7d62; --red-l: rgba(255, 125, 98, .14);
  --blue: #8ccdf0; --blue-l: rgba(140, 205, 240, .13);
  --violet: #e0a453; --violet-l: rgba(224, 164, 83, .15);
  --ruby: #6fd3ff; --ruby-l: rgba(111, 211, 255, .12);
  --shadow: 0 1px 0 rgba(255, 236, 200, .04) inset, 0 12px 28px -16px rgba(0, 0, 0, .8);
  --r: 18px; --side: 268px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 600 14px/1.5 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1000px 520px at 85% -12%, rgba(143, 209, 79, .08), transparent 60%),
    radial-gradient(800px 520px at -10% 110%, rgba(255, 211, 107, .05), transparent 60%), var(--bg);
  background-attachment: fixed;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--bg); }
a { color: var(--green); }
img { vertical-align: middle; }
h2, h3 { margin: 0; font-weight: 900; letter-spacing: -.01em; }
code { background: var(--card-3); padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; justify-content: center; }
[hidden] { display: none !important; }
.pos { color: var(--green); font-weight: 900; }
.neg { color: var(--red); font-weight: 900; }

/* ---------- каркас ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px;
  background: linear-gradient(180deg, #221a16, #1c1512); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; z-index: 30;
}
.main { padding: 24px 30px 80px; max-width: 1440px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 6px 12px; }
.brand b { display: block; font-size: 18px; font-weight: 900; }
.brand small { color: var(--muted); font-size: 12px; }
.brand-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
  background: #5e9c00 url("https://township.mobi/Content/img/Buildings/granary.png") center/34px no-repeat; font-size: 0; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25), 0 8px 18px -10px #5e9c00; }
.side-label, .nav .grp { font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.nav button { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 12px; border: 0;
  background: none; color: var(--ink-2); font: inherit; font-weight: 800; cursor: pointer; text-align: left; }
.nav button .ic { width: 22px; text-align: center; font-size: 16px; }
.nav button:hover { background: var(--card); color: var(--ink); }
.nav button.on { background: var(--green-l); color: var(--green); }
.nav button.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--green); }
.nav .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #1a0703; font-size: 11px; font-weight: 900; display: grid; place-items: center; }
.side-foot { margin-top: auto; padding: 14px 8px 0; display: flex; justify-content: space-between; font-size: 12px; }
.conn { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.conn.on i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.conn.off i { background: var(--red); }
.conn b { font-weight: 700; }

/* аккаунты */
.acc { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; cursor: pointer; border: 1px solid transparent; }
.acc:hover { background: var(--card); }
.acc.on { background: var(--card-2); border-color: var(--line-2); }
.acc .ava { position: relative; width: 38px; height: 38px; }
.acc .ava img { width: 38px; height: 38px; border-radius: 12px; background: var(--card-3); object-fit: cover; }
.acc .ava .dot { position: absolute; right: -3px; bottom: -3px; border: 2px solid #131c14; }
.acc .nm { font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc .sub { color: var(--muted); font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.online { background: var(--green-d); }
.dot.running { background: var(--green); animation: pulse 2s infinite; }
.dot.error { background: var(--red); }
.dot.connecting, .dot.quiet { background: var(--gold); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(123, 209, 90, .55); } 70% { box-shadow: 0 0 0 7px rgba(123, 209, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(123, 209, 90, 0); } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 22px 24px; margin-bottom: 18px;
  background: linear-gradient(160deg, #2f7a06 0%, #4e9200 50%, #6aa516 100%); box-shadow: 0 20px 44px -28px #5e9c00; }
.hero::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -120px; bottom: -200px; background: rgba(255, 255, 255, .07); }
.hero.off { background: linear-gradient(160deg, #3b2e26, #4a3a2f); box-shadow: none; }
.hero.bad { background: linear-gradient(125deg, #7a2a1e, #b5523a); }
.hero.warn { background: linear-gradient(125deg, #7a5410, #b48224); }
.hero-top { position: relative; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero .ava { position: relative; }
.hero .ava img { width: 64px; height: 64px; border-radius: 18px; background: rgba(0, 0, 0, .2); border: 2px solid rgba(255, 255, 255, .25); }
.hero .ava .lv { position: absolute; right: -8px; bottom: -6px; background: #ffd23f; color: #3a2a00; font-weight: 900; font-size: 12px; padding: 1px 7px; border-radius: 99px; box-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.hero h2 { font-size: 24px; color: #fff; }
.hero .sub { color: rgba(255, 255, 255, .85); font-weight: 700; }
.hero .grow { flex: 1; min-width: 200px; }
.xp { height: 8px; border-radius: 8px; background: rgba(0, 0, 0, .22); margin-top: 8px; max-width: 460px; overflow: hidden; }
.xp i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #ffe066, #ffbf1f); transition: width .6s; }
.hero-btns { display: flex; gap: 8px; flex-wrap: wrap; position: relative; }
.hbtn { border: 0; border-radius: 12px; padding: 10px 16px; font: inherit; font-weight: 900; cursor: pointer; background: rgba(0, 0, 0, .2); color: #fff; }
.hbtn:hover { background: rgba(0, 0, 0, .3); }
.hbtn.go { background: #fff8e6; color: #2f7a06; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.hbtn.stop { background: rgba(120, 20, 10, .45); }
.res-row { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.res { background: rgba(0, 0, 0, .16); border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px; padding: 9px 14px; color: #fff; }
.res small { display: block; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.res b { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
.res img { width: 18px; height: 18px; margin-right: 4px; }

.page-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.page-head .ic { width: 42px; height: 42px; border-radius: 13px; background: var(--card-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 20px; }
.page-head h2 { font-size: 20px; }
.page-head .tools { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- сетки и карточки ---------- */
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card.hl { border-color: rgba(123, 209, 90, .55); box-shadow: 0 0 0 1px rgba(123, 209, 90, .25), var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; flex-wrap: wrap; }
.card-h h3 { font-size: 16px; margin-right: auto; }
.section-title { font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.kpi { display: flex; gap: 12px; align-items: center; }
.kpi .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; flex: none; }
.ic.g { background: var(--green-l); } .ic.y { background: var(--gold-l); } .ic.r { background: var(--red-l); } .ic.b { background: var(--blue-l); } .ic.v { background: var(--violet-l); } .ic.p { background: var(--ruby-l); }
.kpi small { display: block; color: var(--muted); font-weight: 800; font-size: 12px; }
.kpi b { font-size: 21px; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ---------- кнопки и контролы ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: var(--card-2);
  color: var(--ink); border-radius: 12px; padding: 8px 14px; font: inherit; font-weight: 800; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--muted); background: var(--card-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #4e9200, #2f7a06); border-color: #6aa516; color: #fff; box-shadow: 0 3px 0 #1f4f04; }
.btn.primary:hover { background: linear-gradient(180deg, #5ea800, #3a8a08); }
.btn.danger { color: var(--red); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #2b1d00; box-shadow: 0 3px 0 #a8801f; }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn.dashed { border-style: dashed; background: none; color: var(--muted); margin: 6px 0 4px; }
.btn.dashed:hover { color: var(--ink); border-color: var(--green); }
.btn.busy, .btn[disabled] { opacity: .5; pointer-events: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; background: var(--card-3); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--green-l); color: var(--green); }
.pill.warn { background: var(--gold-l); color: var(--gold); }
.pill.bad { background: var(--red-l); color: var(--red); }
.pill.info { background: var(--blue-l); color: var(--blue); }
.pill.v { background: var(--violet-l); color: var(--violet); }
.seg { display: inline-flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { padding: 6px 12px; border-radius: 9px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
.seg button.on { background: var(--card-3); color: var(--ink); }
.sw { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.sw input { opacity: 0; width: 0; height: 0; }
.sw span { position: absolute; inset: 0; border-radius: 99px; background: var(--card-3); border: 1px solid var(--line-2); cursor: pointer; transition: background .2s; }
.sw span::after { content: ""; position: absolute; left: 3px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #d9c8ad; transition: transform .2s; }
.sw input:checked + span { background: var(--green-d); }
.sw input:checked + span::after { transform: translateX(17px); background: #fff; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 11px; outline: none; }
input:focus, select:focus { border-color: var(--green-d); box-shadow: 0 0 0 3px var(--green-l); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { color: var(--muted); font-size: 12.5px; font-weight: 800; }
.form-error { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 8px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.filters button { border: 1px solid var(--line); background: var(--card-2); color: var(--ink-2); border-radius: 99px; padding: 4px 12px; font: inherit; font-weight: 800; font-size: 12.5px; cursor: pointer; }
.filters button.on { background: var(--green-l); color: var(--green); border-color: rgba(123, 209, 90, .35); }

/* поля настроек */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 4px 22px; }
.fld { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.fld .lbl { display: flex; flex-direction: column; min-width: 0; }
.fld .hint { color: var(--muted); font-size: 12px; font-weight: 600; }
.fld.ruby-fld { background: var(--ruby-l); border: 1px solid rgba(255, 107, 139, .3); border-radius: 12px; padding: 9px 12px; margin: 6px 0; }
.fld.ruby-fld .lbl > span:first-child { color: var(--ruby); }
.fld input[type=number] { width: 130px; text-align: right; }
.fld input[type=text] { width: 170px; }
.fld select { max-width: 250px; }

/* ---------- модули ---------- */
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.mod { background: var(--card-2); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; transition: border-color .2s, transform .15s; }
.mod:hover { transform: translateY(-1px); }
.mod.off { opacity: .5; }
.mod.busy { border-color: var(--green); box-shadow: 0 0 0 1px rgba(123, 209, 90, .3); }
.mod.has-err { border-color: rgba(240, 112, 95, .5); }
.mod .top { display: flex; align-items: center; gap: 10px; }
.mod .top img { width: 30px; height: 30px; padding: 4px; border-radius: 10px; background: var(--green-l); }
.mod .top b { flex: 1; }
.mod .sum { color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.mod .err { color: var(--red); font-size: 12px; }
.mod .bot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.mod .t { color: var(--green); font-weight: 900; font-variant-numeric: tabular-nums; }
.mcard { margin-bottom: 14px; }
.mcard .card-h img { width: 34px; height: 34px; padding: 5px; border-radius: 11px; background: var(--green-l); }
.mcard .desc { color: var(--muted); font-size: 13px; margin: -8px 0 10px; }

/* ---------- callout ---------- */
.callout { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-radius: 16px; margin-bottom: 16px; background: var(--red-l); border: 1px solid rgba(240, 112, 95, .3); }
.callout.info { background: var(--blue-l); border-color: rgba(108, 182, 240, .3); }
.callout.warn { background: var(--gold-l); border-color: rgba(242, 184, 75, .35); }
.callout .ci { font-size: 22px; }
.callout b { display: block; }
.callout .grow { flex: 1; }

/* подтверждения */
.appr { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.appr:last-child { border-bottom: 0; }
.appr .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--ruby-l); }
.appr .ic img { width: 18px; }
.appr .btns { display: flex; gap: 6px; }

/* ---------- таблицы ---------- */
.tbl-wrap { overflow: auto; max-height: 70vh; }
table { width: 100%; border-collapse: collapse; }
th { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: left; padding: 9px 10px; position: sticky; top: 0; background: var(--card); z-index: 1; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:hover td { background: var(--card-2); }
td img.ci { width: 18px; height: 18px; margin-right: 6px; }
.zero { color: var(--muted); }

/* ---------- графики и финансы ---------- */
.chart { width: 100%; height: 200px; display: block; }
.chart text { fill: var(--muted); font-size: 10px; font-family: inherit; }
.chart line { stroke: var(--line); }
.chart .gi-in { fill: var(--green); }
.chart .gi-out { fill: var(--red); opacity: .85; }
.chart rect.hit { fill: transparent; cursor: crosshair; }
.chart rect.hit:hover { fill: rgba(255, 255, 255, .04); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.catrow { display: grid; grid-template-columns: 30px minmax(110px, 1fr) 2fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.catrow:hover { background: var(--card-2); }
.catrow img { width: 22px; height: 22px; }
.catrow .bars { display: flex; flex-direction: column; gap: 3px; }
.catrow .bars i { display: block; height: 6px; border-radius: 6px; min-width: 2px; transition: width .6s; }
.catrow .bars .in { background: var(--green); }
.catrow .bars .out { background: var(--red); }
.catrow .sums { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.catrow .meta { color: var(--muted); font-size: 11.5px; }
.prog { height: 8px; border-radius: 8px; background: var(--card-3); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 8px; background: var(--green); transition: width .6s; }
.prog.done i { background: var(--gold); }

/* ---------- журнал ---------- */
.log { font: 500 12.5px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; max-height: 66vh; overflow-y: auto; }
.log .e { display: grid; grid-template-columns: 22px 64px 92px 1fr; gap: 8px; padding: 1px 4px; border-radius: 6px; }
.log .e:hover { background: var(--card-2); }
.log .t { color: var(--muted); }
.log .m { color: var(--blue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .l-warn { color: var(--gold); }
.log .l-error { color: var(--red); }
.log .l-debug { color: #7d6e5e; }
.log .day { grid-column: 1 / -1; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 8px 0 2px; font-family: "Nunito", sans-serif; font-weight: 900; }
.empty { text-align: center; padding: 34px 10px; color: var(--muted); }
.empty .em { font-size: 42px; display: block; margin-bottom: 6px; }

/* ---------- toast / modal / tip ---------- */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: var(--card-2); border: 1px solid var(--line-2); border-left: 5px solid var(--green); border-radius: 14px; padding: 11px 16px; max-width: 380px; box-shadow: var(--shadow); animation: tin .25s ease-out; }
.toast.err { border-left-color: var(--red); }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }
.modal-bg { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
.modal { width: min(420px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line-2); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.modal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.x { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; }
.tip { position: fixed; z-index: 90; pointer-events: none; background: var(--card-3); border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 10px; font-size: 12.5px; box-shadow: var(--shadow); }
.tip b { display: block; font-variant-numeric: tabular-nums; }

/* ---------- мобильная версия ---------- */
.mtop, .scrim { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 290px; transform: translateX(-104%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
  body.menu .side { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .5); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.menu .scrim { opacity: 1; pointer-events: auto; }
  .main { padding: 0 14px 60px; }
  .mtop { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; margin: 0 -14px 14px; padding: 10px 14px calc(10px); padding-top: max(10px, env(safe-area-inset-top));
    background: rgba(26, 20, 18, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .mtop b { flex: 1; font-size: 16px; }
  .burger { background: var(--card-2); border: 1px solid var(--line-2); color: var(--ink); border-radius: 10px; width: 38px; height: 36px; font-size: 18px; cursor: pointer; }
  .hero { padding: 18px; border-radius: 20px; }
  .res-row { grid-template-columns: repeat(2, 1fr); }
  .card { border-radius: 16px; }
  .log .e { grid-template-columns: 18px 54px 1fr; }
  .log .m { display: none; }
  #toasts { left: 14px; right: 14px; }
}


/* ---------- township: склады и товары ---------- */
.bar { height: 10px; border-radius: 10px; background: var(--card-3); overflow: hidden; margin: 6px 0 12px; }
.bar i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #6aa516, #8fd14f); transition: width .6s; }
.bar.hot i { background: linear-gradient(90deg, #e0a453, #ff7d62); }
.goods { display: flex; flex-wrap: wrap; gap: 6px; }
.goods span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.goods span b { color: var(--ink); font-variant-numeric: tabular-nums; }
.goods span img { width: 22px; height: 22px; }
.goods span.low { border-color: rgba(255, 125, 98, .6); }
.goods span.tool { border-style: dashed; }
.row { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row img.it { width: 26px; height: 26px; }
.items { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.items span { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ink-2); }
.items span img { width: 20px; height: 20px; }
.items span.ok { color: var(--green); }
.items span.no { color: var(--red); }.card-h img.ci { width: 30px; height: 30px; object-fit: contain; }
