/* SMARTSITE — «Цахилгаан индиго» дизайн систем (бараан премиум) */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ind: #6c5cff;
  --ind-2: #a78bfa;
  --cyan: #22d3ee;
  --bg: #0b0b12;
  --bg-2: #101018;
  --panel: #141420;
  --panel-2: #1a1a2a;
  --line: #262640;
  --line-2: #3a3a60;
  --text: #f1f0ff;
  --muted: #9b98b8;
  --grad: linear-gradient(135deg, #6c5cff 0%, #8b6cf7 55%, #a78bfa 100%);
  --grad-text: linear-gradient(120deg, #8f7dff, #c3b2ff 70%, #7dd8f0);
  --glow: rgba(108, 92, 255, 0.45);
  --glow-soft: rgba(108, 92, 255, 0.16);
  --ok: #34d399;
  --danger: #f87171;
  --radius: 18px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; overflow-x: hidden;
}
h1, h2, h3, .display { font-family: "Manrope", "Inter", sans-serif; letter-spacing: -0.4px; }
.hidden { display: none !important; }
a { color: var(--ind-2); }

/* ── Дэвсгэрийн aurora ── */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora::before, .aurora::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5;
}
.aurora::before { width: 560px; height: 560px; top: -200px; left: 55%; background: radial-gradient(circle, rgba(108,92,255,.55), transparent 70%); animation: auf1 16s ease-in-out infinite; }
.aurora::after { width: 460px; height: 460px; bottom: -180px; left: -120px; background: radial-gradient(circle, rgba(34,211,238,.22), transparent 70%); animation: auf2 20s ease-in-out infinite; }
@keyframes auf1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-60px,40px)} }
@keyframes auf2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(50px,-30px)} }
main, header, footer, .ws { position: relative; z-index: 1; }

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 26px; border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 18, .72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.brand {
  font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.25rem; letter-spacing: .3px;
  color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 9px; white-space: nowrap;
}
.brand .mark { width: 26px; height: 26px; flex: none; }
.brand em { font-style: normal; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-center { display: flex; align-items: center; gap: 2px; }
.nav-a { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; padding: 8px 13px; border-radius: 999px; transition: .16s; }
.nav-a:hover { color: var(--text); background: var(--glow-soft); }
.nav-a.active { color: var(--text); background: var(--glow-soft); }
.bar-right { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; text-decoration: none; text-align: center;
  font-family: "Inter", sans-serif; font-weight: 700; font-size: .93rem;
  padding: 11px 20px; border-radius: 12px; transition: transform .14s, box-shadow .2s, opacity .2s, border-color .16s;
}
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 28px var(--glow); }
.btn.primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 38px var(--glow); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line-2); color: var(--text); }
.btn.ghost:hover { border-color: var(--ind); box-shadow: 0 0 18px var(--glow-soft); }
.btn.sm { padding: 8px 14px; font-size: .84rem; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.danger { background: transparent; border: 1.5px solid rgba(248,113,113,.4); color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }

.credit-pill {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--panel); border: 1.5px solid var(--line-2); color: var(--ind-2);
  font-weight: 700; font-size: .85rem; padding: 8px 14px; border-radius: 999px; font-family: inherit; transition: .16s;
}
.credit-pill:hover { border-color: var(--ind); box-shadow: 0 0 18px var(--glow-soft); }
.ava {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--grad); color: #fff; font-weight: 800; font-size: .9rem; border: none; font-family: inherit;
}
.profile { position: relative; }
.pmenu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; z-index: 60;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.55); padding: 6px; display: flex; flex-direction: column;
}
.pmenu .pemail { font-size: .76rem; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; word-break: break-all; }
.pmenu a, .pmenu button {
  display: block; text-align: left; background: none; border: none; cursor: pointer;
  color: var(--text); font-family: inherit; font-size: .88rem; padding: 9px 12px; border-radius: 9px; text-decoration: none; transition: .12s;
}
.pmenu a:hover, .pmenu button:hover { background: var(--glow-soft); color: var(--ind-2); }

/* ── Layout ── */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 22px; }
section { padding: 72px 0; }
.sec-head { text-align: center; margin-bottom: 44px; }
.sec-head .eyebrow {
  display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--ind-2); background: var(--glow-soft); padding: 6px 15px; border-radius: 999px; margin-bottom: 15px;
}
.sec-head h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); font-weight: 800; }
.sec-head p { color: var(--muted); max-width: 560px; margin: 12px auto 0; }

/* ── Home hero + чат ── */
.hero { padding: 84px 0 60px; text-align: center; }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); font-weight: 800; line-height: 1.12; max-width: 840px; margin: 0 auto; }
.hero h1 em { font-style: normal; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { color: var(--muted); font-size: 1.08rem; max-width: 600px; margin: 18px auto 0; }

.home-chat {
  max-width: 720px; margin: 36px auto 0; text-align: left;
  background: var(--panel); border: 1.5px solid var(--line-2); border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0,0,0,.5), 0 0 0 1px var(--glow-soft), 0 0 60px var(--glow-soft);
  overflow: hidden;
}
.home-chat textarea {
  width: 100%; border: none; outline: none; background: transparent; color: var(--text);
  font-family: inherit; font-size: 1.02rem; padding: 20px 22px 8px; resize: none; min-height: 92px; line-height: 1.55;
}
.home-chat .hc-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 14px 22px; }
.home-chat .hc-hint { color: var(--muted); font-size: .78rem; }
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.chip {
  background: var(--panel); border: 1px solid var(--line-2); color: var(--muted); cursor: pointer;
  font-family: inherit; font-size: .82rem; padding: 8px 15px; border-radius: 999px; transition: .16s;
}
.chip:hover { color: var(--text); border-color: var(--ind); box-shadow: 0 0 16px var(--glow-soft); }

/* ── Алхмууд ── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative;
}
.step .n {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 800; font-family: "Manrope"; margin-bottom: 14px;
}
.step strong { display: block; font-size: 1rem; margin-bottom: 6px; }
.step span { color: var(--muted); font-size: .88rem; }

/* ── Bento ── */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 15px; }
.b-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; position: relative; overflow: hidden; transition: .2s;
}
.b-card:hover { border-color: var(--line-2); transform: translateY(-4px); box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.b-card.span3 { grid-column: span 3; }
.b-card.span2 { grid-column: span 2; }
.b-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 7px; display: flex; align-items: center; gap: 10px; }
.b-card h3 svg { width: 21px; height: 21px; color: var(--ind-2); flex: none; }
.b-card p { color: var(--muted); font-size: .88rem; }

/* ── Тариф ── */
.price-note {
  max-width: 680px; margin: 0 auto; background: var(--panel); border: 1.5px solid var(--line-2);
  border-radius: var(--radius); padding: 28px; text-align: center;
}
.price-note strong { font-family: "Manrope"; font-size: 1.5rem; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-note p { color: var(--muted); font-size: .9rem; margin-top: 10px; }

/* ── FAQ ── */
.faq { max-width: 720px; margin: 0 auto; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 600; font-size: .95rem; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: "Manrope"; color: var(--ind-2); font-size: 1.15rem; transition: .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 17px; color: var(--muted); font-size: .89rem; }

footer { border-top: 1px solid var(--line); padding: 34px 0; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .84rem; }
.foot a { color: var(--muted); text-decoration: none; margin-left: 16px; }
.foot a:hover { color: var(--text); }

/* ── Modal / форм ── */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(5,5,12,.72); backdrop-filter: blur(6px); padding: 18px; }
.modal-card {
  width: 100%; max-width: 420px; max-height: 92vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 20px; padding: 28px;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
}
.modal-card h2 { font-size: 1.2rem; margin-bottom: 6px; }
.modal-card .m-sub { color: var(--muted); font-size: .87rem; margin-bottom: 12px; }
.lbl { display: block; font-weight: 600; font-size: .87rem; margin: 14px 0 7px; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea.inp {
  width: 100%; background: var(--bg-2); border: 1.5px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 12px 14px; font-family: inherit; font-size: .95rem; outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, textarea.inp:focus { border-color: var(--ind); box-shadow: 0 0 0 3px var(--glow-soft); }
.err { color: var(--danger); font-size: .86rem; margin-top: 10px; min-height: 1.2em; }
.okmsg { color: var(--ok); font-size: .87rem; margin-top: 10px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tab { flex: 1; border: none; background: var(--bg-2); color: var(--muted); font-family: inherit; font-weight: 700; padding: 10px; border-radius: 10px; cursor: pointer; }
.tab.active { background: var(--grad); color: #fff; }
.gbtn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px;
  background: #fff; color: #1f1f1f; border: none; border-radius: 12px; padding: 11px; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: .9rem;
}
.or-line { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .76rem; margin: 16px 0 2px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(16px);
  background: var(--panel); border: 1px solid var(--ind); color: var(--text);
  padding: 12px 22px; border-radius: 13px; box-shadow: 0 14px 44px var(--glow-soft);
  opacity: 0; pointer-events: none; transition: .25s; z-index: 120; font-size: .9rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Хэтэвч ── */
.wallet-balance { font-size: 1.05rem; margin: 6px 0 4px; }
.wallet-balance strong { font-family: "Manrope"; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topup-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.topup-quick button {
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); font-family: inherit; font-weight: 600;
  padding: 10px; border-radius: 10px; cursor: pointer; font-size: .86rem; transition: .15s;
}
.topup-quick button span { color: var(--ok); font-size: .72rem; }
.topup-quick button:hover { border-color: var(--ind); }
.topup-row { display: flex; gap: 8px; }
.topup-row input { flex: 1; }
.qr-wrap { display: flex; justify-content: center; margin: 14px 0; }
.qr-wrap img { width: 210px; height: 210px; border-radius: 14px; background: #fff; padding: 8px; }
.status-line { text-align: center; color: var(--ind-2); font-size: .9rem; margin-top: 8px; }
.txn-list { max-height: 200px; overflow-y: auto; margin-top: 8px; }
.txn { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .82rem; }
.txn .tx-in { color: var(--ok); } .txn .tx-out { color: var(--danger); }
.txn-date { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.wallet-h3 { font-size: .85rem; margin-top: 16px; color: var(--muted); }

/* ── Workspace ── */
.ws { display: flex; flex-direction: column; height: 100vh; }
.ws-top {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); background: rgba(11,11,18,.8); backdrop-filter: blur(12px); flex-wrap: wrap;
}
.ws-name {
  font-family: "Manrope"; font-weight: 700; font-size: .98rem; background: transparent; border: 1px solid transparent;
  color: var(--text); border-radius: 9px; padding: 6px 10px; min-width: 120px; max-width: 260px; outline: none;
}
.ws-name:hover, .ws-name:focus { border-color: var(--line-2); background: var(--bg-2); }
.ws-top .spacer { flex: 1; }
.ws-body { flex: 1; display: flex; min-height: 0; }
.ws-chat { width: 400px; min-width: 320px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg-2); }
.ws-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 92%; padding: 11px 14px; border-radius: 14px; font-size: .89rem; line-height: 1.55; word-wrap: break-word; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.ai.error { border-color: rgba(248,113,113,.5); color: var(--danger); }
.msg .m-price { display: block; font-size: .7rem; opacity: .75; margin-top: 5px; }
.msg.typing { opacity: .7; }
.typing-dots::after { content: "…"; animation: tdots 1.2s steps(3) infinite; }
@keyframes tdots { 0%{content:"."} 33%{content:".."} 66%{content:"..."} }
.ws-input { border-top: 1px solid var(--line); padding: 12px; }
.est-badge { font-size: .76rem; color: var(--muted); min-height: 1.2em; margin-bottom: 7px; padding: 0 4px; }
.est-badge b { color: var(--ind-2); }
.ws-input-row { display: flex; gap: 8px; align-items: flex-end; }
.ws-input textarea {
  flex: 1; resize: none; min-height: 46px; max-height: 140px;
  background: var(--panel); border: 1.5px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 12px 14px; font-family: inherit; font-size: .92rem; outline: none; transition: border .15s;
}
.ws-input textarea:focus { border-color: var(--ind); }
.ws-preview { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #08080e; }
.pv-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.pv-dots { display: flex; gap: 5px; margin-right: 4px; }
.pv-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.pv-dots i:nth-child(1) { background: #f87171aa; } .pv-dots i:nth-child(2) { background: #fbbf24aa; } .pv-dots i:nth-child(3) { background: #34d399aa; }
.dev-btns { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.dev-btns button { background: transparent; border: none; color: var(--muted); font-family: inherit; font-size: .76rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.dev-btns button.active { background: var(--grad); color: #fff; }
.pv-frame-wrap { flex: 1; display: flex; justify-content: center; overflow: auto; padding: 14px; }
.pv-frame-wrap iframe {
  width: 100%; height: 100%; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; transition: width .25s;
}
.pv-frame-wrap.tablet iframe { width: 768px; max-width: 100%; }
.pv-frame-wrap.mobile iframe { width: 390px; max-width: 100%; }
.pv-empty { flex: 1; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 30px; }
.pv-empty h3 { color: var(--text); margin-bottom: 8px; font-size: 1.05rem; }

/* Drawer (Files / Versions) */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 96vw); z-index: 80;
  background: var(--panel); border-left: 1px solid var(--line-2); box-shadow: -20px 0 60px rgba(0,0,0,.5);
  display: flex; flex-direction: column; transform: translateX(102%); transition: transform .25s;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 1rem; }
.drawer-x { background: none; border: none; color: var(--muted); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.code-view {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  font-family: Consolas, monospace; font-size: .74rem; line-height: 1.5; white-space: pre-wrap; word-break: break-all;
  max-height: 55vh; overflow-y: auto; color: #c9c6f0; margin-top: 12px;
}
.ver-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.ver-row .v-note { color: var(--muted); font-size: .76rem; display: block; }
.badge { font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.badge.live { color: var(--ok); border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.08); }
.badge.draft { color: var(--muted); border-color: var(--line-2); }
.badge.cur { color: var(--ind-2); border-color: var(--ind); background: var(--glow-soft); }

/* ── Прожектын картууд ── */
.page-main { max-width: 1160px; margin: 0 auto; padding: 40px 22px 90px; }
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.page-h h1 { font-size: 1.55rem; font-weight: 800; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.proj-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .2s; display: flex; flex-direction: column; }
.proj-card:hover { border-color: var(--line-2); transform: translateY(-4px); box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.thumb { position: relative; height: 185px; overflow: hidden; background: #fff; }
.thumb iframe { width: 1280px; height: 800px; transform: scale(0.245); transform-origin: 0 0; border: none; pointer-events: none; }
.thumb .thumb-empty { position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg-2); color: var(--muted); font-size: .85rem; }
.proj-info { padding: 15px 17px 17px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.proj-info .pi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.proj-info strong { font-size: .97rem; font-family: "Manrope"; }
.proj-info .pi-sub { color: var(--muted); font-size: .77rem; }
.proj-info .pi-actions { display: flex; gap: 8px; margin-top: auto; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-state h2 { color: var(--text); font-size: 1.2rem; margin-bottom: 8px; }

/* ── Загварууд ── */
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }

/* ── Referral ── */
.ref-card { max-width: 620px; margin: 0 auto; background: var(--panel); border: 1.5px solid var(--line-2); border-radius: var(--radius); padding: 30px; }
.ref-link-row { display: flex; gap: 8px; margin: 14px 0; }
.ref-link-row input { flex: 1; font-size: .88rem; }
.ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.ref-stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.ref-stat strong { display: block; font-family: "Manrope"; font-size: 1.4rem; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ref-stat span { color: var(--muted); font-size: .78rem; }

/* ── Админ ── */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: center; }
.stat strong { display: block; font-family: "Manrope"; font-size: 1.5rem; color: var(--ind-2); }
.stat span { color: var(--muted); font-size: .78rem; }
.adm-table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.adm-table th, .adm-table td { padding: 11px 13px; text-align: left; font-size: .85rem; }
.adm-table th { background: var(--glow-soft); color: var(--ind-2); font-size: .72rem; letter-spacing: 1px; text-transform: uppercase; }
.adm-table tr + tr td { border-top: 1px solid var(--line); }
.table-wrap { overflow-x: auto; margin-bottom: 30px; }
.flag-alert { background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.4); border-radius: 14px; padding: 16px 18px; margin-bottom: 24px; font-size: .88rem; }

/* ── 404 ── */
.nf { min-height: 76vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.nf h1 { font-size: clamp(3.4rem, 10vw, 6rem); background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf p { color: var(--muted); margin: 12px 0 24px; }

/* ── Reveal ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .nav-center { display: none; }
  .steps { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .b-card.span3, .b-card.span2 { grid-column: span 1; }
  .ws-body { flex-direction: column; }
  .ws-chat { width: 100%; min-width: 0; height: 46vh; border-right: none; border-bottom: 1px solid var(--line); }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .ref-stats { grid-template-columns: 1fr; }
}

/* ── Ultracode аудитын засварууд ── */
:root { color-scheme: dark; }
.btn { white-space: nowrap; }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }
.home-chat:focus-within { border-color: var(--ind); box-shadow: 0 24px 70px rgba(0,0,0,.5), 0 0 0 2px var(--glow-soft), 0 0 60px var(--glow-soft); }
.msg .m-price { opacity: .95; }
.ws { height: 100dvh; }
.thumb iframe { transform: scale(0.25); } /* projects.js/templates.js динамик тааруулна */
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .nav-center { display: flex; order: 3; width: 100%; justify-content: center; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
  .ws-top { row-gap: 6px; }
}
