/* Telegram MCP — telegram.5k.uz */
:root {
  --bg: #070b14;
  --bg2: #0b1120;
  --surface: rgba(255,255,255,.035);
  --surface-2: rgba(255,255,255,.06);
  --surface-solid: #0f1729;
  --border: rgba(255,255,255,.08);
  --border-2: rgba(255,255,255,.14);
  --text: #e8eefc;
  --muted: #93a1bd;
  --faint: #5d6b88;
  --brand: #2aabee;
  --brand-2: #7c5cff;
  --brand-3: #22d3ee;
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --grad: linear-gradient(135deg, #2aabee 0%, #5b7cfa 50%, #8b5cf6 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,.6);
  --ring: 0 0 0 4px rgba(42,171,238,.18);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f8fc; --bg2: #eef2f9; --surface: rgba(255,255,255,.75); --surface-2: #ffffff;
    --surface-solid: #ffffff; --border: rgba(15,23,42,.08); --border-2: rgba(15,23,42,.16);
    --text: #0b1222; --muted: #50607d; --faint: #8a97b0; --shadow: 0 20px 50px -24px rgba(15,23,42,.25);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f6f8fc; --bg2: #eef2f9; --surface: rgba(255,255,255,.75); --surface-2: #ffffff;
  --surface-solid: #ffffff; --border: rgba(15,23,42,.08); --border-2: rgba(15,23,42,.16);
  --text: #0b1222; --muted: #50607d; --faint: #8a97b0; --shadow: 0 20px 50px -24px rgba(15,23,42,.25);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15.5px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
  overflow-x: hidden;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 750; }
h1 { font-size: clamp(2.1rem, 5.4vw, 4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .9em; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
::selection { background: rgba(42,171,238,.35); }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
main { flex: 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .875rem; }
.center { text-align: center; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* Fon bezaklari */
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.bg-orbs::before, .bg-orbs::after {
  content: ""; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: .22;
}
.bg-orbs::before { background: #2aabee; top: -30vmax; left: -15vmax; animation: drift 22s ease-in-out infinite alternate; }
.bg-orbs::after { background: #7c3aed; bottom: -35vmax; right: -20vmax; animation: drift 28s ease-in-out infinite alternate-reverse; }
:root[data-theme="light"] .bg-orbs::before, :root[data-theme="light"] .bg-orbs::after { opacity: .12; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .bg-orbs::before, :root:not([data-theme="dark"]) .bg-orbs::after { opacity: .12; } }
.grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
}
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.1); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .msg { opacity: 1; transform: none; }
}

/* Navigatsiya */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px); background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border); }
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: -.02em; font-size: 1.06rem; white-space: nowrap; flex: none; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center;
  box-shadow: 0 8px 24px -8px rgba(42,171,238,.7); }
.logo-mark svg { width: 19px; height: 19px; }
.logo small { font-weight: 600; color: var(--muted); font-size: .78rem; padding: 2px 7px; border: 1px solid var(--border-2); border-radius: 99px; }
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 550; font-size: .94rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 820px) {
  .nav-links { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; padding: 10px 16px 16px;
    background: var(--surface-solid); border-bottom: 1px solid var(--border); margin: 0; }
  .nav-links.open { display: flex; }
  .menu-btn { display: grid; }
  .nav-right .btn-ghost.hide-sm { display: none; }
}

/* Tugmalar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 650; font-size: .95rem; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s; white-space: nowrap;
  color: var(--text); background: var(--surface-2); text-decoration: none !important; }
.btn:hover { border-color: var(--border-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(76,120,250,.75), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { box-shadow: 0 14px 34px -10px rgba(76,120,250,.9), inset 0 1px 0 rgba(255,255,255,.25); border-color: transparent; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-danger { background: rgba(239,68,68,.12); color: #f87171; border-color: rgba(239,68,68,.25); }
.btn-danger:hover { background: rgba(239,68,68,.2); border-color: rgba(239,68,68,.45); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1.02rem; border-radius: 14px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .6; pointer-events: none; }
.btn.loading::before { content: ""; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Kartochkalar */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card-hd { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-hd h3 { margin: 0; }
.card-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: rgba(42,171,238,.12); color: var(--brand); }
.card-ico svg { width: 20px; height: 20px; }
.card-ico.v { background: rgba(139,92,246,.14); color: #a78bfa; }
.card-ico.g { background: rgba(34,197,94,.13); color: #4ade80; }
.card-ico.o { background: rgba(245,158,11,.13); color: #fbbf24; }
.card-ico.r { background: rgba(239,68,68,.13); color: #f87171; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: .78rem; font-weight: 650;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.badge.ok { color: #4ade80; background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.25); }
.badge.warn { color: #fbbf24; background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.25); }
.badge.bad { color: #f87171; background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.25); }
.badge.brand { color: var(--brand); background: rgba(42,171,238,.1); border-color: rgba(42,171,238,.25); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); }
.pulse .dot { animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }

/* Formalar */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.input, input[type=text], input[type=email], input[type=password], input[type=tel], select, textarea {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface-2);
  color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s; }
textarea { height: auto; padding: 12px 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
input::placeholder { color: var(--faint); }
.hint { font-size: .82rem; color: var(--faint); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .9rem; color: var(--muted); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; }
.pw-wrap { position: relative; }
.pw-wrap .pw-toggle { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border: 0; background: none; color: var(--faint); cursor: pointer; border-radius: 8px; display: grid; place-items: center; }
.pw-wrap .pw-toggle:hover { color: var(--text); }
.pw-wrap .pw-toggle svg { width: 18px; height: 18px; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: .92rem; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.alert.err { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.28); color: #fca5a5; }
.alert.ok { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.28); color: #86efac; }
.alert.info { background: rgba(42,171,238,.08); border: 1px solid rgba(42,171,238,.25); color: var(--text); }
.alert.warn { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25); color: var(--text); }
:root[data-theme="light"] .alert.err { color: #b91c1c; } :root[data-theme="light"] .alert.ok { color: #15803d; }

/* Toggle */
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--border-2); transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }

/* Auth sahifalari */
.auth { display: grid; place-items: center; padding: 56px 20px 80px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .card { padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.75rem; margin-bottom: 6px; }

/* Hero */
.hero { position: relative; padding: 84px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 48px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--surface-2);
  border: 1px solid var(--border); font-size: .84rem; font-weight: 600; color: var(--muted); margin-bottom: 22px; }
.eyebrow b { background: var(--grad); color: #fff; padding: 2px 9px; border-radius: 99px; font-size: .74rem; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 560px; margin-bottom: 28px; }
.ai-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; align-items: center; }
.ai-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: .88rem; }
.ai-chip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Demo oyna */
.demo { position: relative; border-radius: 22px; background: var(--surface-solid); border: 1px solid var(--border-2); box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.02) inset; overflow: hidden; }
.demo::before { content: ""; position: absolute; inset: -1px; border-radius: 22px; padding: 1px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; pointer-events: none; }
.demo-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: .82rem; color: var(--faint); }
.demo-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-2); }
.demo-bar span { margin-left: 8px; }
.demo-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; min-height: 340px; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 16px; font-size: .92rem; line-height: 1.5; opacity: 0; transform: translateY(8px); animation: rise .5s ease forwards; }
.msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; }
.msg.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg.tool { align-self: flex-start; font-family: var(--mono); font-size: .78rem; color: var(--muted); background: transparent; border: 1px dashed var(--border-2); padding: 7px 11px; border-radius: 10px; }
.msg.tool b { color: var(--brand); font-weight: 600; }
.msg:nth-child(1) { animation-delay: .2s } .msg:nth-child(2) { animation-delay: .9s } .msg:nth-child(3) { animation-delay: 1.5s } .msg:nth-child(4) { animation-delay: 2.3s } .msg:nth-child(5) { animation-delay: 3.1s }
@keyframes rise { to { opacity: 1; transform: none; } }
.msg ul { margin: 6px 0 0; padding-left: 18px; }

/* Bo'limlar */
section.sec { padding: 72px 0; position: relative; }
.sec-hd { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.sec-hd p { color: var(--muted); font-size: 1.05rem; }
.kicker { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.step { position: relative; padding-top: 30px; }
.step-n { position: absolute; top: -16px; left: 24px; width: 36px; height: 36px; border-radius: 11px; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: 0 8px 20px -8px rgba(76,120,250,.8); }
.feat h3 { margin-top: 14px; }
.feat p { color: var(--muted); margin: 0; font-size: .95rem; }
.tool-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tool-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.tool-item code { color: var(--brand); font-weight: 600; font-size: .82rem; }
.tool-item p { margin: 2px 0 0; font-size: .84rem; color: var(--muted); line-height: 1.45; }
.perm { font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; flex: none; margin-top: 2px; }
.perm.read { background: rgba(34,197,94,.12); color: #4ade80; }
.perm.send { background: rgba(42,171,238,.12); color: var(--brand); }
.perm.modify { background: rgba(239,68,68,.12); color: #f87171; }

.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin-bottom: 10px; }
.faq summary { padding: 16px 20px; cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 20px 18px; color: var(--muted); }

.cta { text-align: center; padding: 56px 24px; border-radius: 28px; background: radial-gradient(120% 140% at 50% 0%, rgba(42,171,238,.22), rgba(124,92,255,.12) 45%, transparent 75%), var(--surface); border: 1px solid var(--border-2); }

/* Dashboard */
.page-hd { padding: 36px 0 20px; }
.page-hd h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 4px; }
.dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; padding-bottom: 60px; align-items: start; }
@media (max-width: 980px) { .dash { grid-template-columns: minmax(0, 1fr); } }
.stack { min-width: 0; }
@media (max-width: 640px) { .card { padding: 18px; } .page-hd { padding-top: 24px; } }
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
@media (max-width: 640px) { .progress { grid-template-columns: 1fr; } }
.pstep { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.pstep .ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; border: 2px solid var(--border-2); color: var(--muted); flex: none; }
.pstep.done .ico { background: var(--ok); border-color: var(--ok); color: #fff; }
.pstep.cur { border-color: rgba(42,171,238,.45); background: rgba(42,171,238,.06); }
.pstep.cur .ico { border-color: var(--brand); color: var(--brand); }
.pstep b { display: block; font-size: .92rem; }
.pstep span { font-size: .8rem; color: var(--faint); }

.tg-profile { display: flex; gap: 14px; align-items: center; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.2rem; flex: none; }
.copy-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--border-2); }
.copy-box code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tab svg { width: 16px; height: 16px; flex: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.pane { display: none; }
.pane.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
ol.steps { padding-left: 0; list-style: none; counter-reset: s; margin: 0; }
ol.steps li { counter-increment: s; position: relative; padding: 0 0 12px 36px; color: var(--muted); }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border-2); display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: var(--text); }
ol.steps li b { color: var(--text); }
pre.code { position: relative; background: var(--bg2); border: 1px solid var(--border-2); border-radius: 12px; padding: 14px 16px; overflow-x: auto; font: .82rem/1.55 var(--mono); margin: 10px 0 14px; color: var(--text); }
pre.code .copy-btn { position: absolute; top: 8px; right: 8px; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.list-item:first-child { border-top: 0; padding-top: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; padding: 20px 10px; color: var(--faint); font-size: .9rem; }
.perm-row { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--border); }
.perm-row:first-of-type { border-top: 0; padding-top: 4px; }
.perm-row b { display: block; font-size: .95rem; }
.perm-row span { font-size: .84rem; color: var(--muted); }
.act { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); font-size: .86rem; }
.act:first-child { border-top: 0; }
.act .st { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.act .st.bad { background: var(--bad); }
.act code { color: var(--brand); font-weight: 600; }
.act .meta { color: var(--faint); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat { padding: 16px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--border); }
.stat b { font-size: 1.6rem; display: block; letter-spacing: -.02em; }
.stat span { color: var(--faint); font-size: .8rem; }

/* Ulash sahifasi */
.connect-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
@media (max-width: 820px) { .connect-grid { grid-template-columns: 1fr; } }
.qr-box { position: relative; width: 260px; height: 260px; margin: 0 auto; padding: 14px; border-radius: 22px; background: #fff; display: grid; place-items: center; box-shadow: 0 20px 50px -18px rgba(42,171,238,.55); }
.qr-box img { width: 100%; height: 100%; }
.qr-box .qr-logo { position: absolute; width: 50px; height: 50px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; border: 4px solid #fff; }
.qr-box .qr-logo svg { width: 24px; height: 24px; }
.qr-skel { width: 100%; height: 100%; border-radius: 12px; background: linear-gradient(90deg, #eef2f7 25%, #e1e7f0 50%, #eef2f7 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.timer { height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; margin-top: 16px; }
.timer i { display: block; height: 100%; background: var(--grad); transition: width 1s linear; }
.otp { display: flex; gap: 8px; justify-content: center; }
.otp input { width: 48px; height: 58px; text-align: center; font-size: 1.5rem; font-weight: 700; padding: 0; font-family: var(--mono); }
.success-anim { width: 84px; height: 84px; border-radius: 50%; background: rgba(34,197,94,.12); display: grid; place-items: center; margin: 0 auto 16px; color: var(--ok); animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
.success-anim svg { width: 42px; height: 42px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* Hujjat */
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 20px; }
.toc { position: sticky; top: 90px; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: .9rem; }
.toc a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.docs-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 40px; padding: 30px 0 70px; }
@media (max-width: 860px) { .docs-layout { grid-template-columns: 1fr; } .toc { position: static; display: flex; flex-wrap: wrap; gap: 4px; } }

/* Consent */
.consent-apps { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 22px; }
.consent-apps .app { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border-2); font-weight: 800; font-size: 1.3rem; }
.consent-apps .app.tg { background: var(--grad); color: #fff; border: 0; }
.consent-apps .app.tg svg { width: 28px; height: 28px; }
.consent-apps .link { display: flex; gap: 4px; }
.consent-apps .link i { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.scope-list { list-style: none; padding: 0; margin: 0 0 20px; }
.scope-list li { display: flex; gap: 10px; padding: 9px 0; font-size: .92rem; color: var(--muted); border-top: 1px solid var(--border); }
.scope-list li:first-child { border-top: 0; }
.scope-list svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* Modal / toast */
.toast-host { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 11px 16px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--border-2); box-shadow: var(--shadow); font-size: .9rem; font-weight: 550; animation: rise .25s ease forwards; display: flex; gap: 8px; align-items: center; pointer-events: auto; }
.toast.err { border-color: rgba(239,68,68,.4); }
.toast.ok::before { content: "✓"; color: var(--ok); font-weight: 800; }
.toast.err::before { content: "!"; color: var(--bad); font-weight: 800; }
dialog { border: 1px solid var(--border-2); border-radius: 20px; background: var(--surface-solid); color: var(--text); padding: 26px; width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(3,6,14,.6); backdrop-filter: blur(4px); }
dialog h3 { margin-bottom: 8px; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 40px; color: var(--faint); font-size: .88rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--muted); }
