:root {
  --navy: #0b1f3a; --navy-2: #13305a; --teal: #0d9488; --teal-2: #0f766e; --teal-bg: #e6f6f4;
  --amber: #f59e0b; --bg: #f4f6f9; --card: #fff; --text: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --green: #15803d; --green-bg: #e8f6ee; --orange: #b45309; --orange-bg: #fdf1e2; --red: #b91c1c; --red-bg: #fdecec;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14.5px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--teal-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.3px; }
h2 { font-size: 18px; margin: 0 0 12px; }

/* шапка */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1320px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 800; font-size: 21px; letter-spacing: -.3px; display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--teal), #2dd4bf); display: grid; place-items: center; font-size: 16px; color: var(--navy); }
.topsearch { flex: 1; min-width: 240px; display: flex; }
.topsearch input { flex: 1; border: 0; border-radius: 9px 0 0 9px; padding: 10px 14px; font-size: 15px; outline: none; min-width: 0; }
.topsearch button { border: 0; background: var(--teal); color: #fff; font-weight: 700; padding: 0 20px; border-radius: 0 9px 9px 0; cursor: pointer; font-size: 15px; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.nav a { color: #cbd5e1; padding: 8px 11px; border-radius: 8px; font-weight: 500; }
.nav a:hover, .nav a.on { color: #fff; background: rgba(255,255,255,.1); text-decoration: none; }
.nav .cta { background: var(--teal); color: #fff; }
.nav .cta:hover { background: var(--teal-2); }
.trialbar { background: #fff7e6; color: #7c4a03; text-align: center; font-size: 13.5px; padding: 7px 12px; border-bottom: 1px solid #fde4b8; }
.trialbar a { color: #7c4a03; font-weight: 700; text-decoration: underline; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 20px 16px 48px; }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.sub { color: var(--muted); margin-bottom: 16px; }
.flash { background: var(--teal-bg); color: var(--teal-2); padding: 10px 14px; border-radius: 9px; margin-bottom: 14px; font-weight: 500; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.box { padding: 18px 20px; margin-bottom: 16px; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--text); padding: 8px 13px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--teal); text-decoration: none; }
.btn.primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn.primary:hover { background: var(--teal-2); }
.btn.navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.lg { padding: 13px 22px; font-size: 16px; border-radius: 10px; }
.btn.sm { padding: 4px 9px; font-size: 12.5px; font-weight: 500; }
.btn.ghost { border-color: transparent; color: var(--muted); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--muted); white-space: nowrap; }
.badge.src-goszakup { background: #e8eefc; color: #1d4ed8; }
.badge.src-mitwork { background: #f3e8ff; color: #7e22ce; }
.badge.src-samruk { background: #e0f2fe; color: #0369a1; }
.badge.type { background: var(--teal-bg); color: var(--teal-2); }
.badge.stage { background: #fef3c7; color: #92400e; }
.badge.soon { background: #f1f5f9; color: #94a3b8; }
.cd { display: inline-block; padding: 3px 9px; border-radius: 6px; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.cd.green { background: var(--green-bg); color: var(--green); }
.cd.orange { background: var(--orange-bg); color: var(--orange); }
.cd.red { background: var(--red-bg); color: var(--red); }
.cd.muted { background: var(--bg); color: var(--muted); }

/* главная */
.hero { background: radial-gradient(1200px 400px at 80% -10%, #1b4a7a 0%, transparent 60%), var(--navy); color: #fff; }
.hero-in { max-width: 1320px; margin: 0 auto; padding: 56px 16px 64px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 960px) { .hero-in { grid-template-columns: 1fr; padding: 36px 16px 40px; } }
.hero h1 { font-size: 44px; line-height: 1.08; letter-spacing: -1px; margin: 0 0 16px; }
@media (max-width: 600px) { .hero h1 { font-size: 32px; } }
.hero h1 em { font-style: normal; color: #5eead4; }
.hero p.lead { font-size: 18px; color: #cbd5e1; margin: 0 0 24px; max-width: 620px; }
.bigsearch { display: flex; background: #fff; border-radius: 12px; padding: 6px; max-width: 640px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.bigsearch input { flex: 1; border: 0; outline: none; font-size: 17px; padding: 10px 12px; min-width: 0; border-radius: 8px; }
.bigsearch button { border: 0; background: var(--teal); color: #fff; font-weight: 700; font-size: 16px; padding: 0 22px; border-radius: 9px; cursor: pointer; }
.hints { margin-top: 12px; font-size: 13.5px; color: #94a3b8; }
.hints a { color: #cbd5e1; border-bottom: 1px dashed #64748b; margin-right: 10px; }
.hints a:hover { text-decoration: none; color: #fff; }
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 18px; }
.stat .v { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.stat .l { color: #94a3b8; font-size: 13.5px; }
.section { max-width: 1320px; margin: 0 auto; padding: 48px 16px 8px; }
.section h2 { font-size: 28px; letter-spacing: -.5px; margin-bottom: 6px; }
.section .sub { font-size: 16px; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .cards3, .cards4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards3, .cards4 { grid-template-columns: 1fr; } }
.feature { padding: 20px; }
.feature .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--teal-bg); display: grid; place-items: center; font-size: 20px; margin-bottom: 12px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.srcrow { display: flex; flex-wrap: wrap; gap: 10px; }
.srcpill { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; min-width: 190px; }
.srcpill b { display: block; }
.srcpill small { color: var(--muted); }
.srcpill.on { border-color: #99e2d9; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 6px; }
.dot.soon { background: #cbd5e1; }
.mini { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.mini .t { font-weight: 650; color: var(--text); }
.mini .m { color: var(--muted); font-size: 13px; }
.mini .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ctaband { background: var(--navy); color: #fff; border-radius: 16px; padding: 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.ctaband h2 { color: #fff; margin: 0 0 4px; }
.ctaband p { color: #cbd5e1; margin: 0; }

/* поиск */
.layout { display: grid; grid-template-columns: 290px 1fr; gap: 18px; align-items: start; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } .filters { display: none; position: static !important; max-height: none !important; } .filters.open { display: block; } .btn.ftoggle { display: flex !important; } }
.btn.ftoggle { display: none; width: 100%; justify-content: center; margin-bottom: 12px; padding: 11px; }
.filters { padding: 16px; position: sticky; top: 70px; max-height: calc(100vh - 86px); overflow: auto; }
.filters h3 { margin: 0 0 12px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.fg { border-top: 1px solid var(--line); padding: 12px 0; }
.fg:first-of-type { border-top: 0; padding-top: 0; }
.fl { display: block; font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 7px; }
.filters input[type=text], .filters input[type=number], .filters input[type=date] { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; background: #fff; }
.range { display: flex; gap: 6px; align-items: center; }
.range input { flex: 1; min-width: 0; }
.filters input[type=date] { padding: 7px 4px; font-size: 12.5px; }
.checks { max-height: 200px; overflow: auto; }
.checks label, .switch { display: flex; gap: 8px; align-items: center; padding: 3px 0; cursor: pointer; font-size: 13.5px; }
.checks label.dis { color: #94a3b8; cursor: default; }
.fbtns { position: sticky; bottom: -16px; background: #fff; padding: 12px 0 2px; }
.fbtns .btn { width: 100%; justify-content: center; }
.toolbar { padding: 12px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.count { font-size: 15px; }
.count b { font-size: 17px; }
.sortby { display: flex; gap: 2px; background: var(--bg); padding: 3px; border-radius: 9px; }
.sortby a { padding: 5px 11px; border-radius: 7px; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.sortby a.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); text-decoration: none; }
.toolbar .right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar input.nm { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; width: 160px; font: inherit; }
.subs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.subs a { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 3px 11px; color: var(--text); }

.card { padding: 15px 18px; margin-bottom: 10px; display: grid; grid-template-columns: 1fr 215px; gap: 16px; }
.card.hid { opacity: .55; }
@media (max-width: 700px) { .card { grid-template-columns: 1fr; } .card .side { text-align: left !important; align-items: flex-start !important; } .card .actions { justify-content: flex-start !important; } }
.card .top1 { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.card .ttl { font-size: 16px; font-weight: 650; color: var(--text); display: block; margin-bottom: 4px; line-height: 1.35; }
.card .ttl:hover { color: var(--teal-2); }
.card .cust { font-size: 13.5px; margin-bottom: 7px; color: #334155; }
.card .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.card .meta b { color: var(--text); font-weight: 600; }
.card .hits { margin-top: 8px; font-size: 13px; background: #f8fafc; border-left: 3px solid var(--teal); padding: 6px 10px; border-radius: 0 6px 6px 0; }
.card .side { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.amount { font-size: 20px; font-weight: 800; white-space: nowrap; letter-spacing: -.3px; }
.amount small { font-size: 13px; color: var(--muted); font-weight: 500; }
.dates { font-size: 12.5px; color: var(--muted); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-top: 4px; }
.actions form { margin: 0; }
.actions select, .sel { border: 1px solid var(--line); border-radius: 7px; padding: 4px 6px; font: inherit; font-size: 12.5px; background: #fff; }
.note { grid-column: 1 / -1; background: #fffbea; border: 1px solid #f3e3a5; border-radius: 7px; padding: 6px 10px; font-size: 13px; }
.lockbox { padding: 36px; text-align: center; }
.lockbox h2 { margin-bottom: 6px; }
.pager { display: flex; gap: 4px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; text-align: center; padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--text); }
.pager .on { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager .gap { border: 0; background: none; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* карточка тендера */
.detail { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
@media (max-width: 960px) { .detail { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 210px 1fr; gap: 9px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 6px; } }
.bigamount { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.blur { filter: blur(5px); user-select: none; }
.loading { background: var(--teal-bg); color: var(--teal-2); padding: 10px 14px; border-radius: 9px; margin-bottom: 14px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t td.n { text-align: right; white-space: nowrap; }
.tablewrap { overflow-x: auto; }
textarea { width: 100%; min-height: 90px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack .btn, .stack select { width: 100%; justify-content: center; }
.stack select { padding: 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

/* кабинет */
.board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .board { grid-template-columns: 1fr; } }
.col { background: #e9eef4; border-radius: var(--radius); padding: 10px; }
.col h3 { margin: 2px 4px 10px; font-size: 14px; }
.col h3 small { display: block; color: var(--muted); font-weight: 500; }
.wcard { background: #fff; border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); font-size: 13px; }
.wcard a.t { font-weight: 650; color: var(--text); display: block; margin-bottom: 3px; }

/* тарифы */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.plan.best { border: 2px solid var(--teal); position: relative; }
.plan.best::before { content: "Популярный"; position: absolute; top: -12px; left: 20px; background: var(--teal); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.plan .price { font-size: 32px; font-weight: 800; letter-spacing: -.5px; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.plan li::before { content: "✓ "; color: var(--teal); font-weight: 800; }
.plan li.no { color: #94a3b8; }
.plan li.no::before { content: "— "; color: #cbd5e1; }

/* вход */
.authwrap { min-height: calc(100vh - 140px); display: grid; place-items: center; }
.authbox { width: 100%; max-width: 420px; padding: 28px; }
.authbox label { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 5px; }
.authbox input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; font: inherit; font-size: 15px; }
.authbox .btn { width: 100%; justify-content: center; margin-top: 18px; padding: 12px; font-size: 15px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 800px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { padding: 16px 18px; }
.kpi .v { font-size: 24px; font-weight: 800; }
.kpi .l { color: var(--muted); font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; min-width: 70px; }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: 4px; }
.footer { border-top: 1px solid var(--line); background: #fff; }
.footer-in { max-width: 1320px; margin: 0 auto; padding: 22px 16px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }

/* ---------- AI-консультант ---------- */
.ai-badge { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--teal), #6366f1); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .5px; vertical-align: middle; }
.ai-badge.sm { width: 26px; height: 26px; font-size: 11px; border-radius: 7px; margin-right: 6px; }
.ai-hero { padding: 36px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ai-layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .ai-layout { grid-template-columns: 1fr; } .ai-side { order: 2; } }
.ai-side { padding: 12px; position: sticky; top: 70px; }
.ai-threads { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow: auto; }
.ai-threads a { padding: 7px 9px; border-radius: 7px; color: var(--text); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-threads a:hover, .ai-threads a.on { background: var(--teal-bg); text-decoration: none; }
.chat { display: flex; flex-direction: column; min-height: 62vh; }
.chat.inline { min-height: 0; margin-top: 12px; }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.meter { font-size: 12.5px; color: var(--muted); background: var(--bg); padding: 3px 9px; border-radius: 20px; }
.msgs { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 64vh; }
.chat.inline .msgs { padding: 10px 0; max-height: none; }
.chat.inline .msgs:empty { display: none; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin-bottom: 0; }
.msg ul, .msg ol { margin: 4px 0 8px; padding-left: 20px; } .msg li { margin: 2px 0; }
.msg h4 { margin: 8px 0 4px; font-size: 15px; }
.msg code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }
.msg.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: #f1f5f9; border-bottom-left-radius: 4px; }
.msg.typing p::after { content: " ●●●"; animation: blink 1.2s infinite; color: var(--teal); }
@keyframes blink { 50% { opacity: .2; } }
.msg.err { background: var(--red-bg); color: var(--red); }
.msg .docs { margin-top: 8px; font-size: 12.5px; color: var(--teal-2); }
.msg .disc { margin-top: 8px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 6px; }
.empty-chat { margin: auto; text-align: center; max-width: 640px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 0; }
.empty-chat h2 { margin: 6px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips.quick { justify-content: flex-start; padding: 0 16px 10px; }
.chat.inline .chips.quick { padding: 0; }
.chip { border: 1px solid #b8e6df; background: var(--teal-bg); color: var(--teal-2); border-radius: 20px; padding: 7px 13px; font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.chip:hover { background: #d3f0eb; }
form.ask { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat.inline form.ask { padding: 10px 0 0; }
form.ask textarea { flex: 1; min-height: 44px; max-height: 160px; resize: vertical; }
form.ask .btn { height: 44px; }
.aibox { border: 1px solid #b8e6df; background: linear-gradient(180deg, #f3fbfa, #fff 120px); }
.picker textarea { width: 100%; }
.pick-out { margin-top: 12px; }
.pickrow { display: flex; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.pickrow a { margin-left: auto; font-size: 13px; }
.err { color: var(--red); }
.ai-promo { padding: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; background: linear-gradient(135deg, #f3fbfa, #eef2ff); }
@media (max-width: 900px) { .ai-promo { grid-template-columns: 1fr; } }
.ai-demo { display: flex; flex-direction: column; gap: 10px; }
.ai-demo .msg.assistant { background: #fff; }

/* ---------- меню кабинета и новые блоки ---------- */
details.menu { position: relative; }
details.menu summary { list-style: none; cursor: pointer; color: #cbd5e1; padding: 8px 11px; border-radius: 8px; font-weight: 500; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu[open] summary, details.menu summary:hover { color: #fff; background: rgba(255,255,255,.1); }
.menu-pop { position: absolute; right: 0; top: 40px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.18); padding: 6px; min-width: 260px; z-index: 50; display: flex; flex-direction: column; }
.menu-pop a { color: var(--text) !important; padding: 8px 10px; border-radius: 7px; }
.menu-pop a:hover { background: var(--teal-bg) !important; text-decoration: none; }
.badge.flag { background: #fef3c7; color: #92400e; }
.badge.adv { background: var(--green-bg); color: var(--green); }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 13.5px; }
.calc label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); }
.calc input { border: 1px solid var(--line); border-radius: 7px; padding: 7px 8px; font: inherit; color: var(--text); }
.calc-out { margin-top: 10px; padding: 10px 12px; border-radius: 9px; background: var(--bg); font-size: 14px; }
.calc-out b.pos { color: var(--green); } .calc-out b.neg { color: var(--red); }
.cnt { color: var(--muted); font-size: 12px; margin-left: auto; }
.lock { padding: 18px; text-align: center; background: #fff7e6; border-radius: 10px; margin-top: 10px; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 700px) { .formgrid, .calc { grid-template-columns: 1fr; } }
.formgrid input, .formgrid select, .formgrid textarea, .inp { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; }
.svc { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.svc h3 { margin: 0; font-size: 16px; }
.svc p { margin: 0; color: var(--muted); font-size: 14px; }
code.key { background: var(--bg); padding: 6px 10px; border-radius: 7px; display: inline-block; word-break: break-all; }

/* юридические страницы */
.legal-wrap{display:grid;grid-template-columns:240px 1fr;gap:18px;align-items:start}
.legal-nav{display:flex;flex-direction:column;padding:10px;position:sticky;top:80px}
.legal-nav a{padding:9px 12px;border-radius:8px;color:inherit;text-decoration:none}
.legal-nav a.on,.legal-nav a:hover{background:#e7f5f2;color:#0d7d6c}
.legal{padding:26px 30px;line-height:1.6;max-width:860px}
.legal h2{font-size:18px;margin:22px 0 8px}
.legal ul{padding-left:20px}
.req{border-collapse:collapse;width:100%;margin-top:6px}
.req td{padding:8px 10px;border-bottom:1px solid #e5e9ef;vertical-align:top}
.req td:first-child{color:#64748b;width:200px}
.authbox .agree,.agree{display:flex;gap:8px;align-items:flex-start;font-size:13px;line-height:1.45;margin:12px 0 4px;font-weight:400}
.agree input{width:auto;margin-top:3px}
.footer-in{flex-wrap:wrap;gap:8px 20px}
.footer-links a{white-space:nowrap}
.footer-co{width:100%;font-size:12.5px;opacity:.8}
.paynote{font-size:12.5px;color:#64748b;margin-top:8px}
@media (max-width:760px){.legal-wrap{grid-template-columns:1fr}.legal-nav{position:static;flex-direction:row;flex-wrap:wrap}.legal{padding:18px}.req td:first-child{width:120px}}

/* выбор способа оплаты */
.paymethods{display:flex;flex-direction:column;gap:12px;margin:18px 0 6px}
.paymethod{display:flex;flex-direction:column;gap:8px;border:1px solid #e2e8f0;border-radius:12px;padding:14px 16px;color:inherit;text-decoration:none;background:#fff}
a.paymethod{flex-direction:row;align-items:center;justify-content:space-between}
a.paymethod:hover{border-color:#0d9488;box-shadow:0 2px 10px rgba(13,148,136,.12)}
.pm-head{display:flex;gap:12px;align-items:center}
.pm-head small{display:block;color:#64748b;font-size:12.5px;font-weight:400}
.pm-logo{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;font-weight:800;color:#fff;flex:none}
.pm-logo.kaspi{background:#f14635}.pm-logo.halyk{background:#00805f}.pm-logo.freedom{background:#2b5ce6}
.pm-go{color:#0d9488;font-weight:600;white-space:nowrap}
.paymethod label{font-size:13px;margin:4px 0 0}
.paymethod small.sub{font-size:12px;margin:0}

.brand .mark-img{width:38px;height:auto;display:block}

.wa-float{position:fixed;right:20px;bottom:20px;width:58px;height:58px;border-radius:50%;background:#25d366;display:grid;place-items:center;box-shadow:0 6px 18px rgba(0,0,0,.22);z-index:50;transition:transform .15s}
.wa-float:hover{transform:scale(1.07);text-decoration:none}
@media (max-width:760px){.wa-float{right:14px;bottom:14px;width:52px;height:52px}}
.errpage{text-align:center;padding:70px 16px}
.errpage .code{font:900 110px/1 Inter;color:var(--teal);letter-spacing:-4px}
.errpage h1{margin:12px 0 8px}
.errpage .btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:22px}

.langbtn{font-size:12.5px!important;font-weight:700;border:1px solid rgba(255,255,255,.25);border-radius:7px;padding:4px 8px!important}
.langsw a{color:inherit;text-decoration:underline}

/* телефоны: меню в одну прокручиваемую строку, кнопка WhatsApp не закрывает подвал */
@media (max-width: 760px) {
  .top-in { gap: 10px; padding: 10px 14px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a, .nav summary { white-space: nowrap; flex: none; }
  .footer-in { padding-bottom: 86px; }
  .errpage { padding: 48px 8px; }
  .errpage .code { font-size: 84px; }
}
