@view-transition { navigation: auto; }
/* NEUSKINS — Apple-style UI. Бараан/цайвар горим компьютерийн тохиргоогоор автоматаар солигдоно. */
:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #1c1c1e;          /* secondarySystemBackground */
  --panel2: #2c2c2e;         /* tertiary */
  --fill: rgba(118, 118, 128, .24);
  --line: rgba(84, 84, 88, .55);
  --text: #ffffff;
  --muted: rgba(235, 235, 245, .6);
  --faint: rgba(235, 235, 245, .3);
  --accent: #0a84ff;         /* systemBlue */
  --accent-press: #0071e3;
  --accent2: #ff9f0a;        /* systemOrange (анхааруулга) */
  --ok: #30d158; --bad: #ff453a;
  --glass: rgba(28, 28, 30, .72);
  --seg-on: #636366;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --radius: 18px; --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f2f2f7; --panel: #ffffff; --panel2: #f2f2f7;
    --fill: rgba(118, 118, 128, .12);
    --line: rgba(60, 60, 67, .18);
    --text: #1d1d1f; --muted: rgba(60, 60, 67, .6); --faint: rgba(60, 60, 67, .3);
    --accent: #007aff; --accent-press: #0062cc; --accent2: #c93400;
    --ok: #248a3d; --bad: #d70015;
    --glass: rgba(255, 255, 255, .72);
    --seg-on: #ffffff;
    --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  }
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; min-height: calc(100% + env(safe-area-inset-top)); background: var(--bg); }
body { min-height: 100vh; min-height: 100dvh; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font: 15px/1.47 var(--font); letter-spacing: -0.01em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h2 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px 96px; }

/* --- Frosted navigation bar --- */
header.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 calc(50% - 50vw) 28px; padding: 12px max(20px, calc(50vw - 540px));
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--line);
}
.logo { font-weight: 700; font-size: 21px; letter-spacing: -0.03em; color: var(--text); }
.logo b { background: linear-gradient(135deg, #c3073f, #e0245e 60%, #ff5c8a); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.mock { background: color-mix(in srgb, var(--accent2) 16%, transparent); color: var(--accent2); padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }

/* --- Cards --- */
.card { background: var(--panel); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- Inputs --- */
input, select, textarea {
  background: var(--fill); border: 0; color: var(--text);
  border-radius: var(--radius-sm); padding: 12px 14px; font: inherit; width: 100%;
  transition: box-shadow .15s ease, background .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }

/* --- Buttons (pill) --- */
.btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 11px 22px; font: inherit; font-weight: 600; letter-spacing: -0.01em;
  cursor: pointer; white-space: nowrap; text-decoration: none !important; display: inline-block;
  transition: background .15s ease, transform .1s ease, opacity .15s ease;
}
.btn:hover { background: var(--accent-press); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--fill); color: var(--accent); }
.btn.ghost:hover { background: color-mix(in srgb, var(--accent) 14%, var(--fill)); }

.hint { color: var(--muted); font-size: 13px; margin-top: 8px; }
.err { color: var(--bad); margin-top: 10px; min-height: 1em; font-size: 14px; }

/* --- Stat tiles (orders page) --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 24px; }
.step { background: var(--panel); border-radius: var(--radius); padding: 18px; font-size: 13px; color: var(--muted); box-shadow: var(--shadow); }
.step b { display: block; color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.step .total { color: var(--text); }

/* --- Skin grid --- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.item {
  background: var(--panel); border-radius: var(--radius); padding: 14px; cursor: pointer; user-select: none; position: relative;
  box-shadow: var(--shadow); outline: 2px solid transparent; outline-offset: -2px;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), outline-color .15s ease, box-shadow .18s ease;
}
.item:hover { transform: translateY(-2px); }
.item.sel { outline-color: var(--accent); }
.item .img { height: 112px; display: grid; place-items: center; margin-bottom: 10px; border-radius: var(--radius-sm);
  background: radial-gradient(120% 90% at 50% 20%, color-mix(in srgb, var(--accent) 10%, var(--panel2)), var(--panel2)); overflow: hidden; }
.item img { max-width: 92%; max-height: 100px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0,0,0,.35)); }
.item .ph { width: 100%; height: 112px; display: grid; place-items: center; color: var(--faint); font-weight: 700; letter-spacing: .08em; font-size: 13px; }
.item .name { font-size: 13px; font-weight: 500; min-height: 2.6em; line-height: 1.35; }
.item .meta { color: var(--muted); font-size: 12px; }
.item .price { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--text); margin-top: 6px; }
.item .price .meta { font-weight: 500; letter-spacing: 0; }
.item .check {
  position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--faint); background: var(--glass); display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: transparent; z-index: 1;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.item.sel .check { background: var(--accent); border-color: var(--accent); color: #fff; }

/* --- Floating summary bar --- */
.bar {
  position: sticky; bottom: 16px; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border: .5px solid var(--line); border-radius: 22px; padding: 14px 16px 14px 22px; margin-top: 18px; box-shadow: var(--shadow);
}
.bar .btn { padding: 13px 26px; font-size: 16px; }
.total { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.total small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0; }

/* --- Forms --- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { font-size: 13px; color: var(--muted); display: grid; gap: 6px; font-weight: 500; }
.form .full { grid-column: 1 / -1; }

/* --- Bot / notices --- */
.bot { display: flex; align-items: center; gap: 14px; background: var(--panel2); border-radius: var(--radius-sm); padding: 14px; }
.bot img, .bot .av { width: 48px; height: 48px; border-radius: 12px; background: var(--fill); }
.warnbox { background: color-mix(in srgb, var(--accent2) 12%, transparent); color: var(--text); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; }
.warnbox b { color: var(--accent2); }

/* --- Tables (inset grouped list feel) --- */
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 12px 10px; border-bottom: .5px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td input { background: var(--panel2); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--fill); }
.pill.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--accent2) 16%, transparent); color: var(--accent2); }
.pill.bad { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }

.hidden { display: none !important; }

/* --- Chips / segmented control --- */
.chip { background: var(--fill); border: 0; color: var(--text); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s ease, color .15s ease; }
.chip:hover { background: color-mix(in srgb, var(--accent) 16%, var(--fill)); }
.chip.on { background: var(--accent); color: #fff; font-weight: 600; }
#presets { background: var(--fill); padding: 3px; border-radius: 999px; gap: 2px !important; }
#presets .chip { background: transparent; padding: 6px 12px; color: var(--muted); }
#presets .chip:hover { color: var(--text); }
#presets .chip.on { background: var(--seg-on); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.25), 0 0 0 .5px var(--line); }

.pctbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--panel2); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: -4px; }
.pctbar input, .pctbar select { background: var(--panel); }

.pctlink { display: inline-block; margin-top: 6px; background: none; border: 0; padding: 2px 0; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.pctlink:hover { color: var(--accent); }
.riskbadge { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--accent2); background: color-mix(in srgb, var(--accent2) 16%, transparent); cursor: help; }
.item:has(.riskbadge) { outline-color: color-mix(in srgb, var(--accent2) 45%, transparent); }
.item.sel:has(.riskbadge) { outline-color: var(--accent); }
.risk { font-size: 12px; margin-top: 4px; line-height: 1.35; }
.risk.warn { color: var(--accent2); }
.risk.info { color: var(--muted); }
.msg { width: 100%; min-height: 260px; background: var(--panel2); color: var(--text); border-radius: var(--radius-sm); padding: 14px 16px; font-family: inherit; font-size: 14px; line-height: 1.55; resize: vertical; white-space: pre-wrap; }

/* ---------- Утас, жижиг дэлгэц ---------- */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .wrap { padding: 0 14px calc(120px + env(safe-area-inset-bottom)); }
  header.top { padding: calc(10px + env(safe-area-inset-top)) 14px 10px; margin-bottom: 18px; gap: 8px; }
  header.top > .row { gap: 6px; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  header.top > .row::-webkit-scrollbar { display: none; }
  header.top .chip, header.top .btn, header.top .mock { flex: none; font-size: 12px; padding: 7px 11px; }
  h2 { font-size: 24px; }
  .card { padding: 16px; border-radius: 16px; }
  .steps { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .step { padding: 14px; }
  .form { grid-template-columns: 1fr; }
  .row .btn { width: 100%; }
  input, select, textarea { font-size: 16px; } /* iPhone zoom-оос сэргийлнэ */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .item { padding: 10px; }
  .item .img, .item .ph { height: 84px; }
  .item img { max-height: 76px; }
  .item .price { font-size: 16px; }
  .item .price .meta { display: block; }
  .pctbar { padding: 10px; }
  #presets { width: 100%; justify-content: space-between; }
  #presets .chip { padding: 6px 8px; }

  /* Хүснэгт → карт */
  .mtable thead { display: none; }
  .mtable, .mtable tbody, .mtable tr, .mtable td { display: block; width: 100%; }
  .mtable tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 14px 0; border-bottom: .5px solid var(--line); }
  .mtable tbody tr:last-child { border-bottom: 0; }
  .mtable td { border: 0; padding: 0; text-align: left !important; }
  .mtable td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
  .mtable td.namecell, .mtable td.costcell, .mtable td.statuscell { grid-column: 1 / -1; }
  .mtable td.namecell::before { display: none; }

  .acts .btn { width: auto; padding: 9px 14px; font-size: 14px; }
  .bar { bottom: calc(8px + env(safe-area-inset-bottom)); padding: 10px 12px 12px; border-radius: 18px; gap: 8px; flex-wrap: wrap; }
  .bar > .row { gap: 12px !important; flex-wrap: nowrap; width: 100%; justify-content: space-between; padding: 0 4px; }
  .bar .t-usd, .bar .t-sell { display: none; }
  .bar .total { font-size: 17px; white-space: nowrap; }
  .bar .total small { font-size: 11px; }
  .bar .btn { width: 100%; padding: 12px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* =====================================================================
   v1.2 — Хялбар загвар: нэг багана, 3 алхам, утасны доод цэс
   ===================================================================== */
body.app { padding-bottom: env(safe-area-inset-bottom); }
.page { max-width: 720px; margin: 0 auto; padding: 18px 16px 150px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.center { text-align: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }
.btn.big { width: 100%; padding: 14px; font-size: 16px; }

/* Дээд хэсэг */
body.app header.top { margin: 0; padding: calc(10px + env(safe-area-inset-top)) max(16px, calc(50vw - 344px)) 10px; flex-wrap: nowrap; }
.topright { display: flex; align-items: center; gap: 10px; }
.mockdot { margin-left: 8px; font-size: 11px; font-weight: 600; letter-spacing: 0; color: var(--accent2); background: color-mix(in srgb, var(--accent2) 16%, transparent); padding: 3px 8px; border-radius: 999px; vertical-align: middle; -webkit-text-fill-color: var(--accent2); }
.iconbtn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--fill); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.iconbtn:hover { background: color-mix(in srgb, var(--accent) 16%, var(--fill)); }

/* Segmented control */
.seg { display: inline-flex; background: var(--fill); padding: 3px; border-radius: 12px; gap: 2px; }
.seg > * { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 9px; cursor: pointer; text-align: center; text-decoration: none !important; white-space: nowrap; }
.seg > .on { background: var(--seg-on); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.25), 0 0 0 .5px var(--line); }
.seg.full { display: flex; width: 100%; margin-bottom: 12px; }

/* Алхмууд */
.step-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-h h3 { margin: 0; flex: 1; font-size: 18px; color: var(--text); }
.err:empty { min-height: 0; margin: 0; }
.num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; display: grid; place-items: center; flex: none; }
#sellerForm { display: grid; gap: 10px; }
.summary { display: flex; align-items: center; gap: 12px; }
.av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #c3073f, #6f2232); }

/* Харилцагчийн товч */
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.person { display: inline-flex; align-items: center; gap: 8px; flex: none; border: 0; background: var(--fill); color: var(--text); font: inherit; font-size: 14px; padding: 5px 14px 5px 5px; border-radius: 999px; cursor: pointer; }
.person .av { width: 28px; height: 28px; font-size: 13px; }
.person:hover { background: color-mix(in srgb, var(--accent) 16%, var(--fill)); }

/* Жагсаалт */
.list { display: grid; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: .5px solid var(--line); width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; color: inherit; font: inherit; flex-wrap: wrap; }
.list > :last-child, .list > :last-child > .li { border-bottom: 0; }
.li.pick { cursor: pointer; border-radius: 0; }
.li.pick:hover .li-name { color: var(--accent); }
.thumb { width: 64px; height: 48px; flex: none; border-radius: 10px; display: grid; place-items: center; position: relative;
  background: radial-gradient(120% 90% at 50% 20%, color-mix(in srgb, var(--accent) 10%, var(--panel2)), var(--panel2)); }
.thumb img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); max-width: none; max-height: none; object-fit: contain; object-position: center; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); } /* дөрвөлжин (Steam 360×360) зураг ч хайрцгийн яг голд */
.thumb .count { position: absolute; right: -4px; bottom: -4px; font-size: 11px; font-weight: 700; background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 6px; }
.li-mid { flex: 1; min-width: 0; }
.li-name { font-size: 15px; font-weight: 500; line-height: 1.3; }
.li-name.one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); margin-top: 3px; align-items: center; }
.li-sub .ratio { font-weight: 600; }
.li-warn { font-size: 12px; color: var(--accent2); margin-top: 4px; line-height: 1.35; }
.li-warn.go { color: var(--ok); font-weight: 600; }
.li-warn.full { flex-basis: 100%; margin: -4px 0 0 76px; }
.li-right { text-align: right; flex: none; }
.tick { width: 26px; height: 26px; border-radius: 50%; flex: none; border: 1.5px solid var(--faint); display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff; }
.li.on .tick { background: var(--accent); border-color: var(--accent); }
input.cost { width: 128px; text-align: right; font-size: 16px; font-weight: 600; padding: 10px 12px; font-variant-numeric: tabular-nums; }

/* Хувийн товчнууд */
.pcts { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.pct { border: 0; background: var(--fill); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; padding: 10px 0; border-radius: 10px; cursor: pointer; }
.pct.on { background: var(--accent); color: #fff; }

details.more { margin-top: 10px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 6px 0; list-style: none; }
details.more summary::before { content: '＋ '; }
details.more[open] summary::before { content: '－ '; }
details.more input { margin-top: 6px; }

/* Доод мөр */
body.app .bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(688px, calc(100% - 32px)); margin: 0; flex-wrap: nowrap; padding: 12px 12px 12px 20px;
}
body.app .bar.hidden { display: none !important; }
.bar-l { min-width: 0; }
.bar-profit { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.app .bar .btn { padding: 13px 22px; font-size: 16px; flex: none; width: auto; }
body.app .bar { flex-wrap: nowrap; gap: 12px; }
#presets.pcts { background: none; padding: 0; border-radius: 0; gap: 6px !important; width: auto; justify-content: initial; }
#e2 { position: fixed; left: 0; right: 0; bottom: calc(96px + env(safe-area-inset-bottom)); pointer-events: none; }

/* Дууссан */
.done-h { text-align: center; margin-bottom: 14px; }
.done-h h2 { margin: 8px 0 4px; }
.okcircle { width: 56px; height: 56px; margin: 4px auto 0; border-radius: 50%; background: var(--ok); color: #fff; font-size: 28px; font-weight: 700; display: grid; place-items: center; }

/* Гүйлгээний хуудас */
.hero { text-align: center; padding: 26px 20px; }
.hero-n { font-size: 44px; font-weight: 700; letter-spacing: -0.04em; margin: 4px 0; font-variant-numeric: tabular-nums; }
.hero-sub { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.stats2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.card.mini { margin: 0; padding: 16px; }
.mini-n { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 2px 0; font-variant-numeric: tabular-nums; }
details.order { border-bottom: .5px solid var(--line); }
details.order:last-child { border-bottom: 0; }
details.order > summary { list-style: none; cursor: pointer; border-bottom: 0; flex-wrap: nowrap; }
details.order > summary::-webkit-details-marker { display: none; }
.order-body { padding: 0 0 14px 76px; display: grid; gap: 6px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.order-items { border-top: .5px solid var(--line); padding-top: 6px; display: grid; gap: 4px; }

/* Тохиргооны цонх */
.sheet-back { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0); display: flex; align-items: center; justify-content: center; transition: background .2s ease; }
.sheet-back.show { background: rgba(0,0,0,.45); }
.sheet { width: min(440px, calc(100% - 32px)); background: var(--panel); border-radius: 22px; padding: 18px 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.5); transform: translateY(16px) scale(.98); opacity: 0; transition: transform .2s ease, opacity .2s ease; }
.sheet-back.show .sheet { transform: none; opacity: 1; }
.sheet h3 { margin: 0 0 12px; text-align: center; }
.sheet-grab { display: none; width: 38px; height: 5px; border-radius: 3px; background: var(--faint); margin: -6px auto 10px; }
.group { background: var(--panel2); border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.li-set { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: .5px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; color: var(--text); font: inherit; text-align: left; }
.group > :last-child { border-bottom: 0; }
.li-set .inline { display: flex; align-items: center; gap: 6px; }
.li-set input { width: 90px; text-align: right; padding: 8px 10px; background: var(--panel); }
.li-set.danger { color: var(--bad); justify-content: center; cursor: pointer; font-weight: 600; }
.sheet-foot { text-align: center; font-size: 12px; margin: 4px 0 10px; }

/* Утасны доод цэс (зөвхөн жижиг дэлгэцэнд) */
.tabbar { display: none; }

@media (max-width: 720px) {
  .page { padding: 12px 12px calc(170px + env(safe-area-inset-bottom)); }
  body.app header.top { padding: calc(8px + env(safe-area-inset-top)) 16px 8px; }
  .topnav { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 8px max(8px, calc(env(safe-area-inset-bottom) - 12px));
    background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: .5px solid var(--line);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 500; text-decoration: none !important; padding: 4px 0; }
  .tabbar a.on { color: var(--accent); }
  body.app .bar { bottom: calc(62px + max(8px, calc(env(safe-area-inset-bottom) - 12px))); width: calc(100% - 20px); padding: 10px 10px 10px 16px; }
  .bar-profit { font-size: 17px; }
  body.app .bar .btn { padding: 12px 16px; font-size: 15px; width: auto; }
  #sumLine .long { display: none; }
  #e2 { bottom: calc(140px + env(safe-area-inset-bottom)); }
  .card { padding: 16px; margin-bottom: 12px; }
  .pcts { grid-template-columns: repeat(4, 1fr); }
  .thumb { width: 56px; height: 42px; }
  .li-warn.full { margin-left: 68px; }
  .order-body { padding-left: 0; }
  input.cost { width: 112px; }
  .two { grid-template-columns: 1fr; }
  .two > .btn { width: 100%; }
  .hero-n { font-size: 38px; }
  .sheet-back { align-items: flex-end; }
  .sheet { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); opacity: 1; }
  .sheet-grab { display: block; }
}

/* ---------- Wear-ийн өнгө, нэрийн 2 мөрт харагдац ---------- */
:root { --w-fn: #30d158; --w-mw: #a3e635; --w-ft: #ffd60a; --w-ww: #ff9f0a; --w-bs: #ff453a; }
@media (prefers-color-scheme: light) { :root { --w-fn: #1f9d4c; --w-mw: #65a30d; --w-ft: #b38600; --w-ww: #c2560a; --w-bs: #d70015; } }
.wear, .tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; line-height: 1; padding: 3px 6px; border-radius: 6px; flex: none; }
.wear.w-fn { color: var(--w-fn); background: color-mix(in srgb, var(--w-fn) 18%, transparent); }
.wear.w-mw { color: var(--w-mw); background: color-mix(in srgb, var(--w-mw) 18%, transparent); }
.wear.w-ft { color: var(--w-ft); background: color-mix(in srgb, var(--w-ft) 18%, transparent); }
.wear.w-ww { color: var(--w-ww); background: color-mix(in srgb, var(--w-ww) 18%, transparent); }
.wear.w-bs { color: var(--w-bs); background: color-mix(in srgb, var(--w-bs) 18%, transparent); }
.tag.st { color: #ff7a45; background: color-mix(in srgb, #ff7a45 18%, transparent); }
.tag.sv { color: #ffd60a; background: color-mix(in srgb, #ffd60a 18%, transparent); }
.thumb.w-fn { box-shadow: inset 0 -3px 0 var(--w-fn); }
.thumb.w-mw { box-shadow: inset 0 -3px 0 var(--w-mw); }
.thumb.w-ft { box-shadow: inset 0 -3px 0 var(--w-ft); }
.thumb.w-ww { box-shadow: inset 0 -3px 0 var(--w-ww); }
.thumb.w-bs { box-shadow: inset 0 -3px 0 var(--w-bs); }
.nm { min-width: 0; }
.nm-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nm-weapon { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nm-skin { font-size: 15px; font-weight: 600; line-height: 1.25; margin-top: 3px; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.li.pick:hover .nm-skin { color: var(--accent); }
.kv .nm { flex: 1; }
.kv .nm-skin { font-size: 14px; font-weight: 500; }
.li-sub { white-space: normal; }
@media (max-width: 720px) {
  .nm-skin { font-size: 15px; }
  input.cost { width: 104px; padding: 9px 10px; }
  .price-row .li-sub { font-size: 12px; gap: 2px 8px; }
}
/* Алхмын картууд хуучин .step (статистикийн хавтан)-ын саарал өнгө, жижиг фонтыг өвлөхгүй */
.card.step { color: var(--text); font-size: 15px; padding: 22px; }
@media (max-width: 720px) { .card.step { padding: 16px; } }

/* ---------- Зэрэглэлийн (rarity) өнгө — тоглоомын өнгө ---------- */
:root {
  --r-consumer: #b0c3d9; --r-industrial: #5e98d9; --r-milspec: #4b69ff; --r-restricted: #8847ff;
  --r-classified: #d32ce6; --r-covert: #eb4b4b; --r-contraband: #e4ae39; --r-gold: #e8c22e;
}
@media (prefers-color-scheme: light) { :root { --r-consumer: #7d8ea3; --r-gold: #c29d0b; } }
.r-consumer { --rc: var(--r-consumer); } .r-industrial { --rc: var(--r-industrial); } .r-milspec { --rc: var(--r-milspec); }
.r-restricted { --rc: var(--r-restricted); } .r-classified { --rc: var(--r-classified); } .r-covert { --rc: var(--r-covert); }
.r-contraband { --rc: var(--r-contraband); } .r-gold { --rc: var(--r-gold); }
.thumb[class*="r-"] {
  background: radial-gradient(120% 100% at 50% 110%, color-mix(in srgb, var(--rc) 45%, transparent), transparent 70%), var(--panel2);
  box-shadow: inset 0 -3px 0 var(--rc);
}
.rdot { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); flex: none; box-shadow: 0 0 6px color-mix(in srgb, var(--rc) 70%, transparent); }
.nm[class*="r-"] .nm-skin { color: color-mix(in srgb, var(--rc) 55%, var(--text)); }
.wear { color: var(--muted) !important; background: var(--fill) !important; }

/* ---------- Өнгө цөөтэй загвар: зөвхөн ашиг (ногоон) / алдагдал (улаан) ---------- */
.li-warn, .risk.warn, .riskbadge { color: var(--muted) !important; background: none !important; }
.li-warn.go { color: var(--text) !important; font-weight: 600; }
.pill.ok, .pill.warn { background: var(--fill); color: var(--text); }
.mockdot { color: var(--muted); -webkit-text-fill-color: var(--muted); background: var(--fill); }
.tag.st, .tag.sv { color: var(--muted); background: var(--fill); }
.num { background: var(--fill); color: var(--text); }
.av { background: var(--fill); color: var(--text); }
.warnbox { background: var(--panel2); }
.warnbox b { color: var(--text); }
.okcircle { background: var(--fill); color: var(--text); }
.li-sub .ratio { font-weight: 500; }
.li-sub .strong-t { color: var(--text); font-weight: 500; }
.thumb { background: var(--panel2) !important; box-shadow: none !important; }
.nm-skin { color: var(--text) !important; }
.li.pick:hover .nm-skin { color: var(--accent) !important; }
.li-right .muted.small { margin-top: 3px; }

/* Үнийн мөр: мэдээлэл 2 мөр, утсан дээр үнэ оруулах нүд доор нь */
.price-row .li-sub { display: block; }
.price-row .li-sub .line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
@media (max-width: 720px) {
  .price-row .li-right { flex-basis: 100%; display: flex; align-items: center; gap: 10px; padding-left: 68px; text-align: left; }
  .price-row input.cost { flex: 1; width: auto; text-align: left; }
  .price-row .li-right .muted.small { margin: 0; white-space: nowrap; }
  .price-row .li-warn.full { margin-top: 2px; }
}
.list { grid-template-columns: minmax(0, 1fr); }
.list > * { min-width: 0; }
@media (max-width: 720px) { .price-row input.cost { min-width: 0; width: 0; flex: 1 1 auto; } .price-row .li-right { min-width: 0; } }

/* Хувийн мөр: нэг жижиг мөр (утсан дээр хажуу тийш гүйлгэнэ) */
.pctline { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.basebtn { flex: none; border: 0; background: var(--fill); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; padding: 7px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.basebtn:disabled { opacity: .6; cursor: default; }
#presets.pcts { display: flex; gap: 4px !important; overflow-x: auto; scrollbar-width: none; margin: 0; flex: 1; min-width: 0; }
#presets.pcts::-webkit-scrollbar { display: none; }
.pct { flex: 1 0 auto; padding: 7px 10px; font-size: 13px; border-radius: 8px; }
@media (max-width: 720px) { .pcts { grid-template-columns: none; } .pct { padding: 7px 9px; } }

/* − 90% + тохируулагч */
.pctline { gap: 10px; }
.stepper { display: inline-flex; align-items: center; background: var(--fill); border-radius: 10px; padding: 3px; gap: 2px; flex: none; }
.stp { width: 36px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.stp:hover { background: var(--seg-on); }
.stp:active { transform: scale(.92); }
#pctVal { width: 64px; height: 32px; padding: 0; text-align: center; font-size: 16px; font-weight: 700; background: var(--seg-on); border-radius: 8px; font-variant-numeric: tabular-nums; }
.basebtn { height: 38px; }
#presets.stepper { width: auto !important; justify-content: flex-start !important; flex: none !important; border-radius: 10px !important; padding: 3px !important; gap: 2px !important; background: var(--fill) !important; overflow: visible; }

/* Хувийн хураангуй мөр + тохиргоон доторх stepper */
.pctsum { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--fill); border-radius: 10px; padding: 9px 12px; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.pctsum .link { font-weight: 500; }
.li-set .stepper input { width: 60px !important; height: 32px; padding: 0; text-align: center; font-size: 15px; font-weight: 700; background: var(--seg-on) !important; border-radius: 8px; }
.li-set .seg > * { padding: 6px 12px; font-size: 13px; }

.danger-link { color: var(--bad) !important; justify-self: start; margin-top: 6px; }

/* Өмнөх худалдагч хайх (chip-ийн оронд) */
.spick { position: relative; margin-bottom: 10px; }
.spick-list { margin-top: 6px; background: var(--panel2); border-radius: var(--radius-sm); overflow: hidden; }
.spick-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.spick-row + .spick-row { border-top: .5px solid var(--line); }
.spick-row:active, .spick-row:hover { background: var(--fill); }
.spick-t { min-width: 0; }
.spick-t .strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spick-none { padding: 12px 14px; }
.spick-row .av { width: 32px; height: 32px; font-size: 14px; background: var(--fill); }

/* v1.7: хайлт, жагсаалт дотроо гүйлгэнэ */
.tools { display: flex; gap: 8px; margin: 10px 0 6px; }
.tools input { flex: 1; min-width: 0; width: 0; }
.tools select { flex: none; width: auto; padding-right: 28px; }
#cnt { margin: 0 0 6px; }
.list.scroll { max-height: min(56vh, 560px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  border-radius: 14px; mask-image: linear-gradient(#000 calc(100% - 18px), transparent); padding-bottom: 14px; }
.bar-l { cursor: pointer; }

/* v1.7.1: 3-р алхамд skin хасах */
.price-row { position: relative; padding-right: 34px; }
.price-row .rm { position: absolute; top: 10px; right: 0; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: var(--panel2); color: var(--muted); font-size: 13px; line-height: 28px; padding: 0; cursor: pointer; }
.price-row .rm:hover { color: var(--text); }
@media (max-width: 720px) { .price-row .li-right { padding-right: 0; } }
.bar-l { flex: 1 1 auto; overflow: hidden; }
.bar-profit { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) { .bar-profit { font-size: 15px; } }
/* v1.8.1: 3-р алхмын мөрүүд таслагдахгүй, бүтэн харагдана */
.price-row .li-sub .line { white-space: normal; overflow: visible; text-overflow: clip; }

/* v1.8.1: 3-р алхам — нэг мөрт нэр + тодорхой задаргаа */
.pr-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.pr-name { font-weight: 600; font-size: 15px; }
.pr-float { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pr-grid { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin-top: 8px; font-size: 13px; }
.pr-k { color: var(--muted); }
.pr-v { text-align: right; font-variant-numeric: tabular-nums; }
.pr-v.strong { font-weight: 600; }
.price-row { align-items: flex-start; }
.price-row .li-right { align-self: center; }
@media (max-width: 720px) {
  .pr-grid { font-size: 12.5px; gap: 3px 10px; }
  .price-row .li-right { padding-left: 0; margin-top: 8px; }
}
@media (max-width: 720px) {
  .pr-v { white-space: nowrap; font-size: 12px; }
  .pr-k { font-size: 12px; line-height: 1.3; }
  .pr-grid { gap: 5px 8px; align-items: baseline; }
}

/* v1.8.2: 3-р алхам — карт + 3 нүд (Зарах → Төлөх → Ашиг) */
#selRows { gap: 10px; }
.pcard { background: var(--panel2); border-radius: 16px; padding: 12px; }
.pc-head { display: flex; align-items: center; gap: 10px; }
.pc-head .thumb { width: 44px; height: 44px; flex: none; border-radius: 10px; }
.pc-hx { flex: 1; min-width: 0; }
.pc-title { display: flex; align-items: center; gap: 5px; min-width: 0; }
.pc-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pc-meta { color: var(--muted); font-size: 12px; margin-top: 1px; font-variant-numeric: tabular-nums; }
.pcard .rm { position: static; flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--panel);
  color: var(--muted); font-size: 12px; padding: 0; cursor: pointer; }
.pc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.pc-tile { background: var(--panel); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.pc-k { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-v { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; display: flex; align-items: baseline; gap: 2px; }
.pc-sub { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.pc-tile.pay { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); }
.pc-tile.pay.fallback .pc-k { color: var(--text); }
.pc-tile.pay input.cost { all: unset; width: 100%; min-width: 0; font: inherit; font-weight: 650; color: var(--text); text-align: left; }
.pc-tile.pay:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.pc-tile .cur { color: var(--muted); font-weight: 500; }
.pc-warn { margin-top: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.pc-warn.open { white-space: normal; }
@media (max-width: 720px) {
  .pc-v { font-size: 14px; }
  .pcard { padding: 10px; }
  .pc-tile { padding: 7px 8px; }
}
.plist { display: grid; gap: 10px; }
.plist { grid-template-columns: minmax(0, 1fr); }
.pc-tile.pay input.cost { flex: 1 1 0; width: 0; }
.pc-head .thumb { background: var(--panel); }
@media (max-width: 720px) {
  .pc-k .src { display: none; }
  .pcard { padding: 9px; }
  .pc-tiles { gap: 5px; }
  .pc-tile { padding: 6px 7px; border-radius: 10px; }
  .pc-v { font-size: 13px; letter-spacing: -0.01em; }
  .pc-sub { font-size: 11px; }
}
.pc-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* v1.8.3: авсаархан карт */
.pcard { padding: 8px 10px; border-radius: 14px; }
.pc-head .thumb { width: 34px; height: 34px; border-radius: 8px; }
.pc-head { gap: 8px; }
.pc-title { flex-wrap: nowrap; }
.pc-name { font-size: 14px; -webkit-line-clamp: 1; }
.pc-meta { flex: none; font-size: 11.5px; margin: 0 0 0 2px; }
.pcard .rm { width: 24px; height: 24px; font-size: 11px; }
.pc-tiles { margin-top: 6px; gap: 5px; }
.pc-tile { padding: 5px 8px; border-radius: 9px; }
.pc-k { font-size: 10.5px; }
.pc-v { font-size: 13.5px; margin-top: 0; }
.pc-sub { font-size: 10.5px; margin-top: 0; }
.pc-warn { margin-top: 5px; font-size: 11px; }
.plist { gap: 6px; }
@media (min-width: 721px) {
  .pcard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); column-gap: 12px; align-items: center; }
  .pc-tiles { margin-top: 0; }
  .pc-warn { grid-column: 1 / -1; }
  .pc-head .rm { order: 3; }
  .pcard .pc-head { position: relative; }
}
@media (max-width: 720px) {
  .pcard { padding: 7px 8px; }
  .pc-tile { padding: 4px 6px; }
  .pc-v { font-size: 12.5px; }
}
.pcard { position: relative; }
.pcard .rm { position: absolute; top: 7px; right: 7px; }
.pc-head { padding-right: 28px; }
@media (min-width: 721px) {
  .pcard { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); padding-right: 40px; }
  .pcard .rm { top: 50%; transform: translateY(-50%); }
  .pcard:has(.pc-warn) .rm { top: 34px; }
  .pc-head { padding-right: 0; }
  .pc-title { flex-wrap: wrap; row-gap: 0; }
  .pc-name { -webkit-line-clamp: 2; }
  .pc-meta { flex-basis: 100%; margin: 0; }
}
@media (max-width: 720px) {
  .pc-title { flex-wrap: wrap; row-gap: 0; }
  .pc-name { -webkit-line-clamp: 2; }
}
/* v1.8.4: хураасан жагсаалт, дарахад дэлгэнэ */
.hlinks { display: flex; gap: 14px; margin-left: auto; }
.pcard { padding-top: 7px; padding-bottom: 7px; }
.pcard.open { padding-bottom: 9px; }
.pc-head { cursor: pointer; user-select: none; padding-right: 30px; }
.pc-flags { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; font-size: 12px; }
.pc-flag { color: var(--muted); }
.pc-quick { font-weight: 600; font-variant-numeric: tabular-nums; }
.pc-chev { color: var(--muted); font-size: 14px; width: 12px; text-align: center; }
.pcard .rm { top: 50%; transform: translateY(-50%); }
.pcard.open .rm { top: 7px; transform: none; }
@media (min-width: 721px) {
  .pcard { display: block; padding-right: 10px; }
  .pcard .pc-tiles { margin-top: 7px; }
  .pcard.open .rm, .pcard:has(.pc-warn) .rm { top: 7px; transform: none; }
  .pcard .rm { top: 50%; transform: translateY(-50%); }
  .pc-title { flex-wrap: nowrap; }
  .pc-meta { flex-basis: auto; margin-left: 4px; }
  .pc-name { -webkit-line-clamp: 1; }
}
/* гарчиг: шошго + нэр нэг урсгалд, урт бол доош орно */
.pc-title { display: block; line-height: 1.3; }
.pc-title .wear, .pc-title .tag { display: inline-block; vertical-align: 1px; margin-right: 5px; }
.pc-title .pc-name { display: inline; -webkit-line-clamp: unset; white-space: normal; }
.pc-title .pc-meta { display: inline; margin-left: 6px; white-space: nowrap; }
@media (max-width: 720px) {
  #step3 .step-h h3 { white-space: nowrap; }
  .hlinks { gap: 10px; font-size: 14px; }
}

.cfrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 2px 8px; }
.cfrow .link:disabled { opacity: .5; }

/* v1.9.2: хуулах / татах */
.exrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 2px; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; width: auto; }
.pc-copy { margin-top: 6px; border: 0; background: none; color: var(--accent); font-size: 12px; padding: 2px 0; cursor: pointer; }

/* v1.9.3: float шошго (wear-тай ижил хүрээ) */
.wear.fl { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.nm-top .wear.fl { margin-left: 4px; }

.bot.wait { color: var(--muted); font-size: 14px; }
.bot .link.small { margin-left: auto; font-size: 13px; }

.cleanrow { display: flex; justify-content: space-between; align-items: center; margin: 4px 4px 8px; }
.strong.dead { text-decoration: line-through; }
.cleanrow .link { font-size: 14px; white-space: nowrap; }
.cleanrow { gap: 10px; }

.upd-note { padding: 0 16px 12px; line-height: 1.35; }

/* v1.11: 7 хоногийн чиг хандлага */
.li-sub .trend { color: var(--muted); font-variant-numeric: tabular-nums; }

/* v1.11: Тайлан, Худалдагч */
.tabs3 { margin-bottom: 10px; }
.sellerchip { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 4px 10px; font-size: 14px; font-weight: 600; }
.sellerchip .link { font-size: 13px; font-weight: 500; }
.rep-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rep-tile { background: var(--panel2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.rep-n { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; margin: 16px 0 6px; padding-bottom: 16px; position: relative; }
.rbar-c { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.rbar { width: 100%; max-width: 26px; background: var(--ok); border-radius: 5px 5px 2px 2px; opacity: .85; }
.rbar.neg { background: var(--bad); }
.rbar-l { position: absolute; bottom: -16px; font-size: 10px; color: var(--muted); }
.rep-row { display: grid; grid-template-columns: 1.3fr .8fr 1.2fr 1.2fr 1.2fr; gap: 6px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; align-items: baseline; }
.rep-row > span:not(:first-child) { text-align: right; }
.rep-row:last-child { border-bottom: 0; }
.rep-row.head { color: var(--muted); font-size: 12px; padding-top: 6px; }
.pad { padding: 24px 0; }
.sq { width: 100%; margin-bottom: 10px; }
.seller-row { width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.seller-row .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--panel2); display: grid; place-items: center; font-weight: 700; flex: none; }
@media (max-width: 720px) {
  .rep-row { grid-template-columns: 1.2fr .6fr 1.1fr 1.1fr 1.1fr; font-size: 12px; gap: 4px; }
  .rep-n { font-size: 17px; }
}

/* v1.11.2: хураасан мөрөнд төлөх үнэ харагдана */
.pc-quick .pc-pay { color: var(--text); font-weight: 600; }
.pc-quick .pc-pct { font-weight: 600; }
.pc-head:hover .pc-chev { color: var(--accent); }

/* v1.12.1: phase шошго */
.wear.ph { letter-spacing: 0; }
.wear.ph.unk { opacity: .7; }
.nm-top .wear.ph { margin-left: 4px; }

/* v1.13: Гүйлгээ — CSBoard Sales шиг хүснэгт */
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 10px; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 0; background: var(--panel2); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.chips button::after { content: attr(data-n); margin-left: 6px; opacity: .7; font-variant-numeric: tabular-nums; }
.chips button.on { background: var(--text); color: var(--bg); }
.chips button.empty { opacity: .45; }
.opill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; white-space: nowrap; }
.p-wait { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.p-recv { background: color-mix(in srgb, #f5a524 18%, transparent); color: #d48806; }
.p-done { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.p-fail { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.orow { display: grid !important; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "th item st" "th item amt" "todo todo todo"; column-gap: 12px; row-gap: 2px; align-items: center; }
.orow .thumb { grid-area: th; width: 44px; height: 44px; }
.o-item { grid-area: item; min-width: 0; }
.o-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-sub { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-offer, .o-date { display: none; }
.o-amt { grid-area: amt; text-align: right; font-variant-numeric: tabular-nums; }
.o-amt .small { display: none; }
.o-st { grid-area: st; text-align: right; }
.o-profit { font-variant-numeric: tabular-nums; margin-top: 2px; }
.o-profit.dead { color: var(--muted); }
.o-todo { grid-area: todo; margin-top: 6px; }
.ohead { display: none; }
@media (min-width: 721px) {
  .ohead { display: grid; grid-template-columns: 44px minmax(0, 1fr) 110px 110px 80px 150px; column-gap: 14px; padding: 8px 0 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
  .ohead span:nth-child(4), .ohead span:nth-child(6) { text-align: right; }
  .orow { grid-template-columns: 44px minmax(0, 1fr) 110px 110px 80px 150px; grid-template-areas: "th item offer amt date st" "todo todo todo todo todo todo"; column-gap: 14px; }
  .o-offer { display: block; grid-area: offer; font-variant-numeric: tabular-nums; font-size: 13px; }
  .o-date { display: block; grid-area: date; font-size: 13px; font-variant-numeric: tabular-nums; }
  .o-amt .small { display: block; }
  .o-todo { margin-left: 56px; }
}
.opill { text-transform: none; letter-spacing: 0; font-size: 12px; }
.o-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
@media (min-width: 721px) {
  .ohead, .orow { grid-template-columns: 44px minmax(0, 1fr) 84px 96px 64px 128px !important; }
}

.syncrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -2px 4px 8px; }
.syncrow .link { font-size: 14px; white-space: nowrap; }
.syncrow .link:disabled { opacity: .5; }

/* v1.14.3: гүйлгээний skin жагсаалтад зураг */
.oi { align-items: center; }
.oi-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.thumb.sm { width: 40px; height: 40px; border-radius: 9px; flex: none; }
.oi .wear.fl { margin-left: 4px; }
/* v1.14.4: Тохиргоо цонх утсан дээр дээш доош гүйлгэгддэг */
.sheet { max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@media (max-width: 720px) {
  .sheet { max-height: calc(100dvh - env(safe-area-inset-top) - 12px); }
  .sheet #s_done { position: sticky; bottom: 0; z-index: 1; box-shadow: 0 -10px 18px var(--panel); }
}
.sheet-back { overscroll-behavior: contain; }
html.sheet-open, html.sheet-open body { overflow: hidden; }
/* v1.14.5: Тохиргоо хаах товч */
.sheet { position: relative; }
.sheet-x { position: sticky; top: 0; float: right; margin: -6px -6px 0 0; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--chip, rgba(127,127,127,.18)); color: var(--text); font-size: 15px; line-height: 32px; cursor: pointer; z-index: 2; }
/* v1.15.1: хуудас хооронд зөөлөн шилжих (iOS 18.2+ Safari, Chrome) — цэсүүд байрандаа үлдэнэ */
@view-transition { navigation: auto; }
header.top { view-transition-name: neu-top; }
nav.tabbar { view-transition-name: neu-tab; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .12s; }
/* v1.16.0: худалдагчийн эрсдэлийн тэмдэг */
.srisk { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rtag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--fill, rgba(127,127,127,.14)); color: var(--muted, #8e8e93); }
.rtag.new { color: var(--text); }
.rtag.warn { color: #ff9f0a; background: rgba(255,159,10,.14); }
.rtag.bad { color: var(--bad, #ff453a); background: rgba(255,69,58,.14); }
.bk-in { display: flex; flex-direction: column; gap: 6px; max-width: 190px; }
.bk-in input { width: 100%; }
/* v1.16.1: Тохиргоо — холболтууд нэг хэсэгт эвхэгдэнэ */
details.conn > summary { list-style: none; cursor: pointer; }
details.conn > summary::-webkit-details-marker { display: none; }
details.conn .chev { color: var(--muted); font-size: 22px; transition: transform .2s ease; }
details.conn[open] .chev { transform: rotate(90deg); }
details.conn:not([open]) > summary { border-bottom: 0; }
.ok-t { color: var(--ok, #30d158); font-weight: 600; }
.warn-t { color: #ff9f0a !important; }
.keybox { display: flex; align-items: center; gap: 10px; }
.keybox input, .keybox .bk-in { max-width: 180px; }
.keybox:not(.set) > .ok-t, .keybox:not(.set) > [data-edit] { display: none; }
.keybox.set > input, .keybox.set > .bk-in { display: none; }
.keybox.set > [data-save] { display: none; }
.keybox input { width: 140px; text-align: left; }

/* ===================================================================
   v1.17.0 — "Blueprint" загвар (shadcn/ui-ийн хэв маяг, NEUSKINS-д тааруулсан)
   Хар-цагаан, нимгэн хүрээ, чимээгүй. Өнгө зөвхөн ашиг/алдагдал, анхааруулгад.
   =================================================================== */
:root {
  --bg: #0a0a0a;
  --panel: #111111;
  --panel2: #171717;
  --fill: #1f1f1f;
  --line: #262626;
  --text: #fafafa;
  --muted: #a3a3a3;
  --faint: #5c5c5c;
  --accent: #fafafa;
  --accent-press: #e5e5e5;
  --on-accent: #0a0a0a;
  --link: #fafafa;
  --glass: rgba(10, 10, 10, .78);
  --seg-on: #262626;
  --shadow: 0 0 0 1px var(--line), 0 1px 3px rgba(0,0,0,.35);
  --radius: 20px; --radius-sm: 12px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f5; --panel: #ffffff; --panel2: #fafafa;
    --fill: #f0f0f0; --line: #e5e5e5;
    --text: #0a0a0a; --muted: #737373; --faint: #a3a3a3;
    --accent: #0a0a0a; --accent-press: #262626; --on-accent: #fafafa; --link: #0a0a0a;
    --glass: rgba(255, 255, 255, .8);
    --seg-on: #ffffff;
    --shadow: 0 0 0 1px var(--line), 0 1px 3px rgba(0,0,0,.06), 0 1px 2px -1px rgba(0,0,0,.06);
  }
}
body { font-size: 14.5px; letter-spacing: -0.006em; }
h2 { font-weight: 600; letter-spacing: -0.035em; }
h3 { font-weight: 600; letter-spacing: -0.02em; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration: underline; }

/* Карт: нимгэн хүрээ, бараг үл мэдэгдэх сүүдэр */
.card { border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(0,0,0,.08); padding: 20px; }
.group { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.li-set { border-bottom-color: var(--line); border-bottom-width: 1px; }

/* Товчнууд: үндсэн нь цагаан (бараан горимд) / хар (цайвар горимд) */
.btn { background: var(--accent); color: var(--on-accent); font-weight: 500; border-radius: 14px; }
.btn:hover { background: var(--accent-press); }
.btn.ghost { background: var(--fill); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--panel2); }
.chip { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; }
.chip:hover { background: var(--fill); }
.chip.on { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.link, button.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.danger-link, .li-set.danger { color: var(--bad) !important; }

/* Оруулах нүд: саарал дүүргэлт, фокус дээр нимгэн цагираг */
input, select, textarea { background: var(--fill); border-radius: 12px; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 1px var(--muted), 0 0 0 4px color-mix(in srgb, var(--text) 10%, transparent); }

/* Сегмент (таб) */
.seg { background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; }
.seg > .on { background: var(--seg-on); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.2); }

/* Толгой, доод цэс */
header.top, nav.tabbar { border-color: var(--line); border-width: 1px; }
.iconbtn { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.iconbtn:hover { background: var(--fill); }
.tabbar a.on { color: var(--text); }
.tabbar a.on svg { stroke-width: 2.2; }

/* Pill / badge: зөвхөн ашиг, алдагдал, анхааруулгад өнгө */
.pill { background: transparent; box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }

/* Тоо: жигд өргөн цифр */
.stats2 b, .big, .num, input.cost, .tile b { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* Тохиргоо цонх */
.sheet { background: var(--panel); border: 1px solid var(--line); }
.sheet .group { background: var(--panel2); }
.sheet-x { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }

::selection { background: color-mix(in srgb, var(--text) 22%, transparent); }
.li.on .tick { color: var(--on-accent); }
/* 3-р алхамын мөр: утсан дээр нэр, шошго бүтэн өргөнөөр (баганад шахагдахгүй) */
@media (max-width: 720px) {
  .pcard { display: block; padding-right: 10px; }
  .pc-hx { flex: 1; min-width: 0; }
  .pc-flags { flex: none; }
  .pcard .pc-tiles { margin-top: 7px; }
  .pc-title .pc-name { font-size: 14px; }
}
@media (max-width: 720px) {
  .pc-head { flex-wrap: wrap; row-gap: 4px; }
  .pc-hx { flex: 1 1 calc(100% - 50px); }
  .pc-flags { margin-left: 42px; width: calc(100% - 42px); justify-content: flex-start; }
  .pc-flags .pc-chev { margin-left: auto; }
}

/* v1.18.0: Анимэйшн эффектүүд */
.fx { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(0,0,0,0); transition: background .3s ease; cursor: pointer; }
.fx.in { background: rgba(0,0,0,.42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.fx.out { background: rgba(0,0,0,0); }
.fx-card { position: relative; z-index: 2; min-width: 240px; max-width: calc(100vw - 48px); padding: 28px 28px 24px; text-align: center; border-radius: 24px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.45);
  transform: translateY(14px) scale(.92); opacity: 0; transition: transform .45s cubic-bezier(.2,1.3,.4,1), opacity .25s ease; }
.fx.in .fx-card { transform: none; opacity: 1; }
.fx.out .fx-card { transform: translateY(-8px) scale(.97); opacity: 0; transition-duration: .25s; }
.fx-t { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin-top: 14px; }
.fx-s { color: var(--muted); font-size: 14px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.fx-ic { width: 76px; height: 76px; fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; display: block; margin: 0 auto; }
.fx-cv { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1; pointer-events: none; }
/* ✓ зурагдах */
.fx-check { stroke: var(--ok); }
.fx-check circle, .fx-up circle { stroke-dasharray: 170; stroke-dashoffset: 170; }
.fx-check path { stroke-dasharray: 40; stroke-dashoffset: 40; }
.fx.in .fx-check circle, .fx.in .fx-up circle { animation: fx-draw .6s .1s ease-out forwards; }
.fx.in .fx-check path { animation: fx-draw .35s .55s ease-out forwards; }
.fx.in .fx-check { animation: fx-pop .5s .8s ease-out; }
/* ✈ нисэх */
.fx-plane { stroke: var(--text); }
.fx.in .fx-plane { animation: fx-fly 1.6s .15s cubic-bezier(.4,0,.2,1) both; }
/* ↑ шинэчлэлт */
.fx-up { stroke: var(--text); }
.fx-up path { stroke-dasharray: 60; stroke-dashoffset: 60; }
.fx.in .fx-up path { animation: fx-draw .4s .5s ease-out forwards, fx-rise .9s .9s ease-in-out 2; }
@keyframes fx-draw { to { stroke-dashoffset: 0; } }
@keyframes fx-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes fx-fly {
  0% { transform: translate(-46px, 30px) rotate(-12deg) scale(.6); opacity: 0; }
  25% { opacity: 1; }
  55% { transform: translate(0, 0) rotate(0) scale(1); }
  80% { transform: translate(6px, -4px) rotate(4deg) scale(1); }
  100% { transform: translate(0, 0) rotate(0) scale(1); }
}
@keyframes fx-rise { 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .fx-card, .fx-ic, .fx-ic * { animation: none !important; transition: none !important; stroke-dashoffset: 0 !important; } }
/* v1.18.1: Сарын зорилт */
.card.goal { padding: 16px 18px; }
.goal-h { display: flex; justify-content: space-between; align-items: center; }
.goal-f { display: flex; justify-content: space-between; align-items: baseline; }
.goal-f #goalPct { font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.goal-f #goalSub { font-variant-numeric: tabular-nums; }
.goal-n { margin: 4px 0 10px; font-variant-numeric: tabular-nums; }
.goal-n b { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.goal-bar { position: relative; height: 8px; border-radius: 99px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); overflow: visible; margin-bottom: 8px; }
.goal-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--text); width: 0; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.goal-bar s { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--muted); opacity: .7; }
.goal.done .goal-bar i { background: var(--ok); }
.goal.done #goalPct { color: var(--ok); }
.hero .btn.wd { margin-top: 12px; padding: 9px 22px; font-size: 14px; text-decoration: none !important; }
.hero .bal-mnt { color: var(--muted); margin-bottom: 10px; }
.hero .bal-row { display: flex; justify-content: space-between; gap: 12px; max-width: 320px; margin: 4px auto 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.goal-r { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.goal-r b { font-size: 13px; font-weight: 600; }
.goal.done .goal-r b { color: var(--ok); }
.card.goal .goal-bar { margin-bottom: 2px; }
.goal-h { align-items: flex-start; }
.goal-r { flex-direction: column-reverse; align-items: flex-end; gap: 1px; line-height: 1.25; }
.goal-r b { font-size: 15px; }
.goal-h { align-items: baseline; }
.goal-pct { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.goal.done .goal-pct { color: var(--ok); }
.goal-n { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.goal-n #goalSub { white-space: nowrap; }
/* v1.18.5: балансын доорх 2 нүд */
.hero .bal-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 360px; margin: 14px auto 0; }
.hero .bal-tile { background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; padding: 10px 12px; text-align: left; }
.hero .bal-tile b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0 1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero .bal-tile .small { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hero .bal-mnt { margin-bottom: 0; }
.hero .bal-mnt { font-size: 16px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.hero .bal-pend { display: inline-flex; align-items: baseline; gap: 8px; margin-top: 14px; padding: 7px 14px; border-radius: 12px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero .bal-pend b { font-weight: 600; }
.hero .hero-n { font-weight: 600; letter-spacing: -0.045em; margin: 6px 0 2px; }
.hero .bal-mnt { font-size: 17px; color: var(--muted); margin: 0; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.hero .btn.wd { margin-top: 18px; }

/* v1.19.0: Анхааруулах цонх (анимэйшнтэй) */
.ask { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,0); transition: background .22s ease, backdrop-filter .22s ease; }
.ask.in { background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ask.out { background: rgba(0,0,0,0); }
.ask-card { width: min(360px, 100%); padding: 24px 20px 18px; border-radius: 22px; text-align: center; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,.5); transform: translateY(18px) scale(.9); opacity: 0;
  transition: transform .42s cubic-bezier(.2,1.35,.4,1), opacity .2s ease; }
.ask.in .ask-card { transform: none; opacity: 1; }
.ask.out .ask-card { transform: scale(.96); opacity: 0; transition-duration: .18s; }
.ask-ic { width: 52px; height: 52px; display: block; margin: 0 auto 12px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ask-ic .dot { fill: currentColor; stroke: none; }
.ask-warn .ask-ic { color: #ff9f0a; }
.ask-danger .ask-ic { color: var(--bad); }
.ask-info .ask-ic { color: var(--text); }
.ask-ok .ask-ic { color: var(--ok); }
.ask-ic path, .ask-ic circle:not(.dot) { stroke-dasharray: 130; stroke-dashoffset: 130; }
.ask.in .ask-ic path, .ask.in .ask-ic circle:not(.dot) { animation: fx-draw .5s .08s ease-out forwards; }
.ask-ic .dot { opacity: 0; }
.ask.in .ask-ic .dot { animation: ask-dot .25s .45s ease-out forwards; }
.ask.in.ask-warn .ask-ic, .ask.in.ask-danger .ask-ic { animation: ask-wobble .5s .5s ease-in-out; transform-origin: 50% 80%; }
.ask-t { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.ask-x { color: var(--muted); font-size: 14px; margin-top: 6px; line-height: 1.45; white-space: pre-line; }
.ask-l { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); text-align: left; font-size: 13px; line-height: 1.55; font-variant-numeric: tabular-nums; max-height: 38vh; overflow: auto; }
.ask-l > div + div { border-top: 1px solid var(--line); padding-top: 4px; margin-top: 4px; }
.ask-b { display: flex; gap: 10px; margin-top: 18px; }
.ask-b .btn { flex: 1; padding: 12px; }
.ask-b .btn.danger { background: var(--bad); color: #fff; }
.ask-card.shake { animation: ask-shake .38s ease; }
@keyframes ask-dot { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
@keyframes ask-wobble { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 50% { transform: rotate(7deg); } 75% { transform: rotate(-4deg); } }
@keyframes ask-shake { 0%,100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .ask-card, .ask-ic, .ask-ic * { animation: none !important; transition: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; } }
/* v1.20.0: Trade хүлээж авсан — төлбөрийн карт */
.paycard { cursor: default; }
.paycard .fx-card { width: min(360px, 100%); padding-bottom: 18px; }
.pay-rows { margin-top: 16px; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); }
.pay-row b { display: block; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pay-row.main b { font-size: 24px; }
.pay-profit { text-align: center; font-weight: 600; font-size: 14px; margin: 2px 0; font-variant-numeric: tabular-nums; }
.paycard .pay-close { margin-top: 0; }
.pay-row b { word-break: break-word; }
/* v1.20.0: тоо өөрчлөгдөх анимэйшн */
.bump { animation: num-bump .9s ease; }
.bump.up { --bump: var(--ok); }
.bump.down { --bump: var(--muted); }
@keyframes num-bump { 0% { transform: scale(1); } 20% { transform: scale(1.06); text-shadow: 0 0 18px color-mix(in srgb, var(--bump, var(--text)) 70%, transparent); } 100% { transform: scale(1); text-shadow: none; } }
#bal, #pend, #profit, #goalNow, #goalPct { display: inline-block; transform-origin: left center; }
.hero #bal { transform-origin: center; }
.goal-bar i { transition: width 1s cubic-bezier(.2,.8,.2,1); }
.goal-bar i.grow::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: bar-shine 1.1s ease; }
@keyframes bar-shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
/* v1.20.1: худалдагчийн жагсаалт бүгдийг харуулж, дотроо гүйлгэгдэнэ */
.spick-list { max-height: min(360px, 50vh); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
/* v1.20.4: "Гүйлгээ үүслээ" картыг хаах */
#done { position: relative; }
#done .done-x { position: absolute; top: 14px; right: 14px; float: none; margin: 0; }
/* v1.21.0: Төлсөн тэмдэглэгээ */
.pay-acts { display: flex; gap: 10px; margin-top: 14px; }
.pay-acts .btn { flex: 1; padding: 12px; }
.pay-acts .pay-done { background: var(--ok); color: #04130a; }
.o-paid { font-weight: 600; margin-top: 3px; }
.o-paid.yes { color: var(--ok); }
.o-paid.no { color: #ff9f0a; }
.order-body .kv .chip { margin-left: auto; }
.unpaid { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -2px 2px 10px; font-size: 13px; color: #ff9f0a; font-variant-numeric: tabular-nums; }
/* v1.21.2: дэлгэрэнгүй хэсэг утсан дээр хажуу тийш халихгүй */
.order-body > * { min-width: 0; }
.kv > span:last-child { text-align: right; overflow-wrap: anywhere; }
.kv-paid { flex-wrap: wrap; align-items: center; row-gap: 8px; }
.kv-paid > span:nth-child(2) { margin-left: auto; font-weight: 600; }
.kv-paid.yes > span:nth-child(2) { color: var(--ok); }
.kv-paid.no > span:nth-child(2) { color: #ff9f0a; }
.kv-paid .chip { flex: none; margin-left: 0 !important; white-space: nowrap; }
@media (max-width: 720px) { .kv-paid .chip { width: 100%; } }
/* v1.22.0: 👁 Дүнг нуух горим */
html.priv :is(#bal, #balSub, #pend, #pendSub, #profit, #profitSub, #goalNow, #goalTarget, #goalSub, #unpaidT,
  #repSum .rep-n, #repSum .small, #repTable .rep-row:not(.head) span:not(:first-child), #repChart,
  .o-amt, .o-profit, .order-body .kv > span:last-child, .order-items .kv > :last-child, .money) {
  filter: blur(9px); -webkit-user-select: none; user-select: none; transition: filter .25s ease;
}
:is(#bal, #pend, #profit, #goalNow, .o-amt, .o-profit) { transition: filter .25s ease; }
.eyebtn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
/* v1.23.0: Inventory үнэлгээ */
.row-in { display: flex; gap: 10px; }
.row-in input { flex: 1; min-width: 0; }
.a-fee { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; }
.a-fee input { width: auto; }
.a-who { font-weight: 600; margin-bottom: 12px; }
.a-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.a-tile { background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); border-radius: 16px; padding: 14px; }
.a-tile b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.a-head, .a-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px 104px; gap: 10px; align-items: center; }
.a-head { padding: 6px 0; border-bottom: 1px solid var(--line); }
.a-head span:not(:first-child), .a-p { text-align: right; }
.a-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.a-skin { display: flex; align-items: center; gap: 10px; min-width: 0; }
.a-skin .nm { min-width: 0; }
.a-p b { font-variant-numeric: tabular-nums; font-weight: 500; }
.a-p.best b { font-weight: 700; }
.a-p .small { font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .a-head, .a-row { grid-template-columns: minmax(0, 1fr) 82px 82px; gap: 6px; }
  .a-skin .thumb { width: 48px; height: 38px; }
  .a-p b { font-size: 13px; }
}
html.priv :is(#tCf, #tCfM, #tBf, #tBfM, .a-p) { filter: blur(9px); }
.a-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: 14px; }
.a-head, .a-row { grid-template-columns: 22px minmax(0, 1fr) 92px 92px 100px; }
.a-row.off { opacity: .4; }
.a-sale b { font-weight: 700; }
.a-total { text-align: right; font-weight: 600; margin-top: 12px; font-variant-numeric: tabular-nums; }
.a-row input[type=checkbox], .a-head input[type=checkbox] { width: 18px; height: 18px; margin: 0; }
@media (max-width: 720px) {
  .a-head, .a-row { grid-template-columns: 20px minmax(0, 1fr) 76px; }
  .a-head span:nth-child(3), .a-head span:nth-child(4), .a-row > .a-p:not(.a-sale) { display: none; }
  .a-head span:nth-child(5) { text-align: right; }
}
html.priv :is(#aTotal) { filter: blur(9px); }
#aList .row-in select { flex: none; width: auto; max-width: 46%; }
#aList .row-in input[type=search] { flex: 1 1 auto; }

/* ---- Туршилт: өөр лүүгээ авах ---- */
.l-badge { font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 3px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.l-head, .l-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 96px; gap: 10px; align-items: center; }
.l-head { padding: 6px 0; border-bottom: 1px solid var(--line); }
.l-head span:last-child { text-align: right; }
.l-row { padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.l-row.off { opacity: .45; }
.l-row input[type=checkbox], .l-head input[type=checkbox] { width: 18px; height: 18px; margin: 0; }
.l-pay { margin-top: 12px; }
.l-pay .li-set input { min-width: 0; }
.l-pay .li-set > input { width: 170px; text-align: right; }
.l-sum { text-align: right; font-weight: 600; margin: 12px 0; font-variant-numeric: tabular-nums; }
.l-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.l-way { display: grid; gap: 4px; text-align: left; padding: 14px; border-radius: 16px; border: 0; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font: inherit; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.l-way b { font-size: 15px; }
.l-way span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.l-way:first-child { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.l-way:first-child span { color: var(--on-accent); opacity: .75; }
.l-way:not(:disabled):active { transform: scale(.98); }
.l-way:disabled { opacity: .4; cursor: default; }
@media (max-width: 520px) { .l-ways { grid-template-columns: 1fr; } }
.l-how { margin-top: 10px; font-size: 13px; }
.l-how summary { cursor: pointer; color: var(--muted); }
.l-how ol { padding-left: 18px; margin: 8px 0; line-height: 1.6; }
.l-h { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.l-h:last-child { border-bottom: 0; }
.l-h-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.l-h-top .muted { margin-left: auto; }
.l-tag { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.l-h-items { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-h-bot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.l-amt { margin-right: auto; font-variant-numeric: tabular-nums; }
html.priv :is(.l-amt, .l-row .a-p, .l-sum, #lPay) { filter: blur(9px); }
.l-send { width: 100%; background: var(--accent); color: var(--on-accent); box-shadow: none; }
.l-send span { color: var(--on-accent); opacity: .75; }
.l-st-accepted, .l-st-escrow { color: var(--ok, #1a7f37); box-shadow: inset 0 0 0 1px currentColor; }
.l-st-declined, .l-st-cancelled, .l-st-expired, .l-st-invalid { color: var(--bad, #c62828); box-shadow: inset 0 0 0 1px currentColor; }
.l-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 4px; }
@media (max-width: 640px) { .l-tiles { grid-template-columns: 1fr 1fr; } }
.l-tiles b.pos { color: var(--ok, #1a7f37); } .l-tiles b.neg { color: var(--bad, #c62828); }
.l-chart { margin-top: 14px; }
.l-svg { width: 100%; height: auto; display: block; overflow: visible; }
.l-axis { stroke: var(--line); stroke-width: 1; }
.l-bar.pos { fill: var(--ok, #1a7f37); opacity: .85; } .l-bar.neg { fill: var(--bad, #c62828); opacity: .85; }
.l-line { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.l-lbl { fill: var(--muted); font-size: 11px; }
.l-leg { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.l-k { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-left: 8px; }
.l-k:first-child { margin-left: 0; }
.l-k.k-bar { background: var(--ok, #1a7f37); } .l-k.k-line { height: 2px; background: var(--text); }
.l-pf { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.l-pf.pos { color: var(--ok, #1a7f37); } .l-pf.neg { color: var(--bad, #c62828); }
.l-h-items { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.l-skins { display: grid; gap: 4px; padding: 8px 10px; border-radius: 12px; background: var(--fill); }
.l-sk { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; font-size: 13px; }
.l-sk-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.priv :is(#sProfit, #sPaid, #sValue, #sValueU, #sUnpaid, .l-pf, .l-sk-v, .l-chart) { filter: blur(9px); }
/* ---- Миний skin-үүд ---- */
.l-tabs { display: flex; width: 100%; margin-bottom: 14px; }
.l-tabs button { flex: 1; }
.l-tiles b.pos, .p-row .pos { color: var(--ok, #1a7f37); }
.p-row { position: relative; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; display: grid; gap: 3px; }
.p-row:last-child { border-bottom: 0; }
.p-top { display: flex; align-items: center; gap: 8px; min-width: 0; padding-right: 0; }
.p-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.p-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-sell { justify-self: start; margin-top: 4px; }
.p-st-holding { color: var(--text); } .p-st-sold { color: var(--muted); } .p-st-traded { color: var(--muted); font-style: italic; }
.p-back { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.p-back.in { opacity: 1; }
.p-sheet { width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; background: var(--card, var(--bg)); border-radius: 22px 22px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; transform: translateY(30px); transition: transform .25s; }
.p-back.in .p-sheet { transform: none; }
@media (min-width: 640px) { .p-back { align-items: center; } .p-sheet { border-radius: 22px; } }
.p-sheet h3 { margin: 0 0 4px; }
.p-fl { display: grid; gap: 4px; min-width: 0; }
.p-fl input { width: 100%; min-width: 0; }
.p-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-mk { display: flex; flex-wrap: wrap; gap: 6px; }
.p-mk .chip.on { background: var(--accent); color: var(--on-accent); }
.p-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.p-links { display: grid; gap: 2px; }
.danger-t { color: var(--bad, #c62828); justify-self: start; }
html.priv :is(#pProfit, #pMonth, #pHoldV, #pTurn, .p-row .l-pf, .p-sub, #pChart) { filter: blur(9px); }
.p-views { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.p-views::-webkit-scrollbar { display: none; }
.p-views button { flex: none; border: 0; font: inherit; font-size: 13px; padding: 7px 12px; border-radius: 999px; background: var(--fill); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; white-space: nowrap; }
.p-views button.on { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.p-head, .p-row { grid-template-columns: minmax(0, 1fr) 104px 104px 104px 64px 96px; gap: 10px; align-items: center; }
.p-head { display: grid; padding: 6px 0; border-bottom: 1px solid var(--line); }
.p-head span:not(:first-child), .p-c { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.p-head span:last-child, .p-stc { text-align: left; }
.p-row { display: grid; }
.p-nmc { min-width: 0; display: grid; gap: 2px; }
.p-stc { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.p-sell { margin: 0; padding: 4px 10px; font-size: 12px; }
.p-sum { border-top: 1px solid var(--line); font-weight: 600; cursor: default; }
.p-roi.pos { color: var(--ok, #1a7f37); } .p-roi.neg { color: var(--bad, #c62828); }
.p-mrow { display: grid; grid-template-columns: 80px 50px 1fr 1fr 1fr 64px; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; font-size: 13px; }
.p-mrow span { text-align: right; }
.p-mhead { padding: 6px 0; }
@media (max-width: 700px) {
  .p-head { display: none !important; }
  .p-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n p" "n r" "b s"; row-gap: 2px; }
  .p-nmc { grid-area: n; } .p-row .l-pf { grid-area: p; } .p-row .p-roi { grid-area: r; font-size: 12px; }
  .p-buy, .p-sellc { display: none; }
  .p-row .p-stc { grid-area: b; } 
  .p-sum .p-roi { display: none; }
  .p-mrow { grid-template-columns: 62px 30px minmax(0,1fr) minmax(0,1fr) 50px; gap: 6px; } .p-mrow .p-buy { display: none; } .p-mrow .p-sellc { display: block; }
}
html.priv :is(.p-c, .p-mrow span) { filter: blur(8px); }
@media (min-width: 701px) { .p-head, .p-row { grid-template-columns: minmax(0, 1fr) 92px 92px 96px 56px 104px; gap: 8px; } }
.page:has(#pRows) { max-width: 1080px; }
@media (max-width: 520px) { .l-tabs button { font-size: 13px; padding-left: 4px; padding-right: 4px; } }

#pChart .l-svg, #lChart .l-svg { max-height: 200px; margin: 0 auto; }
.l-line { stroke-width: 1.6; } .l-lbl { font-size: 10px; }
.p-mrow span:first-child, .p-mrow b { text-align: left; }
.p-per { margin: 12px 0 0; }
.p-mclick { cursor: pointer; }
.p-mclick:hover, .p-mit:hover { background: var(--fill); }
.p-msub { display: grid; padding: 4px 0 8px 14px; border-bottom: 1px solid var(--line); }
.p-mit { display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px 110px 60px; gap: 10px; align-items: center; padding: 7px 6px; border-radius: 10px; cursor: pointer; font-size: 13px; font-variant-numeric: tabular-nums; }
.p-mit > span { text-align: right; }
.p-mit .p-nmc .p-nm { font-weight: 500; font-size: 13px; }
@media (max-width: 700px) { .p-mit { grid-template-columns: minmax(0, 1fr) auto 50px; } .p-mit .p-buy, .p-mit .p-sellc { display: none; } .p-msub { padding-left: 4px; } }
.p-lg { display: grid; gap: 6px; }
.p-lchips { display: flex; flex-wrap: wrap; gap: 6px; }
.p-lchip { display: inline-flex; align-items: center; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); background: var(--fill); max-width: 100%; }
.p-lname { border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; padding: 6px 4px 6px 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.p-lx { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px 10px 6px 6px; font-size: 12px; }
.p-lsearch { width: 100%; }
.p-lres { display: grid; gap: 2px; }
.p-lopt { text-align: left; border: 0; background: var(--fill); color: var(--text); font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }

.p-sell { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.p-stc .l-tag.p-st-holding { box-shadow: none; padding-left: 0; }

/* Хугацааны дэлгэрэнгүй мөр: нэр нь дээр, тоонууд дээд мөрийн баганатай таарна */
.p-mit { grid-template-columns: 80px 50px 1fr 1fr 1fr 64px !important; row-gap: 2px; }
.p-mit .p-nmc { grid-column: 1 / -1; }
.p-mit .p-msp { grid-column: 1 / 3; }
.p-msub { padding-left: 0 !important; }
@media (max-width: 700px) { .p-mit { grid-template-columns: 62px 30px minmax(0,1fr) minmax(0,1fr) 50px !important; gap: 6px; } .p-mit .p-buy { display: none; } .p-mit .p-sellc { display: block !important; } }
.p-mit .p-nmc { grid-row: 1; } .p-mit > span { grid-row: 2; }
.p-mrow b { white-space: nowrap; }
@media (max-width: 700px) {
  .p-mrow, .p-mit { grid-template-columns: 78px 22px minmax(0,1fr) minmax(0,1fr) 46px !important; gap: 6px; }
  .p-mrow { font-size: 12px; }
}
.p-nml { display: flex; align-items: center; gap: 10px; min-width: 0; }
.p-nmt { display: grid; gap: 2px; min-width: 0; }
.p-th { width: 54px; height: 40px; flex: none; }
@media (max-width: 700px) { .p-th { width: 46px; height: 34px; } }
.p-lease { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); }
.p-lease-t { font-weight: 600; color: var(--text); }
.p-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.p-lease-left { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.p-lease input { background: var(--bg, #000); box-shadow: inset 0 0 0 1px var(--line); }
.p-mtot { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; }
.p-th { display: grid; place-items: center; }
.p-noimg { font-weight: 700; color: var(--muted); font-size: 15px; }
.p-th-s { width: 46px; height: 34px; }
/* Цэвэрхэн баганан график */
.bc { display: flex; align-items: stretch; gap: 6px; height: 190px; padding: 8px 2px 0; }
.bc-col { flex: 1 1 0; min-width: 0; display: grid; grid-template-rows: 1fr 22px; }
.bc.bc-neg .bc-col { grid-template-rows: 1fr 1fr 22px; }
.bc-up { display: flex; align-items: flex-end; justify-content: center; }
.bc-dn { display: flex; align-items: flex-start; justify-content: center; border-top: 1px solid var(--line); }
.bc-bar { width: min(100%, 44px); border-radius: 8px; }
.bc-up .bc-bar { border-radius: 8px 8px 4px 4px; }
.bc-dn .bc-bar { border-radius: 4px 4px 8px 8px; }
.bc-bar.pos { background: color-mix(in srgb, var(--ok, #1a7f37) 42%, transparent); }
.bc-bar.neg { background: color-mix(in srgb, var(--bad, #c62828) 42%, transparent); }
.bc-col:hover .bc-bar.pos { background: color-mix(in srgb, var(--ok, #1a7f37) 70%, transparent); }
.bc-col:hover .bc-bar.neg { background: color-mix(in srgb, var(--bad, #c62828) 70%, transparent); }
.bc-lbl { text-align: center; font-size: 11px; color: var(--muted); padding-top: 6px; white-space: nowrap; overflow: visible; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .bc { gap: 3px; height: 160px; } .bc-lbl { font-size: 10px; } }
html.priv .bc { filter: blur(8px); }
.bc-lots .bc-col:nth-child(odd):not(:last-child) .bc-lbl { visibility: hidden; }
@media (max-width: 700px) { .bc-many .bc-col:nth-child(even) .bc-lbl { visibility: hidden; } .bc-many .bc-lbl { font-size: 9px; } }
.bc-lbl { overflow: visible; }
.p-nm2 { min-width: 0; }
.p-nm2 .nm-skin { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-nm2 .nm-top { flex-wrap: nowrap; overflow: hidden; }
.p-sell { white-space: nowrap; }
@media (min-width: 701px) { .p-head, .p-row { grid-template-columns: minmax(0, 1fr) 92px 92px 96px 56px 124px; } }
.p-wpn { color: var(--text); font-weight: 600; }
.p-yr { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0 10px; vertical-align: middle; }
.p-yr .chip { padding: 4px 10px; }
.p-yr .chip:disabled { opacity: .3; }
.p-per { display: inline-flex; }
@media (max-width: 520px) { .bc-suf { display: none; } }
.bc-up { gap: 3px; }
.bc-up .bc-bar { width: min(46%, 34px); }
.bc-up .bc-bar:only-child { width: min(100%, 44px); }
.bc-bar.hold { background: color-mix(in srgb, #4c8dff 45%, transparent); }
.bc-col:hover .bc-bar.hold { background: color-mix(in srgb, #4c8dff 75%, transparent); }
.l-k.k-hold { background: #4c8dff; }
.l-leg .l-k + * { margin-right: 8px; }
/* Нэр тасрахгүй: утсан дээр 2 мөрт орно, badge-ууд багтахгүй бол доош шилжинэ */
.l-row .p-nm2 .nm-skin { white-space: normal; overflow: visible; }
.l-row .p-nm2 .nm-top, .p-row .p-nm2 .nm-top { flex-wrap: wrap; overflow: visible; row-gap: 4px; }
@media (max-width: 700px) { .p-row .p-nm2 .nm-skin { white-space: normal; } }
.bc-click { cursor: pointer; }
.bc-col.sel .bc-bar.pos { background: color-mix(in srgb, var(--ok, #1a7f37) 80%, transparent); }
.bc-col.sel .bc-bar.hold { background: color-mix(in srgb, #4c8dff 80%, transparent); }
.bc-col.sel .bc-lbl { color: var(--text); font-weight: 700; }
.p-det { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 2px; }
.p-det-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.p-det-t { margin: 6px 0 2px; }
.p-det-r { border-radius: 10px; }
.p-det .nm-top .wear { background: rgba(127,127,127,.22) !important; }
@media (max-width: 700px) {
  .p-det-r { grid-template-columns: minmax(0, 1fr) auto auto !important; column-gap: 12px; }
  .p-det-r .p-msp, .p-det-r .p-buy { display: none !important; }
}
/* PC: нэр ба тоонууд нэг мөрөнд (сарын дэлгэрэнгүй, баганын дэлгэрэнгүй) */
@media (min-width: 701px) {
  .p-mrow, .p-mit { grid-template-columns: minmax(0, 1.6fr) 50px 1fr 1fr 1fr 64px !important; align-items: center; }
  .p-mit .p-nmc { grid-column: 1 / 3; grid-row: 1; }
  .p-mit > span { grid-row: 1; }
  .p-mit .p-msp { display: none; }
}
.p-sub .p-dv { color: var(--text); font-weight: 600; } .p-sub .p-dot { opacity: .6; }
/* Засах цонх v2 */
.p-nmwrap { display: grid; gap: 8px; position: relative; }
.p-types { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.p-types::-webkit-scrollbar { display: none; }
.p-types .chip { flex: none; padding: 5px 10px; font-size: 12px; }
.p-types .chip.on { background: var(--accent); color: var(--on-accent); }
.p-sug { display: grid; gap: 2px; max-height: 260px; overflow: auto; padding: 4px; border-radius: 12px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); }
.p-sopt, .p-lopt { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.p-sopt:hover, .p-lopt:hover { background: rgba(127,127,127,.15); }
.p-sopt .thumb, .p-lopt .thumb { width: 40px; height: 30px; flex: none; }
.p-lopt { background: var(--fill); }
.p-date { display: flex; gap: 6px; align-items: center; }
.p-date input { flex: 1; min-width: 0; }
.p-today { flex: none; padding: 6px 10px; font-size: 12px; }
.p-td { display: grid; gap: 4px; margin-top: 10px; }
.p-tdrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; }
.p-tdseg button { font-size: 12px; padding: 6px 10px; }
.p-tdhint { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.p-prev { padding: 10px 12px; border-radius: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.p-prev.pos { color: var(--ok, #1a7f37); background: color-mix(in srgb, var(--ok, #1a7f37) 12%, transparent); }
.p-prev.neg { color: var(--bad, #c62828); background: color-mix(in srgb, var(--bad, #c62828) 12%, transparent); }
.p-lcard { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); }
.p-lcard .thumb { width: 44px; height: 32px; flex: none; }
.p-lname2 { flex: 1; min-width: 0; display: grid; gap: 1px; text-align: left; border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.p-lname2 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-lg { gap: 6px; }
@media (max-width: 520px) { .p-tdrow { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .p-sheet .p-2 { grid-template-columns: 1fr; } .p-sheet { overflow-x: hidden; } }
.p-sheet { box-sizing: border-box; }
.p-date input[type=date] { min-width: 0; width: 100%; }
@media (max-width: 520px) { .p-sheet .p-2.p-keep { grid-template-columns: 1fr 1fr; } }
/* Сарын зорилт, статистик, CSFloat үнэ, удаан хадгалсан */
.p-goal { margin-top: 12px; display: grid; gap: 6px; }
.p-goal-h { display: flex; justify-content: space-between; align-items: center; }
.p-goal-h .link { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.p-goal-bar { height: 8px; border-radius: 999px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.p-goal-bar > div { height: 100%; border-radius: 999px; background: color-mix(in srgb, var(--ok, #1a7f37) 70%, transparent); transition: width .6s ease; }
.p-goal-bar > div.done { background: var(--ok, #1a7f37); }
.p-types-st { display: grid; gap: 8px; margin-top: 14px; }
.p-trow { display: grid; grid-template-columns: 76px minmax(0, 1fr) 120px 130px; gap: 10px; align-items: center; font-variant-numeric: tabular-nums; }
.p-trow .wear { justify-self: start; }
.p-trow .l-pf { text-align: right; }
.p-tbar { height: 10px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.p-tbar > div { height: 100%; border-radius: 999px; }
.p-tbar > .pos { background: color-mix(in srgb, var(--ok, #1a7f37) 55%, transparent); }
.p-tbar > .neg { background: color-mix(in srgb, var(--bad, #c62828) 55%, transparent); }
@media (max-width: 520px) { .p-trow { grid-template-columns: 64px minmax(0, 1fr) auto; } .p-trow > .muted { grid-column: 2 / -1; margin-top: -4px; } }
.p-now { opacity: .75; font-style: italic; }
.p-stale-t { color: #d99a1c; }
.p-row.p-stale { box-shadow: inset 3px 0 0 #d99a1c; padding-left: 8px; }
#pHoldV .pos { color: var(--ok, #1a7f37); } #pHoldV .neg { color: var(--bad, #c62828); }
html.priv :is(#pGoalT, .p-trow .l-pf, #pStatT b) { filter: blur(8px); }
#pQ { flex: 1 1 auto; min-width: 0; width: auto; }
#pSort { flex: 0 0 auto; width: auto; max-width: 48%; }
.row-in:has(#pQ) { display: flex; gap: 8px; }
.bc { position: relative; }
.bc-goal { position: absolute; left: 0; right: 0; top: 8px; bottom: 22px; pointer-events: none; }
.bc.bc-neg .bc-goal { bottom: calc(22px + (100% - 30px) / 2); }
.bc-gl { position: absolute; left: 0; right: 0; border-top: 1.5px dashed color-mix(in srgb, #e9b949 75%, transparent); }
.bc-gt { position: absolute; right: 0; bottom: 3px; font-size: 11px; color: #e9b949; font-weight: 600; background: var(--card, #111); padding: 0 4px; border-radius: 4px; }
.bc-bar { position: relative; }
.bc-bar.hit { background: color-mix(in srgb, var(--ok, #1a7f37) 80%, transparent) !important; box-shadow: 0 0 0 1.5px #e9b949; }
.bc-star { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 800; color: #1a1a1a; background: #e9b949; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; line-height: 1; }
.bc-hit .bc-lbl { color: #e9b949; font-weight: 700; }
.bc:has(.bc-goal) { padding-top: 26px; height: 214px; }
.bc:has(.bc-goal) .bc-goal { top: 26px; }
/* Цэгцтэй хуваарилалт */
.p-mtile .p-goal { margin-top: 10px; gap: 4px; }
.p-mtile .p-goal-bar { height: 6px; }
.p-goal-t { justify-self: start; padding: 0; font-size: 12px; color: var(--muted) !important; font-weight: 500 !important; text-decoration: none; }
.p-goal-t:hover { color: var(--text) !important; }
.p-chart-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 4px; padding-top: 18px; border-top: 1px solid var(--line); }
.p-chart-h h4 { margin: 0; font-size: 15px; }
.p-chart-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.p-chart-ctl .p-per { margin: 0; }
.p-chart-ctl .p-yr { margin: 0; }
.p-chart-ctl .seg button { padding: 6px 12px; font-size: 13px; }
#pChart .l-leg { margin-top: 10px; }
@media (max-width: 520px) { .p-chart-h { flex-direction: column; align-items: stretch; } .p-chart-ctl { justify-content: space-between; } .p-chart-ctl .p-per { flex: 1; display: flex; } .p-chart-ctl .p-per button { flex: 1; } }
.p-goal-t { text-align: left; text-decoration: none !important; border: 0 !important; }
/* Утсан дээр хайрцагнууд картнаас халихгүй: том тоо ч багтана */
.l-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.l-tiles .a-tile { min-width: 0; overflow: hidden; }
.l-tiles .a-tile b { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .l-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .l-tiles .a-tile { padding: 12px; }
  .l-tiles .a-tile b { font-size: clamp(17px, 5.4vw, 22px); letter-spacing: -0.02em; }
  .l-tiles .a-tile .small { font-size: 12px; }
}
.l-tiles .a-tile > b { white-space: nowrap; overflow: hidden; display: block; overflow-wrap: normal; }
@media (max-width: 640px) { .l-tiles .a-tile > b { font-size: 22px; } }
/* Утас: Inventory жагсаалт багтана */
@media (max-width: 640px) {
  .row-in:has(#pQ) { flex-wrap: wrap; }
  #pQ { flex: 1 1 100%; }
  #pSort { flex: 1 1 100%; max-width: none; }
  .p-row .p-sub { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.45; }
  .p-row .p-nm2 .nm-top { gap: 4px; }
  .p-row .p-nm2 .nm-top .wear { font-size: 10px; padding: 2px 5px; }
  .p-row { column-gap: 8px; }
  .p-row .p-th { width: 44px; height: 34px; }
}
.p-sub > * { white-space: nowrap; }
/* Гүйлгээний дэлгэрэнгүй: skin мөр утсан дээр багтана */
.oi .oi-l { flex: 1 1 auto; min-width: 0; }
.oi .nm { min-width: 0; }
.oi .nm-top { flex-wrap: wrap; row-gap: 4px; }
.oi > .muted { white-space: nowrap; flex: none; }
@media (max-width: 420px) { .oi { flex-wrap: wrap; row-gap: 4px; } .oi > .muted { margin-left: auto; } }
.p-sub > .p-dot { white-space: normal; }
/* Гүйлгээ: 2 жижиг карт нарийн дэлгэцэнд багтана */
.stats2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.stats2 .card.mini { min-width: 0; overflow: hidden; }
@media (max-width: 380px) { .stats2 .card.mini { padding: 12px; } .stats2 .mini-n { font-size: 18px; } }
.mini-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Үнэлгээ: нарийн утсанд багтана */
.a-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.a-tile { min-width: 0; overflow: hidden; }
.a-tile b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .a-tile { padding: 12px; } .a-tile b { font-size: 18px; } }
.a-row .a-skin, .a-row .nm { min-width: 0; }
.a-row .nm-top { flex-wrap: wrap; row-gap: 4px; }
.a-row .nm-skin { overflow-wrap: anywhere; }
section.card { min-width: 0; }
main.page { overflow-x: clip; }
#aCopy, #aCopy2, #pCopy, .btn.big { white-space: normal; line-height: 1.3; }

/* Lab → Inventory тор (Steam inventory маягийн, Trade Hold-той) */
#pRows.p-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin-top:6px}
@media(max-width:420px){#pRows.p-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}}
.p-ginfo{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;padding:2px 0 4px}
.p-gk{color:var(--pos,#3ecf8e)} .p-gk.p-gl{color:#f5a524}
.p-ic{position:relative;display:flex;flex-direction:column;gap:4px;min-width:0;padding:10px;border-radius:14px;background:var(--fill);box-shadow:inset 0 0 0 1px var(--line);cursor:pointer;border-bottom:3px solid #3ecf8e55}
@media (hover: hover) { .p-ic:hover{box-shadow:inset 0 0 0 1px var(--muted)} }
.p-ic-lock{border-bottom-color:#f5a524aa}
.p-ic-top{display:flex;flex-wrap:wrap;gap:4px;min-height:18px}
.p-ic-b{font-size:10.5px;font-weight:600;padding:1px 6px;border-radius:6px;background:rgba(127,127,127,.22);color:var(--muted)} .p-ic-b.st{color:#cf6a32}
.p-ic-img{aspect-ratio:4/3;display:grid;place-items:center;overflow:hidden;position:relative}
/* Зураг хайрцагтаа бүтнээрээ: өндрийг тодорхой болгохгүй бол дөрвөлжин (Steam) зураг өргөнөөрөө томорч дээд/доод нь хайчлагддаг */
.p-ic-img img{position:absolute;inset:4%;width:92%;height:92%;object-fit:contain}
.p-ic-img .p-noimg{font-size:28px;color:var(--muted)}
.p-ic-lock .p-ic-img img{opacity:.6}
.p-ic-nm{min-width:0} .p-ic-w{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .p-ic-s{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.p-ic-pr{font-size:13px;font-weight:700}
.p-ic-st{font-size:11.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .p-ic-st.ok{color:#3ecf8e} .p-ic-st.lock{color:#f5a524}
.p-pctl{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end} .p-pctl .p-yr{margin:0}
.rep-ctl{margin-bottom:10px}
/* Lab → Inventory: хуулах, зарах товч */
.p-ic-cp{position:absolute;top:6px;right:6px;border:0;background:rgba(127,127,127,.18);border-radius:8px;width:26px;height:26px;font-size:13px;cursor:pointer;line-height:26px;padding:0}
.p-ic .p-ic-top{padding-right:28px}
.p-ic-act{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:2px}
.p-ic-act .chip{flex:1 1 0;min-width:0;justify-content:center;font-size:12px;padding:5px 6px}
.p-ic-on{font-size:11.5px;font-weight:600;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 100%}
.p-qcopy{grid-column:1/-1;width:100%;white-space:normal}
.p-sell .ask-card{text-align:left}
.p-sell-b{display:flex;flex-direction:column;gap:8px;margin:6px 0 12px}
.p-sell-in{width:100%;font-size:18px;font-weight:700}
.p-sell-q{display:flex;flex-wrap:wrap;gap:6px}
/* 🎚 CSFloat шиг үнийн слайдер */
.p-sell-sl{display:grid;gap:6px;margin:2px 0 4px}
.p-sell-sl input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:6px !important;min-height:0 !important;padding:0 !important;border:0 !important;box-shadow:none !important;box-sizing:border-box;border-radius:999px;margin:10px 0;background:linear-gradient(90deg,var(--accent) var(--p,50%),var(--fill) var(--p,50%));outline:none;cursor:pointer}
.p-sell-sl input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;border-radius:50%;background:var(--accent);border:3px solid #fff;box-shadow:0 0 0 6px color-mix(in srgb,var(--accent) 25%,transparent)}
.p-sell-sl input[type=range]::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:var(--accent);border:3px solid #fff}
.p-sell-slh{display:flex;justify-content:space-between;align-items:center;font-size:13.5px;color:var(--muted)}
.p-sell-slh span.on{color:#30d158;font-weight:700} .p-sell-slh b{color:var(--text);font-variant-numeric:tabular-nums}
.p-sell-o{display:flex;flex-direction:column;gap:2px;font-size:13px}
.p-sell-o .pos{color:var(--ok)} .p-sell-o .neg{color:var(--bad)}
/* Lab → Авах түүх: skin тус бүр зурагтай */
.l-skins{display:flex;flex-direction:column;gap:6px;margin:8px 0}
.l-sk{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.l-sk-l{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 auto}
.l-sk-th{width:46px;height:34px;flex:0 0 auto}
.l-sk-th img{width:100%;height:100%;object-fit:contain}
.l-sk-r{display:flex;flex-direction:column;align-items:flex-end;flex:0 0 auto;text-align:right}
@media(max-width:420px){.l-sk{flex-wrap:wrap}.l-sk-r{flex-direction:row;gap:8px;align-items:baseline;margin-left:54px}}
/* Lab: эх сурвалж (Бүгд / Өөрийн / CSBoard) */
.step-h:has(.p-src){flex-wrap:wrap;gap:8px}
.seg.p-src button{padding:5px 10px;font-size:12.5px}
.p-srcw{display:flex;justify-content:flex-end;margin:-4px 0 8px}
.p-srcb{display:inline-block;font-size:10.5px;font-weight:700;padding:1px 6px;border-radius:6px;margin-right:6px;background:rgba(127,127,127,.18);color:var(--muted);vertical-align:1px}
.p-srcb.csb{background:color-mix(in srgb,#4f7cff 18%,transparent);color:#4f7cff}
/* Lab → Steam холболт: зураг + нэр */
.l-who{display:flex;align-items:center;gap:10px;min-width:0}
.l-ava{width:44px;height:44px;border-radius:10px;flex:0 0 auto;object-fit:cover;background:var(--fill)}
.l-who-t{min-width:0;overflow-wrap:anywhere}
.l-soon{color:var(--bad)!important;font-weight:600}
/* Lab → CSFloat-ын зарсан, холбогдоогүй */
.p-srcw{gap:8px;flex-wrap:wrap;align-items:center}
.p-cfs{margin:0 0 10px;padding:10px 12px;border-radius:12px;background:color-mix(in srgb,#4f7cff 8%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,#4f7cff 25%,transparent)}
.p-cfs summary{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;font-weight:600;font-size:14px}
.p-cfr{display:flex;flex-direction:column;gap:6px;padding:8px 0;border-top:1px solid var(--line);min-width:0}
.p-cfa{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.p-cfa select{flex:1 1 180px;min-width:0;max-width:100%}
@media(max-width:360px){.p-ic{padding:8px}.p-ic-act{gap:4px}.p-ic-act .chip{font-size:11px;padding:4px 2px}}
.p-srcb.cf{background:color-mix(in srgb,#f5a524 20%,transparent);color:#d98e04}
.seg.p-src{flex-wrap:wrap}
@media(max-width:420px){.seg.p-src{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%}.seg.p-src button{padding:6px 2px;font-size:12px;min-width:0}}
.p-cfst{flex:1 1 auto;min-width:0}.p-cfst.bad{color:var(--bad)}
/* Lab → Авах: худалдагчийн карт, явж буй offer */
.l-seller{display:flex;gap:12px;align-items:flex-start;margin-bottom:12px;padding:12px;border-radius:14px;background:var(--fill);min-width:0}
.l-sel-a{flex:0 0 auto}
.l-ava-0{display:grid;place-items:center;font-weight:700;color:var(--muted)}
.l-sel-t{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px}
.l-sel-n{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-weight:700;font-size:16px;overflow-wrap:anywhere}
.l-sel-n a{color:inherit}
.l-lvl{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 5px;border-radius:12px;border:2px solid #9b9b9b;font-size:12px;font-weight:700}
.l-on{font-size:11px;font-weight:600;color:var(--muted)} .l-on.on{color:var(--ok)}
.l-flags{display:flex;flex-wrap:wrap;gap:5px}
.l-flag{font-size:11px;font-weight:700;padding:2px 7px;border-radius:7px;background:rgba(127,127,127,.18)}
.l-flag.bad{background:color-mix(in srgb,var(--bad) 18%,transparent);color:var(--bad)}
.l-flag.warn{background:color-mix(in srgb,#f5a524 20%,transparent);color:#c98300}
.l-flag.ok{background:color-mix(in srgb,var(--ok) 16%,transparent);color:var(--ok)}
.l-sel-h{overflow-wrap:anywhere}
.l-sel-l{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.l-cp{margin-top:8px}
.l-act{display:flex;gap:12px;padding:12px;border-radius:14px;margin-bottom:8px;background:var(--fill);border-left:4px solid #f5a524;min-width:0}
.l-act.ok{border-left-color:var(--ok)} .l-act.bad{border-left-color:var(--bad);opacity:.8}
.l-act-st{font-weight:700;font-size:13px}
.l-act.wait .l-act-st{color:#c98300} .l-act.ok .l-act-st{color:var(--ok)} .l-act.bad .l-act-st{color:var(--bad)}
.l-act-th{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
.l-act-th .thumb{width:44px;height:33px}
.l-act-th .thumb img{width:100%;height:100%;object-fit:contain}
body.app #lBar{margin-left:auto;margin-right:auto}
.l-barc{flex:0 0 auto;width:44px;height:44px;font-size:18px}
/* Lab → Авах: хаашаа (өөр лүүгээ / CSBoard), хоёр үнэ */
.l-dest{margin:12px 0 4px}
.l-dest-n{margin:0 0 8px}
.l-pl{display:flex;flex-direction:column;align-items:flex-end;opacity:.5;text-align:right;line-height:1.2}
.l-pl .l-pl-k{font-size:10px;font-weight:700;color:var(--muted);letter-spacing:.02em}
.l-pl b{font-size:13px} .l-pl .muted{font-size:11px}
.l-pl.on{opacity:1} .l-pl.on b{font-size:15px}
.l-pl + .l-pl{margin-top:4px}
.l-bk{opacity:.6} .l-bk.on{opacity:1;font-weight:700;color:var(--text)}
/* Утсан дээр: хоёр үнийг нэрийн доор хэвтээгээр */
@media(max-width:480px){
  .l-row{grid-template-columns:22px minmax(0,1fr)}
  .l-row > .a-p{grid-column:2;display:flex;gap:14px;justify-content:flex-start}
  .l-pl{align-items:flex-start;text-align:left}
  .l-pl + .l-pl{margin-top:0}
  .l-head span:last-child{display:none}
}
@media(max-width:360px){#lBar{gap:6px}#lBar .btn{padding:10px 12px;font-size:14px}#lBar .l-barc{width:36px;height:36px;font-size:15px}#lBarP{font-size:15px;white-space:normal}#lBarS{font-size:11px}}
/* Lab → Гүйлгээ */
.d-row{padding:12px 0;border-bottom:1px solid var(--line);display:flex;flex-direction:column;gap:6px;min-width:0}
.d-top{display:flex;gap:10px;align-items:center;min-width:0}
.d-av{width:38px;height:38px;border-radius:10px;background:var(--fill);display:grid;place-items:center;font-weight:700;color:var(--muted);flex:0 0 auto;overflow:hidden}
.d-av img{width:100%;height:100%;object-fit:cover}
.d-mid{flex:1 1 auto;min-width:0}
.d-l1{display:flex;align-items:center;gap:4px;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.d-r{display:flex;flex-direction:column;align-items:flex-end;flex:0 0 auto}
.d-st{font-weight:700}
.d-st-wait{color:#c98300} .d-st-pay{color:var(--bad)} .d-st-done{color:var(--ok)} .d-st-fail{color:var(--muted);text-decoration:line-through}
.d-pay{background:linear-gradient(90deg,color-mix(in srgb,var(--bad) 6%,transparent),transparent 60%)}
.d-fail{opacity:.6}
.d-nm{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.p-srcb.own{background:rgba(127,127,127,.18);color:var(--muted)}
.l-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
.l-tabs button{min-width:0;padding-left:2px;padding-right:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:400px){.l-tabs button{font-size:12.5px}}
@media(max-width:350px){.l-tabs button{font-size:11.5px}}
/* Lab → Авах: skin бүрийн үнэ (Зарах / Төлөх / Ашиг) */
.l-row > .l-cost, .l-row > .l-cft{grid-column:2 / -1}
.l-cost{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;cursor:default}
.l-cb{padding:8px 10px;border-radius:12px;background:var(--fill);min-width:0;display:flex;flex-direction:column;gap:1px}
.l-cb b{font-size:15px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.l-cb.p{box-shadow:inset 0 0 0 1.5px var(--muted)}
.l-cin{display:flex;align-items:center;gap:4px}
.l-cin input{width:100%;min-width:0;border:0;background:transparent;font-size:15px;font-weight:700;padding:0;color:inherit;font-variant-numeric:tabular-nums}
.l-cb .pos{color:var(--ok)} .l-cb .neg{color:var(--bad)}
.l-cft{display:flex;gap:14px;align-items:center;cursor:default}
.l-trend{display:inline-block;margin-top:2px;font-size:11.5px;color:var(--muted)} .l-trend.bad{color:var(--bad);font-weight:600}
.l-warn{margin-top:4px;font-size:12px}
@media(max-width:480px){.l-row > .l-cost, .l-row > .l-cft{grid-column:1 / -1}.l-cost{gap:6px}.l-cb{padding:7px 8px}.l-cb b,.l-cin input{font-size:13.5px}}
/* Lab → Гүйлгээ: Тайлан, Худалдагч */
.d-views{margin:4px 0 8px}
#dTable .rep-row{grid-template-columns:1.4fr .8fr 1.2fr 1.2fr}
#dTiles{margin-bottom:6px}
.d-selchip{display:flex;gap:6px;align-items:center;margin:6px 0;padding:6px 10px;border-radius:10px;background:var(--fill);font-size:13px}
.d-sel .d-l1{font-weight:700}
.seg.d-views{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.seg.d-views button{min-width:0;padding-left:2px;padding-right:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media(max-width:360px){.seg.d-views button{font-size:13px}}
/* Lab нүүр хуудас: дээд/доод цэс Lab-ын хэсгүүдийг сольдог тул доторх табыг нууна */
#lTabs{display:none}
/* Inventory: CSBoard hold-д байгаа */
.p-ghd{margin-top:10px;align-items:center}
.p-ic-csb{border-bottom-color:color-mix(in srgb,#4f7cff 60%,transparent)}
.p-ic-st.csb{color:#4f7cff}
.p-ic-sl{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.p-ic-pr .l-pf{font-size:12px}
.l-base{margin:4px 0 8px}.l-base .seg button{padding:5px 10px;font-size:12.5px}
/* График: тооцоо ороогүй ашиг (CSFloat protection / CSBoard hold) үндсэн баганын дээр */
.bc-stk{width:min(46%,34px);display:flex;flex-direction:column-reverse;border-radius:8px 8px 4px 4px;overflow:hidden;position:relative}
.bc-up .bc-stk:only-child{width:min(100%,44px)}
.bc-seg{min-height:2px}
.bc-seg.pos{background:color-mix(in srgb,var(--ok,#1a7f37) 42%,transparent)}
.bc-seg.cfp{background:color-mix(in srgb,#f5a524 55%,transparent)}
.bc-seg.csbp{background:color-mix(in srgb,#8b5cf6 55%,transparent)}
.bc-col:hover .bc-seg.pos{background:color-mix(in srgb,var(--ok,#1a7f37) 70%,transparent)}
.l-k.k-cfp{background:#f5a524} .l-k.k-csbp{background:#8b5cf6}
.bc-stk .bc-star{position:absolute;top:2px;left:0;right:0;text-align:center}
/* Авах: доод мөр (bar) аль хэдийн нийт, хуулах, илгээх товчтой тул жагсаалтын доорх давхардлыг нууна */
#lSum, #lCp, #lCpM, #lB { display: none !important; }
/* Offer илгээгч account (нэр, level, зураг) */
.l-via{display:flex;align-items:center;gap:5px;font-size:12px;min-width:0;flex-wrap:wrap;margin-top:2px}
.l-via img{width:18px;height:18px;border-radius:5px;object-fit:cover}
.l-via a,.l-via b{color:inherit;font-weight:600}
.l-lvl.l-lvl-s{min-width:18px;height:18px;font-size:10px;border-width:1.5px;padding:0 3px}
/* Lab → Гүйлгээ: skin-үүд хүрээ дотор, badge-тай */
.d-items{border:1px solid var(--line);border-radius:12px;padding:4px 10px;display:flex;flex-direction:column}
.d-it{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 0;min-width:0}
.d-it + .d-it{border-top:1px solid var(--line)}
.d-it-l{display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 auto}
.d-it-l .thumb{width:48px;height:36px;flex:0 0 auto}
.d-it-l .thumb img{width:100%;height:100%;object-fit:contain}
.d-it-r{flex:0 0 auto;text-align:right;font-variant-numeric:tabular-nums}
.d-more{align-self:flex-start;margin:4px 0}
.d-det{display:flex;flex-direction:column;gap:6px;padding:8px 2px 2px}
.d-dl{display:flex;justify-content:space-between;gap:10px;font-size:13.5px}
.d-dl .pos{color:var(--ok)} .d-dl .neg{color:var(--bad)}
@media(max-width:420px){.d-it{flex-wrap:wrap}.d-it-r{margin-left:58px}}
.bc-seg.invp{background:color-mix(in srgb,#14b8a6 50%,transparent)}
.l-k.k-invp{background:#14b8a6}
/* Гүйлгээ → Тайлан: үе дээр дарж задлах */
.rep-click{cursor:pointer} .rep-click:hover{background:var(--fill)} .rep-row.open{font-weight:700}
.rep-det{padding:4px 0 10px 12px;border-bottom:1px solid var(--line)}
.rep-dt{margin:8px 0 2px}
.rep-di{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:6px 0;cursor:pointer;min-width:0;font-size:13px}
.rep-di + .rep-di{border-top:1px dashed var(--line)}
.rep-di-l{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;gap:4px}
.rep-di-r{display:flex;gap:10px;align-items:baseline;flex:0 0 auto;font-variant-numeric:tabular-nums}
.rep-di-r .pos{color:var(--ok)} .rep-di-r .neg{color:var(--bad)}
@media(max-width:480px){.rep-di{flex-wrap:wrap}.rep-di-l{flex:1 1 100%}.rep-di-r{margin-left:auto}}
/* Гүйлгээ бүр тусдаа карт */
#dRows .d-row{border:1px solid var(--line);border-radius:16px;padding:12px;margin-bottom:10px;background:var(--panel, transparent);box-shadow:0 1px 0 rgba(0,0,0,.02)}
#dRows .d-row.d-pay{border-color:color-mix(in srgb,var(--bad) 45%,var(--line))}
#dRows .d-row.d-wait{border-color:color-mix(in srgb,#f5a524 45%,var(--line))}
#dRows .d-av{width:44px;height:44px;border-radius:12px}
#dRows .d-items{background:var(--fill)}
.d-ptl{margin:2px 0 8px;font-size:13px}
/* v1.58: Steam inventory-оос оруулах */
.p-addb{display:flex;gap:6px}
.p-imp-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.p-imp-top label{display:flex;align-items:center;gap:4px;cursor:pointer}
.p-imp-d{padding:5px 8px;font-size:13px}
.p-imp-l{max-height:52vh;overflow:auto;display:flex;flex-direction:column;gap:4px;margin-top:4px}
.p-imp-r{display:grid;grid-template-columns:auto auto 1fr 120px;align-items:center;gap:8px;padding:6px;border:1px solid var(--line,rgba(127,127,127,.2));border-radius:10px;cursor:pointer}
.p-imp-r .p-nmt{min-width:0}
.p-imp-p{width:100%;padding:6px 8px;font-weight:700;text-align:right}
@media (max-width:480px){.p-imp-r{grid-template-columns:auto auto 1fr}.p-imp-p{grid-column:1/-1}}
.p-imp-det{margin-top:6px}.p-imp-det summary{cursor:pointer;padding:6px 2px;color:var(--muted)}.p-imp-det .p-imp-r{margin-top:4px}
.p-imp-in{opacity:.7}
.p-imp>.muted,.p-imp-r .muted{white-space:normal;overflow-wrap:anywhere}
.p-ic-pr{display:flex;align-items:center;justify-content:space-between;gap:6px;white-space:nowrap}
.p-ic-pct{font-size:11px;font-weight:700;padding:1px 6px;border-radius:6px}
.p-ic-pct.pos{color:var(--ok,#22c55e);background:color-mix(in srgb,var(--ok,#22c55e) 15%,transparent)}.p-ic-pct.neg{color:var(--bad,#ef4444);background:color-mix(in srgb,var(--bad,#ef4444) 15%,transparent)}
.p-ic-pf{display:flex;justify-content:space-between;align-items:baseline;gap:6px;font-size:11.5px;white-space:nowrap;margin-top:-2px;min-height:15px}
.p-ic-pf b{flex-shrink:0}
/* Урт тоонд "Авсан" гэдэг үг эхэлж богиносно — тоо хэзээ ч доош шилжихгүй */
.p-ic-bl{display:flex;min-width:0;overflow:hidden}.p-ic-lb{overflow:hidden;text-overflow:clip;min-width:0;flex-shrink:1}.p-ic-bv{flex-shrink:0}
.p-ic-pr>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis}.p-ic-pct{flex-shrink:0}
.p-ic-pf b.pos{color:var(--ok,#22c55e)}.p-ic-pf b.neg{color:var(--bad,#ef4444)}
.de-r{grid-template-columns:0 auto 1fr 130px;cursor:default}
.de-sum{margin:10px 0 4px;font-size:14px}.de-sum b.pos{color:var(--ok,#22c55e)}.de-sum b.neg{color:var(--bad,#ef4444)}
@media (max-width:480px){.de-r{grid-template-columns:0 auto 1fr}}

.p-ic-pf{font-size:13px;align-items:center;margin-top:2px}.p-ic-pf b{font-size:13px}
#pStatT{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
/* v1.65: Зарах (хүнд зарах) */
.s-list{display:flex;flex-direction:column;gap:6px;max-height:60vh;overflow:auto;margin-top:8px}
.s-row{display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:10px;padding:8px;border:1px solid var(--line,rgba(127,127,127,.2));border-radius:12px;cursor:pointer}
.s-row.on{border-color:var(--accent,#3b82f6);background:color-mix(in srgb,var(--accent,#3b82f6) 8%,transparent)}
.s-row.s-off{opacity:.55;cursor:default} .s-hdw{color:#ffd60a;margin-top:2px} .s-row.s-hd .p-nmt .muted{color:#ffd60a}
.s-row .p-nmt{min-width:0}.s-row .muted{white-space:normal}
.s-r{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.s-pin{width:130px;padding:6px 8px;text-align:right;font-weight:700}
.s-foot{position:sticky;bottom:0;margin-top:12px;padding:12px;border-radius:14px;background:var(--card2,#1b1b1b);display:flex;flex-direction:column;gap:6px;z-index:2}
.s-tot{display:flex;justify-content:space-between;align-items:center;font-weight:700}
.s-pay{display:flex;align-items:center;gap:6px}.s-pay input{width:160px;text-align:right;font-weight:800;font-size:17px;padding:8px 10px}
.s-foot b.pos{color:var(--ok,#22c55e)}.s-foot b.neg{color:var(--bad,#ef4444)}
.s-done{margin-top:12px;padding:12px;border-radius:14px;border:1px solid var(--ok,#22c55e);display:flex;flex-direction:column;gap:8px}
.s-pre{white-space:pre-wrap;font-size:12.5px;background:rgba(127,127,127,.08);padding:10px;border-radius:10px;margin:0}
.s-hist{display:flex;flex-direction:column;gap:8px}
.s-h{padding:10px 12px;border-radius:14px;border:1px solid var(--line,rgba(127,127,127,.2));display:flex;flex-direction:column;gap:6px}
.s-h.pay{border-color:var(--bad,#ef4444)}.s-h.wait{border-color:#f59e0b}.s-h.fail{opacity:.6}
.s-ht{display:flex;justify-content:space-between;gap:10px}.s-hi{overflow-wrap:anywhere}
@media (max-width:480px){.s-row{grid-template-columns:auto auto 1fr}.s-r{grid-column:1/-1;flex-direction:row;justify-content:flex-end;align-items:center}}
.s-diff{padding:8px 10px;border-radius:10px;font-size:14px;background:rgba(127,127,127,.08)}.s-diff.pos b{color:var(--ok,#22c55e)}.s-diff.neg b{color:#f59e0b}
.s-h .pos{color:var(--ok,#22c55e)}.s-h .neg{color:#f59e0b}
.s-opt{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line,rgba(127,127,127,.15))}
.s-qrow{display:flex;gap:8px}.s-qrow .p-q{flex:1}.s-qrow select{padding:8px 10px}
.s-warn{color:#f59e0b;white-space:normal}.s-up{color:var(--ok,#22c55e);white-space:normal}
.s-pc-amt{font-size:26px;font-weight:800;margin:10px 0}.s-pc-amt.pos{color:var(--ok,#22c55e)}.s-pc-amt.neg{color:#f59e0b}
.s-pc-rows{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}.s-pc-r{display:flex;justify-content:space-between;gap:10px}.s-pc-r b.pos{color:var(--ok,#22c55e)}.s-pc-r b.neg{color:var(--bad,#ef4444)}
#sFoot{bottom:calc(env(safe-area-inset-bottom,0px) + 8px);box-shadow:0 -8px 24px rgba(0,0,0,.35)}
.d-grp{padding:4px 2px 0}.d-cash{padding:6px 4px;font-weight:700}.d-cash.pos{color:var(--ok,#22c55e)}.d-cash.neg{color:#f59e0b}


/* =====================================================================
   NEUSKINS 2.0 — Dashboard загвар: цайвар/бараан горим, Crimson (#C3073F · #950740 · #6F2232 · #4E4E50 · #1A1A1D),
   PC-д зүүн sidebar, утсанд доод цэс
   ===================================================================== */
html[data-theme] {
  --accent: #c3073f; --accent-press: #950740; --accent-soft: rgba(195,7,63,.12); --accent2: #950740; --accent3: #6f2232; --grey: #4e4e50;
  --cf: #f5a524; --csb: #5b7cff; --radius: 18px; --radius-sm: 12px;
  --side: #1a1a1d; --side-text: rgba(255,255,255,.62); --side-on: #ffffff; --side-line: rgba(255,255,255,.07);
  --font-num: ui-rounded, "SF Pro Rounded", var(--font);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f6; --panel: #ffffff; --panel2: #f7f7f9; --panel3: #eef0f3;
  --fill: #f1f2f4; --line: #e7e8ec; --line2: #d9dbe1;
  --text: #15161a; --muted: #6b7080; --faint: #a3a7b3;
  --ok: #12a150; --bad: #e8590c; --warn: #b7791f;
  --glass: rgba(243,244,246,.82); --seg-on: #ffffff;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px rgba(16,24,40,.05);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a1a1d; --panel: #222225; --panel2: #2a2a2e; --panel3: #333336;
  --fill: rgba(255,255,255,.06); --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.15);
  --text: #f4f4f6; --muted: rgba(235,235,245,.58); --faint: rgba(235,235,245,.3);
  --ok: #2fd27a; --bad: #ff7a45; --warn: #ffb020;
  --glass: rgba(26,26,29,.82); --seg-on: #4e4e50;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.4);
  --side: #141416;
}
html[data-theme] body { background: var(--bg); color: var(--text); }
::selection { background: rgba(195,7,63,.3); }

/* Лого */
html.v2 .logo { font-family: "Baloo 2", var(--font); font-weight: 800; font-size: 23px; letter-spacing: -.01em; line-height: 1; color: var(--text); }
html.v2 .logo b { background: linear-gradient(135deg, #c3073f, #e0245e 60%, #ff5c8a); -webkit-background-clip: text; background-clip: text; color: transparent; }
html.v2 .mockdot { background: var(--accent-soft) !important; color: var(--accent) !important; }

/* Карт, тоон карт */
html[data-theme] .card { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
html[data-theme] .a-tile { background: var(--panel) !important; border: 1px solid var(--line); border-radius: 16px !important; box-shadow: var(--shadow); }
html.v2 .a-tile > b { font-family: var(--font-num); letter-spacing: -.02em; }
html.v2 .step-h h3 { font-weight: 750; letter-spacing: -.02em; }

/* Товч, chip, оролт */
html[data-theme] .btn { background: var(--accent); color: #fff; border-radius: 12px; font-weight: 700; box-shadow: 0 4px 14px rgba(195,7,63,.25); }
html[data-theme] .btn:hover { background: var(--accent-press); }
html[data-theme] .btn.ghost { background: var(--panel); color: var(--text); box-shadow: none; border: 1px solid var(--line2); }
html[data-theme] .chip { border: 1px solid var(--line2); background: var(--panel); color: var(--text); }
html[data-theme] .chip:hover { border-color: var(--faint); }
html[data-theme] .chip.on { background: var(--accent); color: #fff; border-color: transparent; }
html[data-theme] .seg { background: var(--fill); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
html[data-theme] .seg button { border-radius: 9px; color: var(--muted); font-weight: 600; }
html[data-theme] .seg button.on { background: var(--seg-on); color: var(--text); box-shadow: 0 1px 3px rgba(16,24,40,.12), inset 0 0 0 1px var(--line); }
html[data-theme] .p-views button.on, html[data-theme] #dF button.on { background: var(--accent); color: #fff; }
html[data-theme] input, html[data-theme] select, html[data-theme] textarea { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
html[data-theme] input:focus, html[data-theme] select:focus, html[data-theme] textarea:focus { border-color: rgba(195,7,63,.55); box-shadow: 0 0 0 3px rgba(195,7,63,.14); outline: none; }
html[data-theme] .pos { color: var(--ok); } html[data-theme] .neg { color: var(--bad); }
html[data-theme] .p-srcb.csb { background: rgba(91,124,255,.14); color: #5b7cff; }
html[data-theme] .p-srcb.cf { background: rgba(245,165,36,.16); color: #c98208; }
html[data-theme] .p-srcb.own { background: var(--fill); color: var(--muted); }
html[data-theme] .d-row { border: 1px solid var(--line); background: var(--panel); border-radius: 16px; }
html[data-theme] .d-row.d-pay { border-color: rgba(229,72,77,.5); }
html[data-theme] .d-items { background: var(--panel2); border: 1px solid var(--line); }

/* ===== PC: зүүн sidebar (≥1024px) ===== */
.sidebar { display: none; }
@media (min-width: 1024px) {
  body.side-on .sidebar { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 232px; z-index: 40; background: var(--side); color: var(--side-text); padding: 20px 14px; gap: 4px; border-right: 1px solid var(--side-line); }
  .sidebar .logo { color: #fff; padding: 4px 10px 18px; display: block; font-size: 24px; }
  .sidebar .sb-h { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.35); padding: 14px 12px 6px; font-weight: 700; }
  .sidebar a, .sidebar button.sb-a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--side-text); font-weight: 600; font-size: 14px; text-decoration: none !important; border: 0; background: none; cursor: pointer; font-family: inherit; text-align: left; width: 100%; }
  .sidebar a svg, .sidebar button.sb-a svg { width: 20px; height: 20px; flex-shrink: 0; }
  .sidebar a:hover, .sidebar button.sb-a:hover { background: rgba(255,255,255,.06); color: #fff; }
  .sidebar a.on { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(195,7,63,.35); }
  .sidebar .sb-sp { flex: 1; }
  .sidebar .sb-ver { font-size: 11px; color: rgba(255,255,255,.3); padding: 8px 12px 0; }
  body.side-on { padding-left: 232px; }
  body.side-on header.top { margin-left: 0; margin-right: 0; padding-left: 28px; padding-right: 28px; }
  body.side-on header.top .logo, body.side-on header.top .topnav { display: none; }
  body.side-on .wrap, body.side-on .page { max-width: 1240px; padding-left: 28px; padding-right: 28px; }
  body.side-on .bar { left: calc(50% + 116px) !important; }
}
.hd-title { font-weight: 800; font-size: 22px; letter-spacing: -.02em; display: none; }
@media (min-width: 1024px) { body.side-on .hd-title { display: block; } }

/* ===== Утас: доод цэс ===== */
@media (max-width: 720px) {
  .tabbar { grid-template-columns: repeat(var(--tabn, 5), 1fr) !important; }
  html[data-theme] .tabbar { background: var(--glass); border-top: 1px solid var(--line); }
  html.v2 .tabbar a { font-size: 10.5px !important; }
  html.v2 .tabbar a svg { width: 22px; height: 22px; }
  html.v2 .tabbar a.on { color: var(--accent) !important; }
  .step-h { flex-wrap: wrap; gap: 8px; } .p-addb { margin-left: auto; }
}

/* ===== Хянах самбар (Dashboard) ===== */
.db { display: grid; gap: 16px; }
.db-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.db-k { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.db-k .k-t { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.db-k .k-v { font-family: var(--font-num); font-size: 26px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-k .k-s { font-size: 12px; color: var(--muted); }
.db-k .k-badge { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.db-k .k-badge.pos { background: rgba(18,161,80,.12); } .db-k .k-badge.neg { background: rgba(229,72,77,.12); }
.db-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.db-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.db-c { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.db-c h4 { margin: 0 0 12px; font-size: 15px; font-weight: 750; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.db-c h4 .muted { font-weight: 500; font-size: 12px; }
.db-big { font-family: var(--font-num); font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.db-line svg { width: 100%; height: 190px; display: block; overflow: visible; }
.db-line .ax { font-size: 10px; fill: var(--muted); }
.db-donut { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; }
.db-donut svg { width: 150px; height: 150px; }
.db-leg { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.db-leg div { display: flex; align-items: center; gap: 8px; } .db-leg i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; } .db-leg b { margin-left: auto; font-family: var(--font-num); }
.db-list { display: flex; flex-direction: column; }
.db-it { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.db-it:last-child { border-bottom: 0; }
.db-it .thumb { width: 44px; height: 33px; border-radius: 8px; background: var(--panel2); display: grid; place-items: center; overflow: hidden; }
.db-it .thumb img { width: 100%; height: 100%; object-fit: contain; }
.db-it .t1 { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-it .t2 { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-it .r { text-align: right; font-size: 13px; font-weight: 700; font-family: var(--font-num); white-space: nowrap; }
.db-it .r small { display: block; font-weight: 500; color: var(--muted); font-family: var(--font); }
.db-bar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; margin-top: 4px; } .db-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.db-empty { color: var(--muted); font-size: 13px; padding: 10px 0; }
@media (max-width: 1100px) { .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .db-row, .db-row3 { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .db-kpis { gap: 10px; } .db-k { padding: 14px; } .db-k .k-v { font-size: 20px; } .db-donut { grid-template-columns: 110px 1fr; } .db-donut svg { width: 110px; height: 110px; } }

/* ===== Inventory карт: зэрэглэлийн өнгө, float bar ===== */
html.v2 #pRows.p-grid { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
html[data-theme] .p-ic { --rc: #9aa0ab; padding: 12px; border-radius: 16px; border: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
html[data-theme] .p-ic::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--rc); }
html[data-theme] .p-ic .p-ic-img { border-radius: 12px; background: radial-gradient(90% 80% at 50% 40%, color-mix(in srgb, var(--rc) 20%, transparent), transparent 75%), var(--panel2); aspect-ratio: 16/11; }
@media (hover: hover) { html[data-theme] .p-ic:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--rc) 50%, var(--line)); } }
.p-ic.r-gold { --rc: #e4ae39; } .p-ic.r-covert { --rc: #eb4b4b; } .p-ic.r-classified { --rc: #d32ce6; } .p-ic.r-restricted { --rc: #8847ff; }
.p-ic.r-milspec { --rc: #4b69ff; } .p-ic.r-industrial { --rc: #5e98d9; } .p-ic.r-consumer { --rc: #b0c3d9; } .p-ic.r-contraband { --rc: #e4ae39; }
html[data-theme] .p-ic-b { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
html.v2 .p-ic-s { font-weight: 750; } html.v2 .p-ic-pr { font-family: var(--font-num); }
.p-ic-lock .p-ic-img img { opacity: .7; }
.fbar { position: relative; height: 4px; border-radius: 3px; margin: 2px 0 4px; background: linear-gradient(90deg, #2fd27a 0 7%, #9bdc3c 7% 15%, #f5d63d 15% 38%, #ff9f2f 38% 45%, #ff4d4f 45% 100%); }
.fbar i { position: absolute; top: -3px; width: 3px; height: 10px; border-radius: 2px; background: var(--text); box-shadow: 0 0 0 1.5px var(--panel); transform: translateX(-50%); }
@media (max-width: 720px) { html.v2 #pRows.p-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
/* ---- 2.0 / vault жишээ: KPI карт, sidebar, хүснэгт ---- */
.db-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.db-k { gap: 4px; padding: 16px 16px 14px; }
.db-k .k-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.db-k .k-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.db-k .k-ic svg { width: 20px; height: 20px; }
.db-k .k-go { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line2); color: var(--muted); }
.db-k .k-go:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.db-k .k-go svg { width: 15px; height: 15px; }
.db-k .k-t { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.db-k .k-v { font-size: 25px; display: flex; align-items: center; gap: 10px; }
.db-k .k-bar { flex: 1; height: 10px; border-radius: 6px; background: var(--fill); overflow: hidden; min-width: 40px; }
.db-k .k-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #950740, #c3073f); }
.db-k .k-s { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-badge { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.k-badge.pos { background: rgba(18,161,80,.12); color: var(--ok); } .k-badge.neg { background: rgba(229,72,77,.12); color: var(--bad); }
.db-k.dark { background: #15161a; border-color: #15161a; color: #fff; }
html[data-theme="dark"] .db-k.dark { background: linear-gradient(135deg, #c3073f, #6f2232); border-color: transparent; }
.db-k.dark .k-t, .db-k.dark .k-s { color: rgba(255,255,255,.7); }
.db-k.dark .k-v { color: #fff !important; }
.db-k.dark .k-ic { background: rgba(195,7,63,.2); color: #ff4d79; }
html[data-theme="dark"] .db-k.dark .k-ic { background: rgba(255,255,255,.2); color: #fff; }
.db-k.dark .k-go { border-color: rgba(255,255,255,.25); color: #fff; }
.db-k.dark .k-badge.pos { background: rgba(47,210,122,.18); color: #4ade80; }
html[data-theme="dark"] .db-k.dark .k-badge { background: rgba(255,255,255,.2); color: #fff; }
.db-hr { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.db-yr button { padding: 4px 10px; font-size: 12px; }
.db-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin: -4px 0 6px; } .db-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.db-line { position: relative; } .db-line svg { height: 220px; }
.db-line .ax.cur { fill: var(--accent); font-weight: 800; }
.db-tip { position: absolute; top: 6px; min-width: 140px; padding: 8px 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 12.5px; pointer-events: none; display: flex; flex-direction: column; gap: 2px; }
.db-row3b { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.db-q { padding: 6px 10px !important; font-size: 12.5px; width: 140px; }
.db-tbl { display: flex; flex-direction: column; }
.db-tr { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; border-radius: 8px; }
.db-tr:hover:not(.db-th) { background: var(--panel2); }
.db-tr3 { grid-template-columns: minmax(0, 1fr) auto auto; }
.db-th { font-size: 11.5px; color: var(--muted); font-weight: 600; cursor: default; padding-top: 0; }
.db-sk { display: flex; align-items: center; gap: 10px; min-width: 0; } .db-sk .thumb { width: 40px; height: 30px; border-radius: 8px; background: var(--panel2); flex-shrink: 0; display: grid; place-items: center; overflow: hidden; } .db-sk .thumb img { width: 100%; height: 100%; object-fit: contain; }
.db-sk .t1, .db-tr > .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.db-am { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--font-num); } .db-am small { font-size: 11.5px; font-weight: 700; }
.db-st { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; justify-self: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; background: var(--fill); color: var(--muted); }
.db-st.s-done { background: rgba(18,161,80,.12); color: var(--ok); } .db-st.s-pay { background: rgba(229,72,77,.12); color: var(--bad); } .db-st.s-wait { background: rgba(245,165,36,.15); color: #c98208; }
.db-best { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.db-best-im { aspect-ratio: 16/9; border-radius: 14px; display: grid; place-items: center; overflow: hidden; margin-bottom: 6px; background: radial-gradient(70% 70% at 50% 45%, rgba(195,7,63,.18), transparent 70%), var(--panel2); }
.db-best-im img { width: 80%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 16px rgba(0,0,0,.35)); }
.db-best .t1 { font-weight: 750; }
@media (max-width: 1280px) { .db-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .db-row3b { grid-template-columns: 1fr 1fr; } .db-row3b > :first-child { grid-column: 1 / -1; } }
@media (max-width: 720px) { .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .db-kpis > :first-child { grid-column: 1 / -1; } .db-row3b { grid-template-columns: 1fr; } .db-tr { grid-template-columns: minmax(0, 1.6fr) auto; } .db-tr > :nth-child(2), .db-tr > :nth-child(4) { display: none; } .db-tr3 > :nth-child(2) { display: block; } .db-tr3 { grid-template-columns: minmax(0, 1fr) auto auto; } .db-q { width: 100px; } }
/* Sidebar: идэвхтэй цэс зүүн талдаа улаан зураастай */
@media (min-width: 1024px) {
  .sidebar a.on { background: rgba(255,255,255,.04) !important; color: var(--accent) !important; box-shadow: none !important; position: relative; }
  .sidebar a.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
  .sb-goal { margin: 8px 2px 4px; padding: 14px; border-radius: 16px; background: #fff; color: #15161a; }
  html[data-theme="dark"] .sb-goal { background: #1c1d22; color: #fff; }
  .sb-goal .g-t { font-size: 13px; font-weight: 750; margin-bottom: 2px; } .sb-goal .g-s { font-size: 11.5px; opacity: .65; margin-bottom: 10px; }
  .sb-goal .g-bar { height: 8px; border-radius: 5px; background: rgba(127,127,127,.2); overflow: hidden; } .sb-goal .g-bar i { display: block; height: 100%; background: linear-gradient(90deg, #950740, #c3073f); border-radius: 5px; }
}
.sb-goal { display: none; } @media (min-width: 1024px) { .sb-goal { display: block; } }
@media (min-width: 1024px) { .sidebar a.sb-goal { display: block !important; padding: 14px !important; color: #15161a !important; background: #fff !important; } html[data-theme="dark"] .sidebar a.sb-goal { background: #1c1d22 !important; color: #fff !important; } .sidebar a.sb-goal:hover { filter: brightness(.97); } }
.db-tr { grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) auto auto; }
.db-tr3 { grid-template-columns: minmax(0, 1fr) auto auto; }
/* ---- Inventory хүснэгт (StockPro жишээ) ---- */
.p-ginfo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .p-ginfo .p-vsw { margin-left: auto; }
.p-vsw button { padding: 5px 10px; font-size: 12.5px; }
.t-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 8px; } .t-bar .p-vsw { margin-left: auto; }
.t-bar .seg button { padding: 6px 12px; font-size: 13px; }
.t-fl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .t-fl select { padding: 6px 10px; font-size: 12.5px; max-width: 190px; }
.t-sum { margin: 0 2px 8px; }
.t-tbl { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); }
.t-tr { display: grid; grid-template-columns: 34px minmax(220px, 2.4fr) minmax(70px, .8fr) minmax(90px, 1fr) minmax(76px, .8fr) minmax(130px, 1.2fr) minmax(90px, .9fr) minmax(100px, .9fr) minmax(90px, .9fr) 36px; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; cursor: pointer; }
.t-tr:last-child { border-bottom: 0; }
.t-tr:not(.t-th):hover { background: var(--panel2); }
.t-th { background: var(--panel2); cursor: default; font-size: 12px; position: sticky; top: 0; }
.t-h { background: none; border: 0; padding: 4px 0; font: inherit; font-weight: 700; color: var(--muted); text-align: left; cursor: pointer; white-space: nowrap; }
.t-h.on { color: var(--accent); } .t-h.r, .t-tr .r { text-align: right; justify-self: end; }
.t-nm { display: flex; align-items: center; gap: 10px; min-width: 0; }
.t-th.thumb, .t-tr .t-th { width: 52px; height: 39px; border-radius: 8px; background: var(--panel2); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.t-tr .t-th img { width: 100%; height: 100%; object-fit: contain; }
.t-nt { min-width: 0; } .t-nt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 650; } .t-nt .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-tr > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-tr .r { font-family: var(--font-num); font-weight: 650; }
.t-pill { display: inline-block; font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 999px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.t-ok { background: rgba(18,161,80,.12); color: var(--ok); } .t-hold { background: rgba(245,165,36,.16); color: #c98208; } .t-list { background: rgba(91,124,255,.14); color: #5b7cff; }
.t-wait { background: rgba(211,44,230,.12); color: #b42fc6; } .t-stale { background: rgba(229,72,77,.12); color: var(--bad); } .t-sold { background: var(--fill); color: var(--muted); } .t-trd { background: rgba(195,7,63,.12); color: var(--accent); }
.t-more { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; border-radius: 8px; width: 30px; height: 30px; } .t-more:hover { background: var(--fill); color: var(--text); }
.t-menu { position: absolute; z-index: 80; min-width: 200px; padding: 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 14px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; }
.t-menu button { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 9px; font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; } .t-menu button:hover:not(:disabled) { background: var(--panel2); } .t-menu button:disabled { opacity: .4; cursor: default; }
.t-pg { display: flex; justify-content: flex-end; gap: 4px; margin-top: 10px; } .t-pg button { min-width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font: inherit; } .t-pg button.on { background: var(--accent); color: #fff; border-color: transparent; } .t-pg button:disabled { opacity: .4; } .t-dots { padding: 6px; color: var(--muted); }
.t-empty { padding: 24px; }
@media (max-width: 1200px) { .t-tr { grid-template-columns: 30px minmax(200px, 2.4fr) minmax(70px, .8fr) minmax(76px, .8fr) minmax(130px, 1.2fr) minmax(90px, .9fr) minmax(100px, .9fr) minmax(90px, .9fr) 34px; } .t-lg { display: none; } }
@media (max-width: 900px) { .t-tr { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) auto 30px; } .t-tr > .t-id, .t-tr > .t-md, .t-tr > .t-lg, .t-tr.t-th > .t-md, .t-tr.t-th > .t-lg, .t-tr.t-th > :first-child { display: none; } .t-tr > :nth-child(8) { display: none; } }
.t-fl select { width: auto !important; }
.t-tbl { overflow-x: auto; }
.t-tr { grid-template-columns: 30px minmax(190px, 2.2fr) minmax(64px, .7fr) minmax(84px, .9fr) minmax(70px, .7fr) minmax(120px, 1.1fr) minmax(86px, .8fr) minmax(96px, .9fr) minmax(90px, .9fr) 32px; gap: 8px; min-width: 980px; }
@media (max-width: 1200px) { .t-tr { grid-template-columns: 28px minmax(180px, 2.2fr) minmax(64px, .7fr) minmax(70px, .7fr) minmax(120px, 1.1fr) minmax(86px, .8fr) minmax(96px, .9fr) minmax(90px, .9fr) 32px; min-width: 860px; } }
@media (max-width: 900px) { .t-tr { grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr) auto 30px; min-width: 0; } }
@media (min-width: 1024px) { body.side-on main, body.side-on .lab-main { max-width: 1240px; } }
@media (min-width: 1024px) { body.side-on main.page { max-width: 1280px !important; } }
/* ---- 2.0 / Vertex жишээ ---- */
/* Цайвар sidebar (цайвар горимд), идэвхтэй цэс зөөлөн дөрвөлжин */
html[data-theme="light"] { --side: #ffffff; --side-text: #4b5060; --side-on: #15161a; --side-line: #e7e8ec; }
@media (min-width: 1024px) {
  html[data-theme="light"] .sidebar .logo { color: #15161a; }
  html[data-theme="light"] .sidebar .sb-h { color: #9aa0ab; }
  html[data-theme="light"] .sidebar a:hover, html[data-theme="light"] .sidebar button.sb-a:hover { background: #f3f4f6; color: #15161a; }
  .sidebar a.on { background: var(--accent-soft) !important; color: var(--accent) !important; }
  .sidebar a.on::before { display: none; }
  html[data-theme="light"] .sidebar a.sb-goal { background: #f7f7f9 !important; border: 1px solid #e7e8ec; }
  html[data-theme="light"] .sidebar .sb-ver { color: #b0b4bd; }
}
/* Мэнд + туслах товчнууд */
.db-hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.db-hello h2 { font-size: 26px; margin-top: 2px; }
.db-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.db-act { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; box-shadow: var(--shadow); }
.db-act:hover { border-color: var(--faint); }
.db-act .ic { font-size: 13px; font-weight: 800; color: var(--muted); }
.db-act.main { background: #15161a; color: #fff; border-color: #15161a; } .db-act.main .ic { color: #fff; }
html[data-theme="dark"] .db-act.main { background: var(--accent); border-color: var(--accent); }
/* Товч дүгнэлт + график */
.db-ov { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: center; }
.db-ins { font-size: 12.5px; color: var(--muted); line-height: 1.5; } .db-ins p { margin: 0 0 6px; } .db-ins-h { font-weight: 750; color: var(--accent); margin-bottom: 6px; font-size: 12px; }
@media (max-width: 720px) { .db-ov { grid-template-columns: 1fr; } }
/* Мөнгөний урсгал */
.db-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.db-fl { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--panel2); }
.db-stk { display: flex; gap: 3px; height: 22px; border-radius: 6px; overflow: hidden; background: var(--fill); } .db-stk i { display: block; height: 100%; border-radius: 4px; min-width: 3px; }
.db-stk-l { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); } .db-stk-l i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
@media (max-width: 720px) { .db-flow { grid-template-columns: 1fr; } .db-hello h2 { font-size: 21px; } }
/* Гүйлгээ: дээд 3 өнгөт карт */
.d-top3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 6px 0 12px; }
.d-tc { position: relative; overflow: hidden; border-radius: 18px; padding: 16px; border: 1px solid var(--line); background: var(--panel); min-height: 110px; }
.d-tc::after { content: ""; position: absolute; inset: 0; opacity: .55; pointer-events: none; filter: blur(18px); }
.d-tc.net::after { background: radial-gradient(60% 80% at 85% 20%, #8fb0ff, transparent 60%), radial-gradient(50% 70% at 60% 90%, #d6b8ff, transparent 60%); }
.d-tc.in::after { background: radial-gradient(60% 80% at 85% 20%, #7be0a6, transparent 60%), radial-gradient(50% 70% at 60% 90%, #ffd59a, transparent 60%); }
.d-tc.out::after { background: radial-gradient(60% 80% at 85% 20%, #e88aa5, transparent 60%), radial-gradient(50% 70% at 60% 90%, #c3073f55, transparent 60%); }
.d-tc > * { position: relative; z-index: 1; }
.d-tc-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); font-weight: 800; margin-bottom: 12px; }
.d-tc-v { font-family: var(--font-num); font-size: 21px; font-weight: 800; } .d-tc-t { font-size: 12.5px; color: var(--muted); font-weight: 600; } .d-tc-s { font-size: 11.5px; color: var(--faint); }
@media (max-width: 720px) { .d-top3 { grid-template-columns: 1fr; } }
/* Гүйлгээний хүснэгт */
.d-vsw { margin: 0 0 8px auto; display: flex; width: max-content; }
.d-tr { grid-template-columns: 92px minmax(120px, 1.1fr) minmax(200px, 2fr) minmax(80px, .7fr) minmax(110px, .9fr) minmax(90px, .8fr) minmax(90px, .8fr) 24px !important; min-width: 900px; }
.d-who { display: flex; align-items: center; gap: 8px; min-width: 0; } .d-who > span:last-child { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.d-av-s2 { width: 26px; height: 26px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; overflow: hidden; font-size: 11px; font-weight: 800; flex-shrink: 0; } .d-av-s2 img { width: 100%; height: 100%; object-fit: cover; }
.d-skn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.d-ft { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; } .d-ft-sp { flex: 1; } .d-ft select { width: auto !important; padding: 6px 10px; font-size: 12.5px; }
@media (max-width: 900px) { .d-tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto 20px !important; min-width: 0; } .d-tr > :nth-child(1), .d-tr > :nth-child(4), .d-tr > :nth-child(5), .d-tr > :nth-child(7) { display: none; } }

/* Бэлэн текст хуулах мөр */
.tpl-row { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; margin-top: 10px; }
.tpl-row::-webkit-scrollbar { display: none; }
.tpl-row .chip { flex: none; font-size: 12px; padding: 6px 11px; }
.tpl-row > span { flex: none; }

/* Skin-ий дэлгэрэнгүй (график) */
.sk-sheet { position: relative; }
.sk-hd { display: flex; gap: 12px; align-items: center; padding-right: 34px; }
.sk-img { width: 84px; height: 62px; flex: none; border-radius: 12px; background: var(--fill); display: grid; place-items: center; overflow: hidden; }
.sk-img { padding: 6px 7px; box-sizing: border-box; } /* урт буу булангийн бөөрөнхийд тасрахгүй */
.sk-img { position: relative; } .sk-img img { position: absolute; inset: 6px 7px; width: calc(100% - 14px); height: calc(100% - 12px); object-fit: contain; object-position: center; filter: drop-shadow(0 0 5px rgba(0,0,0,.35)); } /* яг голд: хайрцгийн дотор талд contain (сүүдэр доош түлхэхгүй) */
.sk-img .p-noimg { font-size: 22px; color: var(--muted); }
.sk-ti h3 { margin: 2px 0 0; font-size: 18px; }
.sk-kpi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sk-kpi > div { background: var(--fill); border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; }
.sk-kpi b { font-size: 15px; }
.sk-kpi .sk-src { font-size: 11.5px; font-weight: 600; margin-top: -1px; }
.sk-chart { position: relative; }
.sk-chart svg { width: 100%; height: auto; display: block; }
.sk-chart .ax { font-size: 19px; fill: var(--muted); }
.sk-lg { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.sk-lg span { display: inline-flex; align-items: center; gap: 6px; }
.sk-lg i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.sk-lg i.dash { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); }
.sk-lg i.ring { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--text); }
.sk-note:empty { display: none; }
.sk-act { display: flex; gap: 8px; }
.sk-act .btn { flex: 1; }
.sk-sheet .sheet-x { position: absolute; right: 14px; top: 14px; margin: 0; float: none; }
.sk-chart .db-tip { background: var(--panel, var(--card, #fff)); border: 1px solid var(--line2, var(--line)); box-shadow: var(--shadow, 0 6px 20px rgba(0,0,0,.18)); }

.t-pf small { display: block; font-size: 11.5px; font-weight: 600; opacity: .85; }

.sk-tr { display: flex; align-items: center; gap: 6px; opacity: .7; }
.sk-tr.on { opacity: 1; font-weight: 600; }
.sk-tr i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sk-chart .db-tip { min-width: 200px; } .sk-tr span { white-space: nowrap; }
/* 2.0: Зарах хуудасны доод хэсэг ба хайлтын мөр — шинэ өнгө, байршил */
html[data-theme] .s-foot { background: var(--panel, #fff); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow, 0 8px 24px rgba(0,0,0,.08)); }
html[data-theme] .s-foot .s-tot input { background: var(--panel2, var(--fill)); color: var(--text); }
html[data-theme] .s-qrow { align-items: stretch; }
html[data-theme] .s-qrow .p-q { flex: 1 1 auto; min-width: 0; width: auto; margin: 0; }
html[data-theme] .s-qrow select { flex: 0 0 auto; width: auto; min-width: 140px; }
/* Тохиргоо: ангиллын гарчиг */
.set-h { margin: 16px 4px 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sheet h3 + .set-h { margin-top: 6px; }
/* Тохиргоо — цэс (профайл + ангилал), хэсэг рүү гулсаж орно */
.sheet .set-sec { display: none; }
.sheet .set-sec.on { display: block; animation: setIn .22s ease; }
.sheet:not([data-view="menu"]) .set-menu { display: none; }
.sheet[data-view="menu"] .set-menu { animation: setBack .2s ease; }
@keyframes setIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes setBack { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }
.set-prof { display: flex; align-items: center; gap: 14px; padding: 6px 6px 18px; margin-bottom: 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.set-ava { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 22px; color: #fff; background: linear-gradient(135deg, var(--accent, #c3073f), #950740); }
.set-ava img { width: 100%; height: 100%; object-fit: cover; }
.set-prof b { font-size: 17px; }
.set-nav { display: grid; gap: 4px; }
.set-it { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 14px; border: 0; border-radius: 14px; background: transparent; color: var(--text); font: inherit; font-size: 15.5px; text-align: left; cursor: pointer; transition: background .15s; }
.set-it:hover, .set-it.on { background: var(--fill, rgba(127,127,127,.12)); }
.set-it.on { font-weight: 700; }
.set-it i { width: 24px; height: 24px; flex: none; display: grid; place-items: center; }
.set-it i svg { width: 22px; height: 22px; }
.set-it span { flex: 1; min-width: 0; display: grid; }
.set-it small { font-size: 12px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-it small:empty { display: none; }
.set-it em { font-style: normal; color: var(--muted); font-size: 18px; }
.set-sh { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.set-sh b { display: none; }
.set-back { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--fill, rgba(127,127,127,.14)); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.set-back::after { content: ' Буцах'; font-size: 0; }
.set-sh { height: 0; margin: 0; }
.set-back { position: absolute; left: 18px; top: 26px; z-index: 3; }
/* Зарах: доод «Нийт үнэ» хэсэг утсанд доод цэсний дээр зогсоно; хайлтын мөр бүх загварт */
@media (max-width: 720px) { body #sFoot { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); } }
.s-qrow { align-items: stretch; }
.s-qrow .p-q { flex: 1 1 auto; min-width: 0; width: auto; margin: 0; }
.s-qrow select { flex: 0 0 auto; width: auto; min-width: 120px; }
.s-foot { background: var(--panel, #1b1b1b); color: var(--text); border: 1px solid var(--line); }
.sk-sheet .pos { color: var(--ok, #22c55e); } .sk-sheet .neg { color: var(--bad, #ff7a45); }
/* Самбар (цэгцэлсэн): 6 карт · Гүйлгээ+Шинэ skin · график · урсгал+шилдэг; утсанд нэмэлтийг хураана */
.db-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-row2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
.db-more { display: none; width: 100%; }
@media (max-width: 1100px) { .db-row2 { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-more { display: block; }
  #dbRoot:not(.db-open) .db-mh { display: none; }
}
@media (max-width: 720px) { .db-kpis > :last-child:nth-child(even) { grid-column: 1 / -1; } }

.pf-est { opacity: .65; font-style: italic; }

.k-hold { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; }
.k-hold b { font-size: 15px; } .k-next { flex-basis: 100%; font-size: 12.5px; color: var(--ok); font-weight: 600; } /* дараагийн Hold гарах цаг */

.db-ov.solo { grid-template-columns: minmax(0, 1fr); }
.db-line .ax-b { fill: #8a8a8e; opacity: .8; }

/* Лого: Karambit тэмдэг + NEUSKINS */
.logo { display: inline-flex; align-items: center; gap: 9px; }
.logo-mk { width: 28px; height: 28px; border-radius: 8px; flex: none; box-shadow: 0 2px 8px rgba(195,7,63,.35); }
.sidebar .logo { display: flex; }
.sidebar .logo-mk { width: 32px; height: 32px; border-radius: 9px; }
/* 👁 Нуух: 2.0 Самбар, хүснэгт, график, Hold зэрэг шинэ хэсгийн дүн */
html.priv :is(.db-k .k-v, .db-k .k-s, .k-hold, .db-big, .db-line, .db-donut text, .db-leg, .db-fl, .db-tbl .r, .db-tbl b, #dbBest, #dbIns, .t-tr .r, .t-pf, .pf-est, .sk-kpi b, .sk-chart, #sbGoalS, .d-top3 b, .d-tc b, #sTotal, .s-foot b, .sk-tr) { filter: blur(9px); }
/* Самбарын хүснэгтүүд: мөр бүр ижил баганын өргөнтэй (auto биш) — гарчиг яг үгнийхээ дээр */
.db-tr { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 118px 158px; }
.db-tr > :nth-child(3) { text-align: right; justify-self: end; }
.db-tr > :nth-child(4) { justify-self: start; }
.db-tr3 { grid-template-columns: minmax(0, 1fr) 52px 104px; }
.db-tr3 > :nth-child(2) { text-align: right; }
.db-tr3 > :nth-child(3) { text-align: right; justify-self: end; }
@media (max-width: 720px) { .db-tr { grid-template-columns: minmax(0, 1fr) 110px; } .db-tr > :nth-child(2), .db-tr > :nth-child(4) { display: none; } }
.db-act .ic { display: inline-grid; place-items: center; } .db-act .ic svg { display: block; }
/* Inventory хүснэгт: 100% zoom-д хэвтээ гүйлгэхгүй багтана. Өргөн багахан бол Байршил → Дэд төрөл → Төрөл гэх мэтээр нуугдана. */
.t-tbl { overflow-x: visible; }
.t-tr { grid-template-columns: 28px minmax(0, 2.2fr) minmax(0, .7fr) minmax(0, .9fr) minmax(0, .6fr) 128px minmax(88px, .8fr) minmax(98px, .9fr) minmax(98px, .9fr) 30px; min-width: 0; gap: 8px; }
@media (max-width: 1500px) { .t-tr { grid-template-columns: 28px minmax(0, 2.2fr) minmax(0, .7fr) minmax(0, .9fr) 128px minmax(88px, .8fr) minmax(98px, .9fr) minmax(98px, .9fr) 30px; } .t-tr > .t-xl { display: none; } }
@media (max-width: 1200px) { .t-tr { grid-template-columns: 28px minmax(0, 2.2fr) minmax(0, .7fr) 128px minmax(88px, .8fr) minmax(98px, .9fr) minmax(98px, .9fr) 30px; } .t-tr > .t-lg, .t-tr > .t-xl { display: none; } }
@media (max-width: 900px) { .t-tr { grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr) auto 30px; } }
.t-tr .t-pill { white-space: nowrap; }
.d-tbl { overflow-x: auto; }
/* ===== iPhone 17 Pro (402×874) ба бусад утас: нягт, жигд ===== */
.d-skw { display: grid; min-width: 0; } .d-skw .d-skn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-mline, .t-mst { display: none; }
@media (max-width: 720px) {
  /* Самбар: 6 карт 2×3 жигд, нягт */
  .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .db-kpis > :first-child, .db-kpis > :last-child:nth-child(even) { grid-column: auto !important; }
  .db-k { padding: 14px; border-radius: 18px; }
  .db-k .k-ic { width: 34px; height: 34px; } .db-k .k-go { width: 30px; height: 30px; }
  .db-k .k-t { font-size: 12.5px; margin-top: 8px; } .db-k .k-v { font-size: 19px; } .db-k .k-s { font-size: 11.5px; }
  .k-hold { font-size: 11.5px; } .k-hold b { font-size: 13px; }
  /* График: хоосон зай үлдэхгүй, гарчиг хоёр мөрөнд цэгцтэй */
  .db-line svg { height: auto !important; aspect-ratio: 640 / 220; }
  .db-c h4 { flex-wrap: wrap; row-gap: 6px; } .db-hr { width: 100%; justify-content: space-between; }
  .db-hr .db-big { font-size: 22px; }
  /* Гүйлгээ: 3 дүн нэг мөрөнд жижиг */
  .d-top3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px; }
  .d-tc { min-height: 0; padding: 10px; border-radius: 14px; }
  .d-tc-ic { width: 22px; height: 22px; font-size: 11px; margin-bottom: 6px; border-radius: 7px; }
  .d-tc-v { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .d-tc-t { font-size: 10.5px; } .d-tc-s { font-size: 10px; }
  /* Гүйлгээний хүснэгт: Skin (доор нь хэн · төлөв) | Дүн, ашиг */
  .d-tr { grid-template-columns: minmax(0, 1fr) auto 14px !important; }
  .d-tr > :nth-child(2), .d-tr > :nth-child(5), .d-tr > :nth-child(7) { display: none !important; }
  .d-tr:not(.t-th) > :nth-child(6) { display: grid; text-align: right; }
  .d-mline { display: flex; align-items: center; gap: 6px; font-size: 11.5px; min-width: 0; } .d-mline .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .d-mline .t-pill { font-size: 10.5px; padding: 1px 7px; }
  .t-pg { flex-wrap: wrap; justify-content: space-between; gap: 6px; } .t-pg button { height: 32px; padding: 0 10px; font-size: 12.5px; }
  /* Inventory хүснэгт: Skin (доор нь төлөв) | Ашиг | ⋯ */
  .t-tr:not(.d-tr) { grid-template-columns: minmax(0, 1fr) auto 26px !important; }
  .t-tr:not(.d-tr) > :nth-child(6) { display: none !important; }
  .t-mst { display: inline-block; margin-top: 3px; font-size: 10.5px; padding: 1px 7px; width: fit-content; }
  .t-tr .t-th { width: 44px; height: 33px; }
  /* Зарах: гарчгийн мөр таслахгүй */
  .s-qrow select { min-width: 104px; }
}
@media (max-width: 720px) {
  .d-tc-v { font-size: 12.5px; text-overflow: clip; }
  .d-tr { grid-template-columns: minmax(0, 1fr) auto auto 12px !important; gap: 8px !important; }
  .d-tr > :nth-child(7) { display: block !important; font-size: 12px; }
  .d-tr.t-th > :nth-child(7) { display: block !important; }
  .t-pg > :nth-child(3) { display: none; } /* «10 / хуудас» утсанд нуугдана, товчнууд нэг мөрөнд */
}
@media (max-width: 720px) {
  /* Гүйлгээ мөр: Skin (2 мөр) | Дүн дээр, ашиг доор | › */
  .d-tr:not(.t-th) { grid-template-columns: minmax(0, 1fr) auto 12px !important; row-gap: 2px !important; }
  .d-tr:not(.t-th) > :nth-child(3) { grid-column: 1; grid-row: 1 / 3; }
  .d-tr:not(.t-th) > :nth-child(6) { grid-column: 2; grid-row: 1; align-self: end; }
  .d-tr:not(.t-th) > :nth-child(7) { grid-column: 2; grid-row: 2; align-self: start; justify-self: end; }
  .d-tr:not(.t-th) > :nth-child(8) { grid-column: 3; grid-row: 1 / 3; }
  .d-tr.t-th { grid-template-columns: minmax(0, 1fr) auto 12px !important; }
  .d-tr.t-th > :nth-child(7) { display: none !important; }
  /* Хуудаслалт нэг мөрөнд: CSV, хуудас тоо хураана */
  .d-ft { flex-wrap: nowrap; gap: 6px; } .d-ft select { display: none; } .d-ft .chip { padding: 6px 10px; font-size: 12.5px; white-space: nowrap; }
}
@media (max-width: 720px) {
  /* Статистик/Гүйлгээ: 2 баганат tile-ийн сүүлийн ганц нь бүтэн өргөнөөр (хоосон зай үлдэхгүй) */
  .a-tile:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
}
.db-act.main { background: var(--accent); border-color: var(--accent); color: #fff; } /* цайвар/бараан хоёуланд ижил Crimson */
/* Sidebar-ын лого: цэсний холбоос шиг hover дэвсгэр, том gap авахгүй */
.sidebar a.logo, .sidebar a.logo:hover, .sidebar a.logo.on { background: none !important; box-shadow: none !important; gap: 9px; padding: 4px 10px 18px; font-size: 24px; }
.sidebar a.logo:hover .logo-mk { transform: scale(1.04); } .logo-mk { transition: transform .15s; }
/* Самбар: бүх 2 баганат мөр ижил харьцаатай (карт бүрийн зах дээш доошоо таарна) */
.db-row, .db-row2 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .db-row, .db-row2 { grid-template-columns: 1fr; } }
/* Хүснэгтийн сүүлийн мөрөнд доод зураас үлдэхгүй */
.db-tbl > .db-tr:last-child { border-bottom: 0; }
/* Мөнгөний урсгал: 6 сарын график картын доод зайг дүүргэнэ */
.db-fl6 { grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 4px; }
.db-fl6-g svg { width: 100%; height: auto; display: block; }
.db-fl6-g .ax { font-size: 12px; fill: var(--muted); } .db-fl6-g .ax.cur { fill: var(--accent); font-weight: 800; }
.db-fl6-g .ax.pos { fill: var(--ok); font-weight: 700; } .db-fl6-g .ax.neg { fill: var(--bad); font-weight: 700; }
.db-row2 > .db-c { display: flex; flex-direction: column; } .db-row2 > .db-c > .db-flow, .db-row2 > .db-c > .db-tbl { flex: 1; }
/* Самбар: Гүйлгээ ба Шинэ skin хүснэгт ижил 7 мөр, ижил өндөртэй → хоёр карт тэгш дүүрнэ; skin нэрэнд илүү зай */
.db-tbl .db-tr:not(.db-th) { min-height: 58px; box-sizing: border-box; }
.db-tr:not(.db-tr3) { grid-template-columns: minmax(0, 1.9fr) minmax(0, .8fr) 112px 150px; }
@media (max-width: 720px) { .db-tr:not(.db-tr3) { grid-template-columns: minmax(0, 1fr) 110px; } }
/* Мэндчилгээ: Steam зураг */
.db-hello { align-items: center; } .db-hello > div:first-of-type { flex: 1; min-width: 0; }
.db-ava { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; margin-right: 14px; cursor: pointer; box-shadow: 0 0 0 2px var(--accent), 0 6px 16px rgba(195,7,63,.3); }
@media (max-width: 720px) { .db-ava { width: 42px; height: 42px; margin-right: 10px; } }
@media (max-width: 720px) { .db-hello { flex-wrap: wrap; } .db-hello > div:first-of-type { flex: 1 1 0; } .db-hello .db-acts { flex: 1 1 100%; } }
.t-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; } .t-cp { font-size: 12.5px; padding: 6px 12px; }
html.priv :is(.d-tc-v, .d-tc-s, .db-fl6-g, .t-sum > span, .db-am, .k-hold, .d-mline .muted, #dbLineV) { filter: blur(9px); }

/* Steam-ээр нэвтрэх */
.l-log { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; }
@media (max-width: 640px) { .l-log { grid-template-columns: 1fr; } }
.l-logw { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel2); }
.l-logw-h { display: flex; align-items: center; gap: 10px; }
.l-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: lspin .8s linear infinite; flex-shrink: 0; }
@keyframes lspin { to { transform: rotate(360deg); } }
.l-lmode { margin-bottom: 10px; }
.l-logq { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.l-qrw { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: center; }
.l-qr { width: 200px; height: 200px; border-radius: 12px; overflow: hidden; background: #fff; } .l-qr svg { width: 100%; height: 100%; display: block; }
.l-qrs { margin: 8px 0 10px; padding-left: 18px; line-height: 1.6; }
@media (max-width: 640px) { .l-qrw { grid-template-columns: 1fr; justify-items: center; } .l-qrw > div:last-child { justify-self: stretch; } }
.set-back { width: 32px; height: 32px; font-size: 20px; display: grid; place-items: center; padding: 0 0 2px; }
.k-exp { border: 0; background: none; padding: 2px 0 0; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; text-align: left; }
.k-exp:hover { color: var(--text); } .k-exp.soon { color: #ff7a45; font-weight: 650; }
.k-expd { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.keyrow > span:first-child { position: relative; }
.d-it-go { cursor: pointer; transition: border-color .15s, background .15s; } .d-it-go:hover { border-color: var(--accent); }
.mt-btns { display: flex; gap: 8px; flex-shrink: 0; } .mt-v { word-break: break-all; } .mt-in input { width: min(220px, 48vw); text-align: left; } a.mt-lead { color: inherit; text-decoration: none; } a.mt-lead:hover { background: var(--panel2); }
/* Ботын туршилтын чат */
.bs-back { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.55); display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.bs-back.in { opacity: 1; }
.bs { width: min(440px, calc(100% - 24px)); height: min(720px, calc(100dvh - 24px)); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.bs-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.bs-h > b { font-size: 15px; } .bs-h > span { display: none; }
.bs-hr { display: flex; gap: 8px; align-items: center; margin-left: auto; } .bs-hr .sheet-x { position: static; float: none; margin: 0; }
.bs-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.bs-m { max-width: 82%; padding: 9px 13px; border-radius: 18px 18px 18px 6px; background: var(--panel2); white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.45; align-self: flex-start; }
.bs-m.me { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: #c3073f; color: #fff; }
.bs-m.typing { color: var(--muted); } .bs-m.note { background: none; color: var(--muted); font-size: 12.5px; padding: 0 4px; }
.bs-qr { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 10px; justify-content: flex-end; } .bs-qr:empty { display: none; }
.bs-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
@media (max-width: 640px) { .bs { width: 100%; height: 100dvh; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); box-sizing: border-box; } .bs-h { padding-top: 12px; } }
.set-it.set-out, .set-it.set-out i { color: #ff5a5f; } .set-it.set-out:hover { background: rgba(255,90,95,.1); }

/* ===== Чат (Facebook · Instagram) ===== */
.chatbtn { display: none; position: relative; text-decoration: none; }
@media (max-width: 720px) { .chatbtn { display: grid; } }
.chatbtn.on { color: var(--accent); }
.chat-dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.ch-st { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ch-pf { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; color: #fff; font-size: 11px; font-weight: 800; }
.ch-pf.fb { background: #0866ff; } .ch-pf.web { background: #c8102e; } .ch-pf.ig { background: linear-gradient(45deg, #f9a825, #e1306c 55%, #833ab4); }
.ch-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; min-height: 56px; }
.ch-row:first-child { border-top: 0; }
a.ch-row:hover { background: var(--panel2); border-radius: 10px; }
.ch-main { flex: 1; min-width: 0; }
.ch-main b { font-weight: 700; }
.ch-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ch-tag { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--fill); white-space: nowrap; }
.ch-tag.warn { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.ch-empty { padding: 18px 4px; }
.ch-nm { display: flex; align-items: center; gap: 4px 6px; min-width: 0; flex-wrap: wrap; } /* нэр эхэнд, шошгууд багтахгүй бол доод мөрөнд */
.ch-nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; max-width: 100%; }
.ch-nm > span { flex-shrink: 0; white-space: nowrap; }
.ch-side { flex: none; }
@media (max-width: 480px) { .ch-vf-t { display: none; } } /* утсанд «✓» л */
.ch-nm .ch-tag { flex-shrink: 0; }
.ch-side .chip { min-width: 112px; text-align: center; justify-content: center; }
button.ch-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); font: inherit; text-align: left; cursor: pointer; }
button.ch-row:first-child { border-top: 0; }
.ch-row[data-th] { cursor: pointer; }
@media (hover: hover) { .ch-row[data-th]:hover { background: var(--panel2); border-radius: 10px; } }
.th-ttl { display: flex; align-items: center; gap: 10px; min-width: 0; }
.th-ttl > span { display: flex; flex-direction: column; min-width: 0; }
.th-ttl b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-day { align-self: center; padding: 4px 0; }
.bs-m .th-meta { display: block; margin-top: 3px; font-size: 10.5px; opacity: .7; }
.bs-m.me.th-bot { background: color-mix(in srgb, #c3073f 35%, var(--panel2)); }
.th-act { justify-content: flex-start; padding-top: 10px; }
.th-note { padding: 0 16px 6px; }
.ch-hb { display: flex; gap: 8px; } .ch-hb .chip { white-space: nowrap; } @media (max-width: 400px) { .ch-shop-t { display: none; } }

/* ===== 🔔 Мэдэгдлийн цонх ===== */
.bellbtn { position: relative; }
.bellbtn.on { color: var(--accent); }
.nf-badge { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 10.5px/17px var(--font-num, inherit); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.nf-panel { position: fixed; z-index: 150; top: 64px; right: 20px; width: min(400px, calc(100vw - 24px)); max-height: min(640px, calc(100dvh - 90px)); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.45); overflow: hidden; }
.nf-panel.hidden { display: none; }
.nf-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.nf-h b { font-size: 15px; }
.nf-hb { display: flex; align-items: center; gap: 8px; margin-left: auto; } .nf-hb .sheet-x { position: static; float: none; margin: 0; }
.nf-list { overflow-y: auto; padding: 6px; }
.nf-it { width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 11px 10px; border: 0; background: none; color: inherit; font: inherit; text-align: left; border-radius: 12px; cursor: pointer; }
@media (hover: hover) { .nf-it:hover { background: var(--panel2); } }
.nf-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: transparent; }
.nf-it.un .nf-dot { background: var(--accent); }
.nf-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nf-tx b { font-size: 14px; font-weight: 600; } .nf-it.un .nf-tx b { font-weight: 800; }
.nf-tx small { color: var(--muted); font-size: 12.5px; line-height: 1.4; word-break: break-word; }
.nf-t { flex-shrink: 0; margin-top: 2px; white-space: nowrap; }
.nf-empty { padding: 28px 12px; text-align: center; }
@media (max-width: 720px) { .nf-panel { inset: 0; top: 0; right: 0; width: 100%; max-height: none; height: 100dvh; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); } }
.mt-pay > span { flex: 1; min-width: 0; } .mt-pay textarea { display: block; width: 100%; margin-top: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; font-size: 13.5px; resize: vertical; min-height: 64px; box-sizing: border-box; }
.mt-pay { flex-direction: column; align-items: stretch; gap: 10px; } .mt-pay > button { align-self: flex-end; } .mt-pay textarea { min-height: 104px; line-height: 1.45; font-size: 14px; }
html[data-theme] .chip.th-offer, .chip.th-offer { background: var(--accent); color: #fff; border-color: transparent; }
.logo { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; cursor: pointer; } .logo:focus:not(:focus-visible) { outline: none; }
.ch-un { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex-shrink: 1; }
.th-ttl { flex: 1; } .th-ttl small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-hr .chip { white-space: nowrap; flex-shrink: 0; }
.ch-more { font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--fill); }
.ch-row.ch-done { opacity: .6; }
.th-leads { border-bottom: 1px solid var(--line); } .th-leads.hidden { display: none; }
.th-leads > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; cursor: pointer; font-size: 13px; font-weight: 600; } .th-leads > summary::-webkit-details-marker { display: none; }
.th-leads[open] > summary .chev { transform: rotate(90deg); }
.th-leads > .th-lead { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--line); }
.th-lead.done { opacity: .6; } .th-lt { flex: 1; min-width: 0; font-size: 13px; display: flex; flex-direction: column; } .th-lt small { font-size: 11.5px; }
.th-leads { max-height: 40%; overflow-y: auto; flex-shrink: 0; }

/* ===== Чат CRM: уншаагүй, шошго, карт ===== */
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 11px/18px var(--font-num, inherit); font-style: normal; text-align: center; }
.nav-badge.hidden { display: none; }
.chatbtn .nav-badge { position: absolute; top: 2px; right: 0; margin: 0; min-width: 17px; height: 17px; line-height: 17px; font-size: 10.5px; box-shadow: 0 0 0 2px var(--bg); }
.ch-unread .ch-nm b { font-weight: 800; } .ch-unread .ch-main small { color: var(--text); }
.ch-ub { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 11.5px/20px var(--font-num, inherit); text-align: center; }
.ch-tg { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; flex-shrink: 0; white-space: nowrap; }
.t-vip { background: color-mix(in srgb, #e4ae39 22%, transparent); color: #e4ae39; } .t-reg { background: color-mix(in srgb, #3ecf8e 20%, transparent); color: #3ecf8e; }
.t-warn { background: color-mix(in srgb, #ff5a5f 20%, transparent); color: #ff5a5f; } .t-new { background: color-mix(in srgb, #4f7cff 22%, transparent); color: #6f93ff; }
.ch-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 8px; }
.ch-tools input { flex: 1 1 220px; min-width: 0; }
.ch-tf { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; } .ch-tf button { white-space: nowrap; }
.th-card { border-bottom: 1px solid var(--line); flex-shrink: 0; max-height: 45%; overflow-y: auto; }
.th-card > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 16px; cursor: pointer; font-size: 13px; font-weight: 600; } .th-card > summary::-webkit-details-marker { display: none; }
.th-card > summary .chev { margin-left: auto; } .th-card[open] > summary .chev { transform: rotate(90deg); }
.th-ctags { display: flex; gap: 4px; }
.th-cb { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.th-tags { display: flex; flex-wrap: wrap; gap: 6px; }
html[data-theme] .chip.ch-tgb.on.t-vip { background: #e4ae39; color: #111; } html[data-theme] .chip.ch-tgb.on.t-reg { background: #3ecf8e; color: #111; } html[data-theme] .chip.ch-tgb.on.t-warn { background: #ff5a5f; color: #fff; } html[data-theme] .chip.ch-tgb.on.t-new { background: #4f7cff; color: #fff; }
.th-memo { width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; font-size: 13.5px; resize: vertical; min-height: 44px; }
.th-wh { display: flex; align-items: center; gap: 10px; } .th-wh img { width: 38px; height: 38px; border-radius: 10px; } .th-wh a { color: var(--accent); text-decoration: none; }
.th-hist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; } .th-hist > div { background: var(--panel2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; } .th-hist b { font-size: 12.5px; color: var(--text); }
/* Ярианы цонх: баруун талд дээш доош гүйдэг scroll шугамыг нуух (гүйлгэх нь хэвээр) */
.bs-log, .th-card, .th-leads, .nf-list { scrollbar-width: none; -ms-overflow-style: none; }
.bs-log::-webkit-scrollbar, .th-card::-webkit-scrollbar, .th-leads::-webkit-scrollbar, .nf-list::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* Оролтын ✕ (Авах · Зарах): өмнөх худалдагч / худалдан авагчийг арилгах */
.in-x { position: relative; display: block; flex: 1; min-width: 0; }
.in-x > input { width: 100%; padding-right: 40px; box-sizing: border-box; }
.in-xb { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--fill); color: var(--muted); font-size: 13px; line-height: 28px; padding: 0; cursor: pointer; }
.in-xb:hover { color: var(--text); } .in-xb.hidden { display: none; }
.s-send-row { display: flex; gap: 10px; align-items: stretch; } .s-send-row #sSend { flex: 1; } .s-send-row .l-barc { flex-shrink: 0; width: 48px; height: auto; min-height: 44px; border-radius: 14px; }
.s-row.s-nop { box-shadow: inset 0 0 0 1px #f5a524; } .s-row.s-nop .s-pin { border-color: #f5a524; }
.s-done.s-done-fail { border-color: #ff5a5f; } .s-done.s-done-fail > b { color: #ff5a5f; }
.l-pl.l-base-used .l-pl-k::after { content: " ★"; color: var(--accent); }
.s-h-link { cursor: pointer; } @media (hover: hover) { .s-h-link:hover { border-color: var(--faint, var(--line2)); } }

/* ===== Чат 2-р шат: хурдан хариулт, «/» товчлол, скиний карт ===== */
.bs { position: relative; }
.th-in { resize: none; min-height: 44px; max-height: 140px; line-height: 1.4; padding: 11px 14px; overflow-y: auto; }
.bs-in { align-items: end; }
.th-qk { display: flex; gap: 6px; overflow-x: auto; padding: 8px 14px 0; scrollbar-width: none; } .th-qk::-webkit-scrollbar { display: none; } .th-qk:empty { display: none; } .th-qk { display: none !important; } /* хурдан хариулт: зөвхөн «/» бичихэд (th-slash) */
.th-qk .chip { flex: none; white-space: nowrap; }
.th-slash { margin: 8px 14px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); max-height: 240px; overflow-y: auto; }
.th-sl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: baseline; width: 100%; padding: 9px 12px; border: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.th-sl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.th-sl.on, .th-sl:hover { background: var(--panel2); }
.th-pick { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); background: var(--panel); border-radius: inherit; }
@media (max-width: 640px) { .th-pick { padding-top: calc(14px + env(safe-area-inset-top)); } }
.th-pk-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 16px; } .th-pk-h .sheet-x { position: static; margin: 0; }
.th-pk-l { flex: 1; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 6px; }
.th-pk-r { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.th-pk-r:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); } .th-pk-r.busy { opacity: .5; pointer-events: none; }
.th-pk-im { position: relative; width: 56px; height: 42px; border-radius: 10px; background: var(--fill); overflow: hidden; }
.th-pk-im img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); max-width: none; max-height: none; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.th-pk-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .th-pk-t b { font-size: 13.5px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; } .th-pk-t small { font-size: 12px; }
.th-pk-p { font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
.th-pk-f { text-align: center; }
.mt-qk > summary { list-style: none; cursor: pointer; } .mt-qk > summary::-webkit-details-marker { display: none; } .mt-qk[open] > summary .chev { transform: rotate(90deg); }
.mt-qkl { display: flex; flex-direction: column; gap: 6px; padding: 4px 16px 0; }
.mt-qr { border: 1px solid var(--line); border-radius: 14px; background: var(--panel2); overflow: hidden; }
.mt-qh { display: grid; grid-template-columns: minmax(70px, 120px) minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 11px 14px; border: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.mt-qn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mt-qp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
details .mt-qr .mt-qh .chev { color: var(--muted); font-size: 20px; line-height: 1; transition: transform .2s ease; transform: none; } details .mt-qr.open .mt-qh .chev { transform: rotate(90deg); }
.mt-qb { display: none; flex-direction: column; gap: 10px; padding: 0 14px 14px; } .mt-qr.open .mt-qb { display: flex; }
.mt-ql { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.mt-qb input, .mt-qb textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.45; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 12px; }
.mt-qb textarea { resize: vertical; min-height: 96px; }
.mt-qf { display: flex; justify-content: flex-end; }
.mt-qkb { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 16px 14px; }
.mt-qk .chev { color: var(--muted); font-size: 22px; transition: transform .2s ease; }

.th-pk-l::-webkit-scrollbar { display: none; }

/* ===== Тохиргоо = тусдаа хуудас (popup биш) ===== */
.sheet-back.set-page { z-index: 45; background: var(--bg) !important; align-items: stretch; justify-content: stretch; opacity: 0; transition: opacity .18s ease; }
.sheet-back.set-page.show { opacity: 1; }
.set-page .sheet { width: 100%; max-width: none; height: 100dvh; max-height: none; border: 0; border-radius: 0; box-shadow: none; background: var(--bg); transform: none !important; opacity: 1; overflow-y: auto; box-sizing: border-box; padding: calc(18px + env(safe-area-inset-top)) max(16px, calc(50% - 340px)) calc(110px + env(safe-area-inset-bottom)); }
.set-page .sheet-grab { display: none !important; }
.set-page .set-back { left: max(16px, calc(50% - 340px)); }
.set-page .group, .set-page details.conn { background: var(--panel); }
.set-bar { position: fixed; z-index: 46; left: 0; right: 0; bottom: 0; display: none; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px max(16px, calc(50% - 340px)) calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--panel) 92%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); box-sizing: border-box; }
.set-bar.on { display: flex; animation: setBar .18s ease; }
.set-bar > span { margin-right: auto; }
.set-bar .btn { width: auto; min-width: 140px; margin: 0; }
@keyframes setBar { from { transform: translateY(100%); } to { transform: none; } }
@media (min-width: 1024px) {
  body.side-on .sheet-back.set-page { left: 232px; }
  body.side-on .set-page .sheet { display: grid; grid-template-columns: 270px minmax(0, 720px); grid-auto-rows: auto; column-gap: 44px; justify-content: center; align-content: start; padding: 28px 40px 120px; }
  body.side-on .set-page .sheet > h3 { grid-column: 1; grid-row: 1; text-align: left; font-size: 24px; margin: 6px 0 18px 6px; }
  body.side-on .set-page .set-menu { display: block !important; grid-column: 1; grid-row: 2 / span 30; align-self: start; position: sticky; top: 0; animation: none; }
  body.side-on .set-page .set-sec { grid-column: 2; grid-row: 1 / span 30; }
  body.side-on .set-page .set-sec.on { animation: none; }
  body.side-on .set-page .sheet-foot, body.side-on .set-page .err { grid-column: 2; }
  body.side-on .set-page .set-back { display: none; }
  body.side-on .set-page .set-sh { height: auto; margin: 6px 0 18px; }
  body.side-on .set-page .set-sh b { display: block; font-size: 24px; }
  body.side-on .set-page .sheet-x { position: fixed; top: 22px; right: 28px; float: none; margin: 0; width: 38px; height: 38px; }
  body.side-on .set-page .set-it em { display: none; }
  body.side-on .set-bar { left: 232px; padding-left: calc(max(40px, (100vw - 1266px) / 2) + 314px); padding-right: max(40px, calc((100vw - 1266px) / 2)); }
  body.side-on.set-open .sidebar a.on { background: none !important; box-shadow: none !important; color: var(--side-text) !important; }
  body.side-on.set-open .sidebar button.sb-a.on { background: var(--accent-soft) !important; color: var(--accent) !important; }
}
@media (max-width: 520px) {
  .set-bar > span { display: none; } .set-bar .chip { flex: 0 0 auto; height: 44px; padding: 0 18px; } .set-bar .btn { flex: 1; }
  .set-page .li-set:has(#s_base) { flex-direction: column; align-items: stretch; gap: 10px; } .set-page #s_base { display: flex; } .set-page #s_base > button { flex: 1; padding-left: 4px; padding-right: 4px; }
}
.mt-pay input[type=email] { text-align: left; display: block; width: 100%; margin-top: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; font-size: 14px; box-sizing: border-box; }
.set-page a.li-set, .set-page a.li-set:hover { text-decoration: none !important; color: var(--text); cursor: pointer; }
.set-page a.li-set:hover { background: var(--fill, rgba(127,127,127,.08)); }
.sheet a.li-set > span.muted:last-child { font-size: 22px; line-height: 1; color: var(--muted); }
.set-ret { flex: none; height: 36px; padding: 0 14px; font-size: 14px; font-weight: 600; }
@media (max-width: 1023px) { body.set-ret-on header.top .logo { display: none; } }
/* Тохиргоо хуудас (утас): ‹ ба ✕ хоёр нэг мөрөнд тогтмол — хэсэг рүү ороход гулсахгүй, доош гүйлгэхэд хөдлөхгүй */
.set-page .set-sec.on { animation: none; } .set-page .set-sec.on > :not(.set-sh) { animation: setIn .22s ease; }
@media (max-width: 1023px) {
  .set-page .sheet-x, .set-page .set-back { position: fixed !important; top: calc(13px + env(safe-area-inset-top)) !important; width: 34px; height: 34px; margin: 0; float: none; z-index: 4; display: grid; place-items: center; padding: 0; }
  .set-page .sheet-x { right: max(16px, calc(50% - 340px)); left: auto; }
  .set-page .set-back { left: max(16px, calc(50% - 340px)); font-size: 20px; padding-bottom: 2px; }
  .set-page .sheet > h3 { padding: 0 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 24px; margin-top: 4px; }
}
/* Утасны доод цэс: 4 гол + «Бусад»; дээд цэс (721–1023px) ч мөн адил «Бусад ▾» */
.tab-more { display: none; }
.tab-menu { position: fixed; z-index: 31; width: min(240px, calc(100vw - 20px)); display: flex; flex-direction: column; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 16px 40px rgba(0,0,0,.45); animation: tmIn .16s ease; }
.tab-menu.hidden { display: none; }
.tab-menu:not(.top) { display: none; }
.tab-menu.top { bottom: auto; }
.tm-it { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: none; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-align: left; text-decoration: none !important; cursor: pointer; }
.tm-it svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.tm-it:active, .tm-it:hover { background: var(--fill, rgba(127,127,127,.12)); }
.tm-it.on { color: var(--accent); } .tm-it.on svg { color: var(--accent); }
.tm-it .nav-badge { margin-left: auto; }
.tab-dot { position: absolute; top: 2px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); } .tab-dot.hidden { display: none; }
@keyframes tmIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.topnav .top-more { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.topnav .top-more svg { transition: transform .18s ease; } .topnav .top-more.open svg { transform: rotate(180deg); }
.topnav .top-more.open { color: var(--text); }
.topnav .top-more .tab-dot { top: 4px; left: auto; right: 4px; box-shadow: 0 0 0 2px var(--fill); }
@media (max-width: 720px) {
  .tab-more { position: relative; display: grid; justify-items: center; gap: 2px; color: var(--muted); font: inherit; font-size: 11px; font-weight: 500; padding: 4px 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tab-more svg { width: 24px; height: 24px; }
  html.v2 .tab-more { font-size: 10.5px; } html.v2 .tab-more svg { width: 22px; height: 22px; }
  .tab-more.on, .tab-more.open { color: var(--accent); } .tab-more.on svg, .tab-more.open svg { stroke-width: 2.2; }
  .tab-menu:not(.top) { display: flex; right: 10px; bottom: calc(70px + max(8px, calc(env(safe-area-inset-bottom) - 12px))); }
  .tab-menu.hidden { display: none; }
}
/* Чатын статистик, үнэлгээ */
.ch-stats:empty { display: none; }
.ch-sh { margin: 14px 0 8px; }
.ch-sg { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .ch-sg { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .ch-sg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ch-sx { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel2); min-width: 0; }
.ch-sx b { font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ch-sx span { font-size: 12.5px; color: var(--text); } .ch-sx small { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-rt { font-size: 11.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, #ffd60a 16%, transparent); color: #ffd60a; } .ch-rt.low { background: color-mix(in srgb, #ff9f0a 18%, transparent); color: #ff9f0a; }
/* Ажлын цаг: асаах/унтраах + цаг */
.mt-hrs { flex-wrap: wrap; gap: 10px; }
.mt-hrc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt-hrc .mt-tm { width: 76px; text-align: center; padding: 8px 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); border-radius: 10px; font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; color-scheme: dark; }
.mt-hrc .mt-tm:disabled { opacity: .45; }
.mt-sw { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; cursor: pointer; }
.mt-sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.mt-sw i { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .18s ease; }
.mt-sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .18s ease; }
.mt-sw input:checked + i { background: var(--accent); } .mt-sw input:checked + i::after { transform: translateX(18px); }
.mt-sw input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.mt-bud { flex-wrap: wrap; gap: 10px; } .mt-bdi { width: 150px; text-align: right; padding: 8px 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); border-radius: 10px; font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; }
.ch-bud { margin-top: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); font-size: 13.5px; } .ch-bud b { font-variant-numeric: tabular-nums; }
@media (min-width: 721px) and (max-width: 900px) { .topnav > * { padding: 8px 10px; font-size: 13.5px; } header.top .topright { gap: 6px; } }
.mt-nt { display: flex; flex-direction: column; gap: 10px; padding: 4px 16px 14px; } .mt-nt input, .mt-nt textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); border-radius: 12px; } .mt-nt textarea { resize: vertical; }
.ch-vf { font-size: 11.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); } /* light горимд ч тод (--ok) */

/* Авах: чатаар ирсэн худалдагчийн баталгаа, данс */
.l-who { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -2px 0 10px; }
.l-who-c { font-size: 12px; font-weight: 600; padding: 4px 9px; white-space: nowrap; border-radius: 999px; background: var(--fill); color: var(--muted); }
.l-who-c.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.l-who-c.warn { background: color-mix(in srgb, var(--accent2) 16%, transparent); color: var(--accent2); }
.l-who-acct { font-variant-numeric: tabular-nums; }

/* 💰 «Мөнгө авсан» цонх: шошго дээр, input бүтэн өргөн (утсан дээр халихгүй) */
.dc-f { display: grid; gap: 6px; margin: 12px 0 6px; } .dc-f input { width: 100%; box-sizing: border-box; font-size: 17px; font-variant-numeric: tabular-nums; }
.ask-card .de-sum { overflow-wrap: anywhere; }
/* «Тооцоо засах», «Мөнгө авсан» цонх (.ask.p-sell): .p-sell товчны дүрэм цонхыг зүүн тийш шахаж, padding-ийг багасгадаг байсан */
.ask.p-sell { justify-self: stretch; margin: 0; padding: 24px; font-size: inherit; white-space: normal; grid-template-columns: minmax(0, 1fr); }
@media (max-width: 520px) { .ask.p-sell { padding: 14px; } }
.ask.p-sell .ask-card { width: min(460px, 100%); text-align: left; }

/* 🛒 Buff-аас авч өгөх */
.bf-intro { margin: 0 0 12px; }
.bf-q { display: flex; gap: 8px; align-items: stretch; } .bf-q input { flex: 1; min-width: 0; } .bf-q .btn { flex: none; }
.bf-res { margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--fill); }
.bf-hd { display: flex; gap: 12px; align-items: center; } .bf-hd > div:nth-child(2) { flex: 1; min-width: 0; } .bf-hd b { display: block; }
.bf-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-top: 6px; } .bf-form .dc-f:first-child, .bf-form .dc-f:last-of-type, .bf-form .bf-pf, .bf-form .btn, .bf-form > .muted { grid-column: 1 / -1; } /* үнэ, Trade URL бүтэн мөр */
.bf-form .btn { margin-top: 8px; } .bf-pf { margin: -2px 0 4px; font-weight: 600; }
@media (max-width: 600px) { .bf-form { grid-template-columns: 1fr; } }
.bf-sum { margin: -4px 0 10px; }
.bf-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--line); } .bf-row:first-child { border-top: 0; }
.bf-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .bf-nm { font-weight: 600; margin: 3px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
.bf-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bf-st { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--fill); color: var(--muted); white-space: nowrap; }
.bf-st.warn { color: var(--accent2); background: color-mix(in srgb, var(--accent2) 15%, transparent); } .bf-st.acc { color: #4c8dff; background: color-mix(in srgb, #4c8dff 15%, transparent); } .bf-st.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.bf-ph { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; } .bf-ph .muted { margin-right: 2px; } /* Doppler phase */
/* Buff: үнэ + «Жагсаалтад нэмэх» нэг мөрөнд; сагс */
.bf-add { display: flex; gap: 10px; align-items: flex-end; margin-top: 6px; } .bf-add .dc-f { flex: 1; margin-bottom: 0; } .bf-add .btn { flex: none; height: 46px; }
.bf-cart { margin-top: 14px; padding: 14px; border-radius: 16px; border: 1px dashed var(--line); }
.bf-ct { font-weight: 700; margin-bottom: 6px; }
.bf-ci { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.bf-cn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-ctot { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 10px 0 2px; border-top: 1px solid var(--line); } .bf-ctot b { font-size: 17px; }
.bf-cart .bf-form .dc-f:first-child { grid-column: auto; } .bf-cart .bf-form .dc-f:last-of-type { grid-column: 1 / -1; }
.bf-nm-s { font-size: 13.5px; margin: 2px 0 0; }
@media (max-width: 600px) { .bf-add { flex-direction: column; align-items: stretch; } .bf-add .btn { height: auto; } }
.bf-cn { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; } /* phase тасрахгүй — 2 мөр хүртэл */

/* 🪟 Чатаас Авах/Зарах pop up (iframe) */
.emb-back { position: fixed; inset: 0; z-index: 230; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .18s; } .emb-back.in { opacity: 1; }
.emb { width: min(1100px, 100%); height: min(92dvh, 980px); display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.emb-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); background: var(--panel); }
.emb-b { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 14px; } .emb-b > section { margin: 0 0 14px; } /* Авах/Зарах хэсгүүд цонхон дотор */
@media (max-width: 720px) { .emb-back { padding: 0; } .emb { height: 100dvh; border-radius: 0; border: 0; } }
/* iframe дотор: цэс, толгой, доод цэсийг нууна */
html.embed .sidebar, html.embed .top, html.embed .tabbar, html.embed .topnav { display: none !important; }
html.embed body, html.embed body.side-on { padding-left: 0 !important; padding-bottom: 0 !important; } html.embed .page { padding-top: 12px !important; padding-bottom: 40px !important; }
/* Чатын цонх: offer-ын төлөв */
.th-deals { display: grid; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--line); } .th-deals.hidden { display: none; }
.th-dl { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.th-dl-l { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; min-width: 0; flex: 1 1 200px; } .th-dl-l .muted { flex-basis: 100%; } .th-dl-a { display: flex; gap: 6px; flex: none; } .th-deals, .th-dl { min-width: 0; }

/* Харилцагчид: утсанд бот товч дүрс л (▶ / ⏸) — нэр, шошгонд зай */
.ch-bb .ch-bi { display: none; }
@media (max-width: 480px) { .ch-side .chip.ch-bb { width: 40px; min-width: 40px; height: 40px; padding: 0; justify-content: center; } .ch-bb .ch-bi { display: inline; } .ch-bb .ch-bt { display: none; } }

/* Давхарлал: чат (200) < Авах/Зарах pop up (230) < асуулт, төлбөрийн карт (.ask 260) < мэдэгдэл (.fx 270) */
.ask { z-index: 260; } .fx { z-index: 270; }

/* v2.18.5: Гүйлгээний карт pop up (хүснэгтээс мөр дарахад) — sheet дотор картын хүрээг давхарлахгүй, утсанд хэвтээ халихгүй */
.d-sheet { grid-template-columns: minmax(0, 1fr); }
.d-pop-b { min-width: 0; }
html .d-pop-b > .d-row, html[data-theme] .d-pop-b > .d-row { margin: 0; border: 0; box-shadow: none; background: transparent; padding: 0; }

/* v2.19.0: Вэб зарах / солих хүсэлт — Чат → Хүсэлтүүд мөрөнд «💸 Авах ›», «🔁 Өгөх ›» */
.ch-web { cursor: default; }
.ch-wa { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ch-wa .chip { text-decoration: none; font-size: 12.5px; padding: 5px 10px; }

/* ===== Admin Panel · Dashboard (v2.31) ===== */
.db-kpis.dx-k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dx-more { display: none; gap: 16px; } #dbRoot.db-open .dx-more { display: grid; }
#dbRoot .db-more { display: block; }
.dx-tasks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.dx-t { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-align: left; font: inherit; cursor: pointer; min-width: 0; }
.dx-t:hover { border-color: var(--line2, var(--line)); text-decoration: none; filter: brightness(1.08); }
.dx-t b { font-family: var(--font-num); font-size: 22px; font-weight: 800; min-width: 22px; }
.dx-t span { font-size: 13px; line-height: 1.25; font-weight: 600; min-width: 0; } .dx-t small { display: block; color: var(--muted); font-weight: 500; font-size: 11.5px; }
.dx-t.red { background: rgba(195,7,63,.10); border-color: rgba(195,7,63,.35); } .dx-t.red b { color: #ff4d79; }
.dx-t.yel { background: rgba(255,214,10,.08); border-color: rgba(255,214,10,.3); } .dx-t.yel b { color: #e6b800; }
.dx-t.zero { opacity: .55; }
.dx-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.dx-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.dx-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.dx-chart { display: flex; flex-direction: column; }
.dx-sum { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: -4px 0 8px; font-size: 13px; color: var(--muted); } .dx-sum b { color: var(--text); font-family: var(--font-num); font-size: 15px; }
.dx-bars { position: relative; flex: 1; min-height: 200px; }
.dx-bars svg { width: 100%; height: 230px; display: block; overflow: visible; }
.dx-bars .ax { font-size: 10.5px; fill: var(--muted); } .dx-bars .ax.cur { fill: var(--accent); font-weight: 800; } .dx-bars .gl { stroke: var(--line); }
.dx-bars rect.hit { fill: transparent; cursor: pointer; } .dx-bars rect.hit:hover { fill: rgba(127,127,127,.08); }
.dx-bot-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; } .dx-bot-h h4 { margin: 0 !important; }
.dx-on { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.dx-on i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dx-on.ok { color: var(--ok); background: rgba(48,209,88,.12); } .dx-on.bad { color: var(--bad); background: rgba(255,69,58,.12); }
.dx-bst { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.dx-bst div { background: var(--panel2); border-radius: 12px; padding: 10px 4px; min-width: 0; } .dx-bst b { font-family: var(--font-num); font-size: 18px; } .dx-bst small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.dx-bl { margin-top: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.5; } .dx-bl a { color: inherit; text-decoration: underline; }
.dx-a { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; padding: 5px 0; line-height: 1.4; }
.dx-a > i { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #64a8ff; }
.dx-a.warn > i { background: #ff9f0a; } .dx-a.bad > i { background: #ff4d6d; }
.dx-a a { color: inherit; } .dx-ok { color: var(--muted); font-size: 13px; }
.db-tr.dx-otr { grid-template-columns: 58px minmax(0, .9fr) minmax(0, 1.3fr) auto 96px; }
.dx-otr .dx-code { font-weight: 800; font-family: var(--font-num); font-size: 12.5px; }
/* Захиалга хуудас */
.o-card { display: grid; gap: 14px; }
.o-hd { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .o-hd h3 { margin: 0; flex: 1; }
.o-q { width: 260px; max-width: 100%; }
.o-fs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.o-f, .o-k { flex-wrap: wrap; } .o-f button em { font-style: normal; opacity: .6; margin-left: 4px; font-size: 11.5px; }
.o-list { display: flex; flex-direction: column; }
.o-row { display: grid; grid-template-columns: 70px minmax(0, 1.1fr) 84px minmax(0, 1.5fr) 110px 160px 64px 170px; gap: 10px; align-items: center; padding: 11px 6px; border-bottom: 1px solid var(--line); font-size: 13px; }
.o-row.o-th { font-size: 11.5px; color: var(--muted); font-weight: 600; padding-top: 0; }
.o-row .o-code { font-weight: 800; font-family: var(--font-num); }
.o-who { display: flex; align-items: center; gap: 8px; min-width: 0; } .o-who > span { min-width: 0; } .o-who b, .o-who small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .o-who small { color: var(--muted); font-size: 11.5px; }
.o-sk { display: flex; align-items: center; gap: 8px; min-width: 0; } .o-sk .thumb { width: 40px; height: 30px; flex: none; border-radius: 8px; background: var(--panel2); display: grid; place-items: center; overflow: hidden; position: relative; } .o-sk .thumb img { width: 100%; height: 100%; object-fit: contain; }
.o-sk span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.o-am { font-family: var(--font-num); font-weight: 700; text-align: right; white-space: nowrap; }
.o-kind { font-size: 12px; color: var(--muted); white-space: nowrap; }
.o-stt { justify-self: start; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; } .o-stt small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.o-tag { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--panel2); color: var(--muted); justify-self: start; }
.o-tag.s-new { background: rgba(195,7,63,.14); color: #ff4d79; } .o-tag.s-pay { background: rgba(255,69,58,.12); color: var(--bad); } .o-tag.s-hold { background: rgba(255,214,10,.12); color: #e6b800; }
.o-tag.s-sent { background: rgba(100,168,255,.14); color: #64a8ff; } .o-tag.s-done { background: rgba(48,209,88,.12); color: var(--ok); } .o-tag.s-cancel { background: var(--panel2); color: var(--muted); }
.o-when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.o-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; } .o-acts .chip { white-space: nowrap; text-decoration: none; }
.o-empty { color: var(--muted); padding: 24px 6px; text-align: center; font-size: 13.5px; }
.o-pf { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: #555; } .o-pf.fb { background: #0866ff; } .o-pf.ig { background: linear-gradient(45deg,#f58529,#dd2a7b,#8134af); } .o-pf.web { background: #c3073f; }
@media (max-width: 1280px) { .db-kpis.dx-k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dx-row, .dx-row2 { grid-template-columns: 1fr; } .dx-side { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1100px) { .o-row { grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.3fr) 100px 140px 150px; } .o-row .o-kind, .o-row .o-when { display: none; } }
@media (max-width: 720px) {
  .db-kpis.dx-k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .db-kpis.dx-k4 > :first-child { grid-column: auto; }
  .dx-side { grid-template-columns: 1fr; }
  .dx-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .dx-t { padding: 10px 12px; gap: 10px; } .dx-t b { font-size: 19px; }
  .dx-tasks > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .dx-bars svg { height: 190px; }
  .db-tr.dx-otr { grid-template-columns: 54px minmax(0, 1fr) auto 84px; } .db-tr.dx-otr > :nth-child(2) { display: none; }
  .o-q { width: 100%; }
  .o-row.o-th { display: none; }
  .o-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "code tag" "who am" "sk sk" "acts acts"; gap: 6px 10px; padding: 12px 4px; }
  .o-row .o-code { grid-area: code; } .o-row .o-who { grid-area: who; } .o-row .o-sk { grid-area: sk; } .o-row .o-am { grid-area: am; } .o-row .o-stt { grid-area: tag; justify-self: end; align-items: flex-end; } .o-row .o-acts { grid-area: acts; justify-content: flex-start; }
  .o-row .o-stt small { max-width: 160px; }
}
@media (max-width: 360px) { .dx-tasks { grid-template-columns: 1fr; } .dx-tasks > :last-child:nth-child(odd) { grid-column: auto; } }
.o-row.o-hi { background: rgba(195,7,63,.12); transition: background .3s; }
.dx-otr .o-stt { justify-self: start; }
.db-tr.dx-otr > * { justify-self: stretch; text-align: left; min-width: 0; }
.db-tr.dx-otr > .o-am { text-align: right; } .db-tr.dx-otr > .o-stt { justify-self: start; }
.o-cw { display: none; font-family: var(--font); font-weight: 500; font-size: 11.5px; color: var(--muted); }
@media (max-width: 1100px) { .o-cw { display: block; } }
@media (max-width: 720px) { .o-row .o-code { display: flex; align-items: baseline; gap: 8px; } }
/* Утасны дээд мөр: лого + 4 товч 390/320px-д багтана (өмнө баруун тийш халин хуудас өргөсдөг байсан) */
@media (max-width: 720px) {
  body.app header.top { gap: 6px; min-width: 0; }
  body.app header.top .logo { min-width: 0; flex: 0 1 auto; overflow: hidden; }
  body.app header.top .topright { gap: 4px; flex: none; margin-left: auto; }
  body.app header.top .topright .iconbtn { width: 38px; height: 38px; }
  body.app header.top .mockdot { display: none; }
}
@media (max-width: 380px) { body.app header.top .logo span { font-size: 18px; } body.app header.top .topright .iconbtn { width: 34px; height: 34px; } body.app header.top .topright { gap: 2px; } }
@media (max-width: 720px) { .db-tr.dx-otr > :nth-child(4) { display: block; } .dx-bars { min-height: 0; } }
.dx-bars svg { height: auto; }
@media (max-width: 720px) { .db-tr.dx-otr .o-sk .thumb { display: none; } .db-tr.dx-otr { grid-template-columns: 54px minmax(0, 1fr) auto 78px; } }
@media (max-width: 720px) { .db-kpis.dx-k4 .k-s { white-space: normal; } }
@media (max-width: 380px) { .db-tr.dx-otr { grid-template-columns: 58px minmax(0, 1fr) auto; } .db-tr.dx-otr > :nth-child(3) { display: none; } }
/* ===== Admin Panel · бусад хуудас (Listing, Steam Bot, Төлбөр, Хэрэглэгчид, Тайлан, Аюулгүй байдал) ===== */
body.side-on .sidebar { overflow-y: auto; scrollbar-width: thin; }
.a-kp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.a-k { background: var(--panel2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.a-k span { font-size: 12px; color: var(--muted); font-weight: 600; } .a-k b { font-family: var(--font-num); font-size: 20px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .a-k small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-row { display: grid; gap: 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.a-row:hover:not(.a-th) { background: var(--panel2); } .a-th { font-size: 11.5px; color: var(--muted); font-weight: 600; cursor: default; padding-top: 0; }
.a-row .r { text-align: right; justify-self: end; } .a-num { font-family: var(--font-num); white-space: nowrap; } .a-num small { display: block; font-size: 11px; opacity: .75; }
.a-row .o-sk b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .a-row .o-sk small { display: block; font-size: 11.5px; } .a-row .o-sk > span:last-child { min-width: 0; }
.a-ls { grid-template-columns: minmax(0, 2fr) 150px 100px 100px 100px 100px 104px; }
.a-py { grid-template-columns: 128px minmax(0, 1fr) minmax(0, 1.4fr) 110px 120px 110px; }
.a-us { grid-template-columns: minmax(0, 2fr) 80px 120px 80px 100px 150px; }
.a-pl { grid-template-columns: 90px 60px repeat(5, minmax(0, 1fr)); }
.a-g { grid-template-columns: minmax(0, 1.4fr) 50px minmax(0, 1fr) minmax(0, 1fr) 60px; cursor: default; }
.a-top { grid-template-columns: minmax(0, 1fr) auto 110px; }
.a-lg { grid-template-columns: 128px 150px minmax(0, 1fr) 80px; cursor: default; }
.a-lgt { min-width: 0; overflow-wrap: anywhere; }
.a-cur { background: rgba(195,7,63,.06); } .a-dim { opacity: .5; } .a-tot { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--line); cursor: default; }
.a-pl, .a-g, .a-tot { cursor: default; }
.a-tw { overflow-x: auto; } .a-tw .a-tbl { min-width: 620px; }
.a-g2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; }
.a-h { margin: 6px 0 6px; font-size: 14px; font-weight: 750; }
.a-dt { font-size: 12px; white-space: nowrap; } .a-via { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .a-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.a-hold { font-size: 12px; white-space: nowrap; color: #e6b800; }
.a-av { width: 26px; height: 26px; border-radius: 50%; flex: none; object-fit: cover; }
.chip.a-danger { color: var(--bad); } .chip:disabled { opacity: .45; cursor: not-allowed; }
.a-note { background: rgba(255,214,10,.08); border: 1px solid rgba(255,214,10,.3); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.o-hd .chip { flex: none; }
@media (max-width: 1100px) {
  .a-kp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a-ls { grid-template-columns: minmax(0, 1.6fr) 130px 96px 96px 104px; } .a-ls > :nth-child(4), .a-ls > :nth-child(5) { display: none; }
  .a-py { grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1.2fr) 110px 100px; } .a-py > :nth-child(4) { display: none; }
  .a-g2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .a-th.a-ls, .a-th.a-py, .a-th.a-us, .a-th.a-lg { display: none; }
  .a-ls { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "sk st" "pr pf" "hd hd"; gap: 4px 10px; }
  .a-ls > :nth-child(1) { grid-area: sk; } .a-ls > :nth-child(2) { grid-area: st; justify-self: end; align-items: flex-end; } .a-ls > :nth-child(3) { grid-area: pr; justify-self: start; text-align: left; } .a-ls > :nth-child(6) { grid-area: pf; } .a-ls > :nth-child(7) { grid-area: hd; }
  .a-ls > :nth-child(7):has(.muted) { display: none; }
  .a-ls > :nth-child(3)::before { content: 'Үнэ '; color: var(--muted); font-family: var(--font); font-size: 12px; }
  .a-ls > :nth-child(6) small { display: inline; margin-left: 6px; }
  .a-py { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who amt" "sk tag" "dt dt"; gap: 4px 10px; }
  .a-py > :nth-child(1) { grid-area: dt; font-size: 11.5px; } .a-py > :nth-child(2) { grid-area: who; } .a-py > :nth-child(3) { grid-area: sk; } .a-py > :nth-child(5) { grid-area: tag; justify-self: end; } .a-py > :nth-child(6) { grid-area: amt; }
  .a-us { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who st" "n dn" "acts acts"; gap: 6px 10px; }
  .a-us > :nth-child(1) { grid-area: who; } .a-us > :nth-child(2) { grid-area: n; justify-self: start; text-align: left; } .a-us > :nth-child(3) { grid-area: dn; } .a-us > :nth-child(4) { display: none; } .a-us > :nth-child(5) { grid-area: st; justify-self: end; } .a-us > :nth-child(6) { grid-area: acts; justify-content: flex-start; }
  .a-us > :nth-child(2)::before { content: 'Захиалга '; color: var(--muted); font-family: var(--font); font-size: 12px; } .a-us > :nth-child(3)::before { content: 'Дууссан '; color: var(--muted); font-family: var(--font); font-size: 12px; }
  .a-lg { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tag dt" "txt txt"; gap: 4px 10px; }
  .a-lg > :nth-child(1) { grid-area: dt; } .a-lg > :nth-child(2) { grid-area: tag; } .a-lg > :nth-child(3) { grid-area: txt; font-size: 12.5px; } .a-lg > :nth-child(4) { display: none; }
  .a-g { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr) 50px; } .a-g > :nth-child(3) { display: none; }
  .a-top { grid-template-columns: minmax(0, 1fr) auto; } .a-top > :nth-child(2) { display: none; }
  .o-hd .seg { order: 3; width: 100%; overflow-x: auto; }
}
@media (max-width: 380px) { .a-kp { gap: 8px; } .a-k { padding: 10px; } .a-k b { font-size: 17px; } }
@media (min-width: 1024px) { body.side-on .sidebar :is(a, button.sb-a):not(.logo):not(.sb-goal) { padding: 8px 12px; } body.side-on .sidebar .sb-h { padding: 10px 12px 4px; } body.side-on .sidebar svg { flex: none; } }
@media (min-width: 1024px) and (max-height: 860px) { body.side-on .sidebar .sb-goal { display: none; } }
@media (max-width: 720px) { .a-k b { font-size: 16.5px; } .a-k { padding: 10px 12px; } }
.tab-menu { max-height: calc(100dvh - 130px); overflow-y: auto; overscroll-behavior: contain; }
/* ===== Самбар v2.33: жагсаалт картууд ===== */
.dx-g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dx-g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dx-l { display: flex; flex-direction: column; min-width: 0; }
.dx-l h4 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dx-l h4 > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.dx-n { font-style: normal; font-size: 11.5px; font-weight: 800; background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 8px; font-family: var(--font-num); }
.dx-li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.dx-li:last-of-type { border-bottom: 0; } .dx-li.click { cursor: pointer; } .dx-li.click:hover { background: var(--panel2); }
.dx-li .thumb { width: 44px; height: 33px; border-radius: 8px; background: var(--panel2); display: grid; place-items: center; overflow: hidden; position: relative; } .dx-li .thumb img { width: 100%; height: 100%; object-fit: contain; position: static; transform: none; }
.dx-tx { min-width: 0; } .dx-tx b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dx-tx small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-rv { text-align: right; white-space: nowrap; } .dx-rv b { display: block; font-family: var(--font-num); font-size: 14px; } .dx-rv small { display: block; font-size: 11px; color: var(--muted); }
.dx-li.err { background: rgba(255,69,58,.07); } .dx-li.err small { color: var(--bad); } .dx-li.done .dx-tx small { color: var(--ok); }
.dx-empty { color: var(--muted); font-size: 13px; padding: 14px 4px; }
.dx-more2 { padding: 8px 4px 0; }
/* ⚠ Анхааруулга товч + цонх */
.albtn .al-badge { background: #ff9f0a; color: #111; } .albtn.on { color: #ff9f0a; }
.al-it .nf-dot { background: #64a8ff !important; } .al-it.al-warn .nf-dot { background: #ff9f0a !important; } .al-it.al-bad .nf-dot { background: #ff4d6d !important; }
.al-sep { padding: 10px 16px 4px; }
@media (max-width: 1280px) { .dx-g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dx-g3 > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 720px) { .dx-g2, .dx-g3 { grid-template-columns: 1fr; gap: 12px; } .dx-g3 > :last-child:nth-child(odd) { grid-column: auto; } .dx-li { grid-template-columns: 40px minmax(0, 1fr) auto; } .dx-li .thumb { width: 40px; height: 30px; } }
/* Дээд мөр 5 товчтой (чат, ⚠, 🔔, нуух, тохиргоо): утсанд багтаана */
@media (max-width: 480px) { body.app header.top .topright { gap: 2px; } body.app header.top .topright .iconbtn { width: 34px; height: 34px; } body.app header.top .logo span { font-size: 17px; } }
@media (max-width: 360px) { body.app header.top .logo span { display: none; } }
/* ⭐ Сэтгэгдэл (Lab) */
.a-rv { padding: 14px 6px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; } .a-rv p { margin: 0; font-size: 14px; line-height: 1.55; } .a-rv .o-who small { color: var(--muted); font-size: 12px; display: block; }
.a-rvs { margin-left: auto; color: #e6b800; letter-spacing: 1px; white-space: nowrap; } .a-rvr { font-size: 13px; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 10px; } .a-rv .o-acts { justify-content: flex-start; }
