:root {
  --bg: #0F172A; --bg2: #0B1220; --bg3: #17233A;
  --surf: #1E293B; --surf2: #263449;
  --border: #2C3E56; --border2: #3A4F6E;
  --acc: #22C55E; --acc2: #4ADE80; --acc-hover: #16A34A;
  --glow: rgba(34,197,94,0.18);
  --green: #22C55E; --red: #ef4444;
  --text: #F8FAFC; --text2: #94A3B8; --text3: #64748B;
  --ff: 'Inter', sans-serif; --ffd: 'Sora', sans-serif;
  --r: 12px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { height: 100%; font-family: var(--ff); font-size: 14px; color: var(--text); background: var(--bg); }
#loginBlock, #imkoniyatlar, #qanday-ishlaydi { scroll-margin-top: 90px; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
a { text-decoration: none; color: inherit; cursor: pointer; }

/* SKROLL PANELI — Windows'ning qo'pol kulrang paneli o'rniga qorong'i
   dizaynga singib ketadigan ingichka variant. Skroll ishlashda davom etadi,
   faqat ko'zga tashlanmaydi (ustiga borilsa biroz yorishadi). */
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.22) transparent; } }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,.22); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.42); }
::-webkit-scrollbar-corner { background: transparent; }

/* IKONKALAR — emoji o'rniga chiziq uslubidagi (stroke) SVG ikonkalar.
   currentColor orqali atrofdagi matn rangini avtomatik oladi. */
.ico { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.22em; flex-shrink: 0; }
.ico svg { width: 100%; height: 100%; display: block; }
.ico-lg { width: 1.6em; height: 1.6em; vertical-align: -0.3em; }
.ico-xl { width: 2.2em; height: 2.2em; }

/* NAVBAR */
.navbar { position: fixed; top: 0; left: 0; right: 0; min-height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 8px 32px; background: rgba(15,23,42,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); z-index: 100; }
.nav-brand { display: flex; flex-direction: row; align-items: center; gap: 11px; font-family: var(--ffd); font-weight: 700; font-size: 18px; }
.nav-logo { font-size: 22px; }
.brand-mark { display: block; object-fit: cover; border-radius: 12px; background: #eefaff; border: 1px solid rgba(56,189,248,.32); }
.nav-brand > .brand-mark { width: 40px; height: 40px; box-shadow: 0 0 12px rgba(14,165,233,.22); }
.brand-logo-full { display: block; width: 104px; height: 64px; object-fit: contain; filter: drop-shadow(0 5px 12px rgba(14,165,233,.22)); }
.brand-lockup-mark { display: block; width: 48px; height: 48px; flex-shrink: 0; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(14,165,233,.32)); }
.brand-lockup-copy { display: flex; flex-direction: column; justify-content: center; order: 2; line-height: 1; text-align: left; }
.nav-brand .brand-lockup-mark, .sb-brand .brand-lockup-mark { order: 1; }
.brand-lockup-copy strong { color: #f8fafc; font-family: var(--ffd); font-size: 18px; font-weight: 800; letter-spacing: -.45px; white-space: nowrap; }
.brand-lockup-copy strong span, .topbar-brand strong span { color: #38bdf8; }
.brand-lockup-copy small { margin-top: 5px; color: #7dd3fc; font-size: 7px; font-weight: 700; letter-spacing: .16em; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 13.5px; color: var(--text2); transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: inline-flex; align-items: center; gap: 6px; background: var(--acc); color: #06170C; font-weight: 700; font-size: 13px; padding: 9px 18px; border-radius: 100px; transition: all .15s; }
.nav-cta:hover { background: var(--acc-hover); color: #fff; }

/* HERO */
.landing { background: var(--bg); }
.hero { padding: 130px 32px 40px; position: relative; overflow-x: hidden; }
.hero-glow { position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 30%, rgba(34,197,94,0.22) 0%, transparent 60%); pointer-events: none; }

/* Chap/o'ng bo'sh maydonlarni to'ldiruvchi nozik chiziq + zarra effekti */
.hero-side-fx { position: absolute; top: 0; bottom: 0; width: 220px; pointer-events: none; z-index: 0; opacity: 0.8; }
.hero-side-fx-l { left: 0; }
.hero-side-fx-r { right: 0; }
.side-lines { width: 100%; height: 100%; }
.side-dot { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--acc2); box-shadow: 0 0 8px var(--acc2); animation: sideDotFloat 6s ease-in-out infinite; }
.hero-side-fx-l .sd1 { top: 18%; left: 55px; animation-delay: 0s; }
.hero-side-fx-l .sd2 { top: 48%; left: 25px; animation-delay: 1.2s; }
.hero-side-fx-l .sd3 { top: 75%; left: 70px; animation-delay: 2.4s; }
.hero-side-fx-r .sd1 { top: 22%; right: 60px; animation-delay: 0.6s; }
.hero-side-fx-r .sd2 { top: 50%; right: 30px; animation-delay: 1.8s; }
.hero-side-fx-r .sd3 { top: 78%; right: 65px; animation-delay: 3s; }
@keyframes sideDotFloat { 0%,100% { transform: translateY(0); opacity: 0.9; } 50% { transform: translateY(-14px); opacity: 0.4; } }
@media (max-width: 1200px) { .hero-side-fx { display: none; } }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 24px; max-width: 1360px; margin: 0 auto; position: relative; z-index: 1; }
.hero-left { text-align: left; max-width: 620px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 20px; background: var(--glow); border: 1px solid rgba(34,197,94,0.4); border-radius: 100px; font-size: 13px; font-weight: 600; color: var(--acc2); margin-bottom: 26px; }
h1 { font-family: var(--ffd); font-size: clamp(36px, 4.8vw, 60px); font-weight: 800; line-height: 1.12; letter-spacing: -0.8px; margin-bottom: 22px; }
.grad { background: linear-gradient(135deg, var(--acc), var(--acc2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { font-size: 16.5px; color: var(--text2); line-height: 1.75; margin-bottom: 32px; }

.hero-cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.btn-hero-ghost { background: var(--surf); border: 1px solid var(--border); color: var(--text); padding: 13px 24px; border-radius: 100px; font-family: var(--ffd); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: all .2s; }
.btn-hero-ghost:hover { border-color: var(--border2); background: var(--surf2); transform: translateY(-2px); }

.hero-checks { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 24px; font-size: 13px; color: var(--text2); }
.hero-checks span { display: inline-flex; align-items: center; }
.chk { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--text3); font-style: normal; font-size: 10px; color: var(--acc2); margin-right: 7px; flex-shrink: 0; }

.login-label { font-size: 14px; color: var(--text2); margin-bottom: 14px; }
.login-hint { margin-top: 12px; font-size: 12px; color: var(--text3); }
.btn-hero { display: inline-block; padding: 14px 32px; background: var(--acc); color: #06170C; border-radius: 100px; font-family: var(--ffd); font-size: 16px; font-weight: 700; transition: all 0.2s; }
.btn-hero:hover { background: var(--acc-hover); color: #fff; transform: translateY(-2px); }

/* HERO VISUAL — jonli AI robot sahnasi */
.hero-right { display: flex; align-items: center; justify-content: center; position: relative; }
.orb-wrap { position: relative; width: 440px; height: 440px; display: flex; align-items: center; justify-content: center; }
.orb-wrap::before { content: ''; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(34,197,94,.16), rgba(56,189,248,.06) 42%, transparent 70%); filter: blur(14px); animation: heroAura 4s ease-in-out infinite; }
.bot-illustration { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 24px 48px rgba(2,6,23,.48)); }
.hero-bot-core { transform-box: fill-box; transform-origin: center; animation: botCoreFloat 4.6s ease-in-out infinite; }
.hero-orbit { transform-box: view-box; transform-origin: 220px 205px; }
.orbit-back { animation: orbitSpin 18s linear infinite; }
.orbit-front { animation: orbitSpinReverse 14s linear infinite; }
.hero-holo-glow { animation: holoGlow 2.8s ease-in-out infinite; }
.hero-holo-ring { fill: none; stroke: #67e8f9; stroke-width: 1.3; transform-box: fill-box; transform-origin: center; }
.hero-holo-ring.ring-a { opacity: .58; animation: holoRing 2.8s ease-out infinite; }
.hero-holo-ring.ring-b { opacity: .35; animation: holoRing 2.8s ease-out infinite .9s; }
.data-stream { fill: none; stroke: url(#orbitGrad); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 8 10; opacity: .42; animation: dataFlow 5s linear infinite; }
.stream-b { animation-duration: 6.5s; animation-direction: reverse; opacity: .3; }
.stream-c { animation-duration: 7.5s; opacity: .22; }
.data-nodes circle { animation: dataNode 2.4s ease-in-out infinite; }
.data-nodes circle:nth-child(2n) { animation-delay: .7s; }
.data-nodes circle:nth-child(3n) { animation-delay: 1.3s; }
.hero-eyes { transform-box: fill-box; transform-origin: center; animation: botBlink 5.2s ease-in-out infinite; }
.hero-smile { stroke-dasharray: 38; stroke-dashoffset: 38; animation: smileDraw 4.6s ease-in-out infinite; }
.hero-antenna { transform-box: fill-box; transform-origin: center; animation: antennaPulse 1.9s ease-in-out infinite; }
.hero-sparkles > * { transform-box: fill-box; transform-origin: center; animation: sparkle 2.4s ease-in-out infinite; }
.hero-sparkles > *:nth-child(2) { animation-delay: .8s; }
.hero-sparkles > *:nth-child(3) { animation-delay: 1.4s; }
.hero-sparkles > *:nth-child(4) { animation-delay: 1.9s; }
.hero-mini-card { transform-box: fill-box; transform-origin: center; }
.card-chat { animation: miniCardFloat 4.1s ease-in-out infinite; }
.card-flow { animation: miniCardFloat 4.8s ease-in-out infinite .65s; }
.float-card { position: absolute; display: flex; align-items: center; gap: 8px; background: rgba(9,18,33,.76); border: 1px solid rgba(74,222,128,.28); border-radius: 12px; padding: 10px 15px; font-size: 12px; color: var(--text); backdrop-filter: blur(14px); box-shadow: 0 12px 32px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06); white-space: nowrap; }
.float-card::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--acc2); box-shadow: 0 0 10px var(--acc2); margin-left: 2px; animation: statusPulse 1.8s ease-in-out infinite; }
.float-card .ico { color: #86efac; width: 1.2em; height: 1.2em; }
.fc1 { top: 15%; left: -8%; animation: cardFloatA 4.5s ease-in-out infinite; }
.fc2 { top: 6%; right: -10%; animation: cardFloatB 5.5s ease-in-out infinite .5s; }
.fc3 { bottom: 10%; right: -6%; animation: cardFloatA 5s ease-in-out infinite 1s; }
@keyframes heroAura { 0%,100% { transform: scale(.96); opacity: .65; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes botCoreFloat { 0%,100% { transform: translateY(0) rotate(-.4deg); } 50% { transform: translateY(-10px) rotate(.6deg); } }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes orbitSpinReverse { to { transform: rotate(-360deg); } }
@keyframes holoGlow { 0%,100% { opacity: .55; transform: scaleX(.9); } 50% { opacity: 1; transform: scaleX(1.06); } }
@keyframes holoRing { 0% { transform: scale(.72); opacity: 0; } 28% { opacity: .65; } 100% { transform: scale(1.12); opacity: 0; } }
@keyframes dataFlow { to { stroke-dashoffset: -72; } }
@keyframes dataNode { 0%,100% { opacity: .25; transform: scale(.72); } 50% { opacity: 1; transform: scale(1.35); } }
@keyframes botBlink { 0%,43%,47%,100% { transform: scaleY(1); } 45% { transform: scaleY(.08); } }
@keyframes smileDraw { 0%,12% { stroke-dashoffset: 38; } 28%,82% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -38; } }
@keyframes antennaPulse { 0%,100% { transform: scale(.9); opacity: .78; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes sparkle { 0%,100% { opacity: .25; transform: scale(.62) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(22deg); } }
@keyframes miniCardFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes cardFloatA { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(0,-10px,0); } }
@keyframes cardFloatB { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(5px,-12px,0); } }
@keyframes statusPulse { 0%,100% { opacity: .4; transform: scale(.72); } 50% { opacity: 1; transform: scale(1.2); } }

/* STEPS BAR */
.steps-bar { max-width: 1180px; margin: 50px auto 0; background: var(--surf); border: 1px solid var(--border); border-radius: 16px; padding: 22px 26px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; position: relative; z-index: 1; }
.step { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--acc); color: #06170C; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--bg3); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--acc2); }
.step-icon .ico { width: 1.2em; height: 1.2em; }
.step-txt { display: flex; flex-direction: column; gap: 2px; }
.step-txt b { font-size: 13px; font-weight: 700; }
.step-txt span { font-size: 11.5px; color: var(--text2); line-height: 1.4; }
.step-arrow { color: var(--text3); flex-shrink: 0; }

/* FOOTER STATS */
.footer-stats { max-width: 1180px; margin: 24px auto 60px; padding: 26px 32px; background: var(--surf); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.fstat { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text2); }
.fstat .ico { width: 24px; height: 24px; color: var(--acc); flex-shrink: 0; }
.fstat b { display: block; font-size: 13px; color: var(--text); margin-bottom: 2px; }

/* DASHBOARD SHOWCASE — matn chapda, jonli mahsulot o'ngda */
.dashboard-showcase { position: relative; z-index: 3; width: 100%; max-width: 1380px; display: grid; grid-template-columns: minmax(320px,.72fr) minmax(650px,1.45fr); align-items: center; gap: 58px; margin: 72px auto 78px; padding: 0 32px; }
.dashboard-showcase-copy { max-width: 430px; }
.showcase-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 17px; color: var(--acc2); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.showcase-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 12px var(--acc); animation: statusPulse 1.8s ease-in-out infinite; }
.dashboard-showcase-copy h2 { margin-bottom: 17px; font-family: var(--ffd); font-size: clamp(30px,3.3vw,46px); line-height: 1.16; letter-spacing: -.5px; }
.dashboard-showcase-copy > p { max-width: 410px; color: var(--text2); font-size: 14px; line-height: 1.75; }
.showcase-points { display: flex; flex-direction: column; gap: 15px; margin: 26px 0 28px; }
.showcase-point { display: flex; align-items: flex-start; gap: 12px; }
.showcase-point > span { width: 34px; height: 34px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid rgba(34,197,94,.25); border-radius: 10px; color: var(--acc2); background: rgba(34,197,94,.08); }
.showcase-point svg { width: 17px; height: 17px; }
.showcase-point div { display: flex; flex-direction: column; gap: 3px; padding-top: 1px; }
.showcase-point b { font-family: var(--ffd); font-size: 12.5px; }
.showcase-point small { color: var(--text3); font-size: 11px; line-height: 1.45; }
.showcase-cta { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 100px; color: #052e16; background: linear-gradient(135deg,#4ade80,#22c55e); box-shadow: 0 12px 28px rgba(34,197,94,.16); font-family: var(--ffd); font-size: 12px; font-weight: 700; transition: transform .2s, box-shadow .2s; }
.showcase-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(34,197,94,.22); }
.hero-preview-wrap { width: 100%; min-width: 0; margin: 0; padding: 0; position: relative; perspective: 1400px; }
.preview-ambient { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .26; pointer-events: none; }
.preview-ambient-a { width: 220px; height: 180px; left: -30px; bottom: -28px; background: #22c55e; }
.preview-ambient-b { width: 230px; height: 180px; right: -24px; top: -34px; background: #2563eb; }
.preview-window { position: relative; background: rgba(9,17,30,.96); border: 1px solid rgba(71,96,125,.78); border-radius: 18px; box-shadow: 0 50px 100px -20px rgba(0,0,0,.62), 0 0 0 1px rgba(34,197,94,.05), inset 0 1px 0 rgba(255,255,255,.04); overflow: hidden; transform: rotateX(1.5deg); transform-origin: center bottom; }
.preview-window::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.045) 46%, transparent 62%); transform: translateX(-130%); animation: previewSheen 8s ease-in-out infinite 1.5s; }
.preview-topbar { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 15px; background: rgba(15,23,42,.86); border-bottom: 1px solid var(--border); color: var(--text3); }
.preview-topbar > span { width: 7px; height: 7px; border-radius: 50%; background: #334155; }
.preview-topbar > span:first-child { background: #fb7185; }
.preview-topbar > span:nth-child(2) { background: #fbbf24; }
.preview-topbar > span:nth-child(3) { background: #4ade80; }
.preview-topbar-title { margin-left: 8px; font-size: 9.5px; letter-spacing: .04em; }
.preview-sync { margin-left: auto; display: flex; align-items: center; gap: 5px; color: var(--acc2); font-size: 9.5px; }
.preview-sync i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: statusPulse 1.8s ease-in-out infinite; }
.preview-body { min-height: 350px; display: flex; }
.preview-sidebar { width: 194px; flex-shrink: 0; background: linear-gradient(180deg, rgba(15,23,42,.96), rgba(10,19,34,.96)); border-right: 1px solid var(--border); padding: 22px 13px 16px; display: flex; flex-direction: column; }
.preview-brand { display: flex; align-items: center; gap: 8px; font-family: var(--ffd); font-weight: 700; font-size: 13px; margin-bottom: 22px; padding: 0 6px; }
.preview-brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #052e16; background: linear-gradient(135deg,#86efac,#22c55e); box-shadow: 0 7px 18px rgba(34,197,94,.22); }
.preview-brand-mark img { width: 24px; height: 24px; object-fit: cover; border-radius: 7px; }
.preview-brand-logo { display: block; width: 78px; height: 60px; object-fit: contain; filter: drop-shadow(0 4px 9px rgba(14,165,233,.2)); }
.preview-brand-mark-img { display: block; width: 38px; height: 38px; flex-shrink: 0; object-fit: contain; filter: drop-shadow(0 3px 7px rgba(14,165,233,.28)); }
.preview-brand-copy { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.preview-brand-copy strong { color: #f8fafc; font-size: 13px; font-weight: 800; letter-spacing: -.3px; white-space: nowrap; }
.preview-brand-copy strong span { color: #38bdf8; }
.preview-brand-copy small { margin-top: 4px; color: #7dd3fc; font-size: 5px; font-weight: 700; letter-spacing: .12em; white-space: nowrap; }
.preview-nav-item { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text2); padding: 9px 10px; border-radius: 8px; margin-bottom: 5px; border: 1px solid transparent; }
.preview-nav-item.active { position: relative; background: linear-gradient(90deg,rgba(34,197,94,.18),rgba(34,197,94,.06)); border-color: rgba(34,197,94,.18); color: var(--acc2); }
.preview-nav-item.active::before { content: ''; position: absolute; left: -1px; width: 2px; height: 18px; border-radius: 2px; background: var(--acc2); box-shadow: 0 0 10px var(--acc2); }
.preview-sidebar-orb { margin-top: auto; display: flex; align-items: center; gap: 7px; color: var(--text3); font-size: 9.5px; padding: 9px 10px; background: rgba(34,197,94,.05); border: 1px solid rgba(34,197,94,.12); border-radius: 9px; }
.preview-sidebar-orb i { width: 8px; height: 8px; border: 2px solid var(--acc); border-top-color: transparent; border-radius: 50%; animation: previewSpin 2.2s linear infinite; }
.preview-main { flex: 1; min-width: 0; padding: 20px 22px 16px; display: flex; flex-direction: column; gap: 10px; background: radial-gradient(circle at 90% 0,rgba(37,99,235,.08),transparent 42%); }
.preview-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.preview-heading h3 { font-family: var(--ffd); font-size: 16px; margin-top: 2px; }
.preview-eyebrow { color: var(--text3); font-size: 8px; font-weight: 700; letter-spacing: .14em; }
.preview-heading button { border: 1px solid rgba(34,197,94,.35); background: linear-gradient(135deg,#22c55e,#16a34a); color: #052e16; border-radius: 8px; padding: 7px 11px; font-size: 9.5px; font-weight: 700; box-shadow: 0 8px 20px rgba(34,197,94,.14); }
.preview-heading button b { font-size: 13px; margin-right: 3px; }
.preview-bot-card { position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px; background: linear-gradient(110deg,rgba(30,41,59,.92),rgba(25,38,57,.82)); border: 1px solid #30445e; border-radius: 12px; padding: 13px 15px; overflow: hidden; opacity: 0; transform: translateX(18px); animation: previewCardIn .65s cubic-bezier(.2,.8,.2,1) forwards, previewCardBreathe 5s ease-in-out infinite 1.2s; }
.preview-bot-card::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,rgba(34,197,94,.075),transparent 34%); opacity: .7; }
.preview-card-1 { animation-delay: .1s, 1.2s; }
.preview-card-2 { animation-delay: .28s, 1.7s; }
.preview-card-3 { animation-delay: .46s, 2.2s; }
.preview-ava { position: relative; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; color: white; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px rgba(0,0,0,.24); }
.ava-movie { background: linear-gradient(135deg,#22c55e,#15803d); }
.ava-shop { background: linear-gradient(135deg,#38bdf8,#2563eb); }
.ava-calendar { background: linear-gradient(135deg,#a78bfa,#6366f1); }
.preview-ava-glow { position: absolute; inset: -4px; border-radius: 14px; border: 1px solid currentColor; opacity: .18; animation: avaGlow 2.6s ease-out infinite; }
.preview-binfo { flex: 1; min-width: 0; }
.preview-bname { font-size: 12.5px; font-weight: 700; }
.preview-buser { font-size: 10px; color: var(--text3); margin-top: 2px; }
.preview-mini-chart { width: 72px; height: 27px; display: flex; align-items: flex-end; gap: 3px; margin-right: 8px; }
.preview-mini-chart i { flex: 1; height: 30%; border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg,var(--acc2),rgba(34,197,94,.18)); transform-origin: bottom; animation: chartDance 3s ease-in-out infinite; }
.preview-mini-chart i:nth-child(2) { height: 58%; animation-delay: -.6s; }
.preview-mini-chart i:nth-child(3) { height: 42%; animation-delay: -1.1s; }
.preview-mini-chart i:nth-child(4) { height: 82%; animation-delay: -1.7s; }
.preview-mini-chart i:nth-child(5) { height: 67%; animation-delay: -2.2s; }
.preview-status { display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(34,197,94,.22); background: rgba(34,197,94,.08); border-radius: 999px; padding: 4px 8px; font-size: 9.5px; color: var(--green); font-weight: 600; }
.preview-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 7px currentColor; animation: statusPulse 1.8s ease-in-out infinite; }
.preview-activity { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; padding: 9px 11px; border-radius: 9px; color: var(--text3); background: rgba(15,23,42,.58); border: 1px solid rgba(44,62,86,.72); font-size: 9.5px; }
.preview-activity span { display: flex; align-items: center; gap: 5px; }
.preview-activity b { color: var(--acc2); }
.activity-wave { position: relative; width: 17px; height: 11px; border-left: 2px solid var(--acc); border-right: 2px solid var(--acc); }
.activity-wave::before { content: ''; position: absolute; left: 3px; right: 3px; top: 3px; height: 3px; border-radius: 3px; background: var(--acc); animation: activityWave 1.3s ease-in-out infinite; }
.activity-dots { display: flex; gap: 3px; }
.activity-dots i { width: 3px; height: 3px; border-radius: 50%; background: var(--acc2); animation: statusPulse 1.2s ease-in-out infinite; }
.activity-dots i:nth-child(2) { animation-delay: .2s; }
.activity-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes previewSheen { 0%,38% { transform: translateX(-130%); } 66%,100% { transform: translateX(130%); } }
@keyframes previewCardIn { to { opacity: 1; transform: translateX(0); } }
@keyframes previewCardBreathe { 0%,100% { border-color: #30445e; } 50% { border-color: rgba(74,222,128,.34); } }
@keyframes previewSpin { to { transform: rotate(360deg); } }
@keyframes avaGlow { 0% { transform: scale(.78); opacity: .35; } 100% { transform: scale(1.22); opacity: 0; } }
@keyframes chartDance { 0%,100% { transform: scaleY(.58); opacity: .65; } 50% { transform: scaleY(1); opacity: 1; } }
@keyframes activityWave { 0%,100% { transform: scaleX(.5); opacity: .45; } 50% { transform: scaleX(1); opacity: 1; } }
@media (max-width: 700px) {
  .preview-sidebar { display: none; }
  .preview-body { min-height: 320px; }
  .preview-main { padding: 17px 14px 13px; }
  .preview-mini-chart { width: 54px; }
}
@media (max-width: 1080px) {
  .dashboard-showcase { grid-template-columns: minmax(270px,.65fr) minmax(560px,1.35fr); gap: 32px; padding: 0 24px; }
}
@media (max-width: 900px) {
  .dashboard-showcase { grid-template-columns: 1fr; gap: 42px; margin: 54px auto 64px; }
  .dashboard-showcase-copy { max-width: 680px; text-align: center; margin: 0 auto; }
  .dashboard-showcase-copy > p { max-width: 590px; margin: 0 auto; }
  .showcase-points { max-width: 520px; margin-left: auto; margin-right: auto; text-align: left; }
  .hero-preview-wrap { max-width: 760px; margin: 0 auto; }
}

/* FEATURES */
.features-section { padding: 40px 24px 80px; max-width: 1000px; margin: 0 auto; }
.features-section-full { max-width: 1600px; padding: 60px 40px 100px; }
.section-title { font-family: var(--ffd); font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 40px; }
.features-section-full .section-title { margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--text2); font-size: 14.5px; margin: 0 0 44px; }
.feat-group-title { font-family: var(--ffd); font-size: 18px; font-weight: 700; margin: 0 0 18px; padding-left: 2px; }
.feat-group-title:not(:first-of-type) { margin-top: 44px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.feat-grid-full { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.feat-card { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 26px 20px; text-align: center; transition: all 0.2s; position: relative; }
.feat-card:hover { border-color: var(--acc); transform: translateY(-3px); }
.feat-card .ico { width: 40px; height: 40px; color: var(--acc); display: block; margin: 0 auto; }
.feat-card h3 { font-family: var(--ffd); font-size: 15px; font-weight: 700; margin: 14px 0 6px; }
.feat-card p { font-size: 12px; color: var(--text2); line-height: 1.6; }
.feat-card-premium { border-color: rgba(250,204,21,0.35); }
.feat-card-premium:hover { border-color: #facc15; }
.feat-card-premium .ico { color: #facc15; }
.feat-premium-badge { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 700; color: #facc15; background: rgba(250,204,21,0.12); border: 1px solid rgba(250,204,21,0.35); border-radius: 20px; padding: 3px 9px; }

/* DASHBOARD */
.dash-page { display: flex; height: 100vh; overflow: hidden; }
.mobile-topbar { display: none; }
.sidebar-backdrop { display: none; }
.sidebar { width: 230px; flex-shrink: 0; background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.sb-brand { min-height: 86px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-family: var(--ffd); font-weight: 700; font-size: 16px; }
.sb-brand .brand-mark { width: 42px; height: 42px; box-shadow: 0 0 11px rgba(14,165,233,.2); }
.sidebar-logo-full { display: block; width: 116px; height: 90px; object-fit: contain; filter: drop-shadow(0 5px 12px rgba(14,165,233,.2)); }
.sb-brand .brand-lockup-mark { width: 44px; height: 44px; }
.sb-brand .brand-lockup-copy strong { font-size: 15px; }
.sb-brand .brand-lockup-copy small { font-size: 6px; }
.sb-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 4px; }
.sb-item { display: block; padding: 10px 14px; border-radius: 8px; color: var(--text2); font-size: 13px; cursor: pointer; transition: all 0.15s; }
.sb-item:hover { background: var(--surf); color: var(--text); }
.sb-item.active { background: var(--glow); color: var(--acc2); border: 1px solid rgba(34,197,94,0.3); }
.topbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: -32px -32px 24px; padding: 14px 32px; border-bottom: 1px solid var(--border); }
.topbar .mobile-menu-btn { display: none; }
.topbar-brand { display: none; align-items: center; gap: 7px; font-family: var(--ffd); font-weight: 700; font-size: 15px; margin-right: auto; }
.topbar-brand .brand-mark { width: 29px; height: 29px; }
.topbar-logo-full { display: block; width: 66px; height: 51px; object-fit: contain; }
.topbar-lockup-mark { display: block; width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 3px 7px rgba(14,165,233,.25)); }
.topbar-brand strong { color: #f8fafc; font-family: var(--ffd); font-size: 14px; font-weight: 800; letter-spacing: -.3px; white-space: nowrap; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.u-photo { width: 32px; height: 32px; border-radius: 50%; background: var(--surf2); }
.u-name { font-size: 13px; font-weight: 600; }
.u-logout { display: flex; align-items: center; gap: 6px; background: var(--surf); border: 1px solid var(--border); color: var(--text3); font-size: 12px; padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.u-logout svg { width: 15px; height: 15px; }
.u-logout:hover { color: var(--red); border-color: var(--red); }

.dash-main { flex: 1; overflow-y: auto; padding: 32px; }
.sec-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.sec-header h1 { font-family: var(--ffd); font-size: 24px; font-weight: 700; }

/* BUTTONS */
.btn-primary { padding: 10px 20px; background: var(--acc); color: white; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: var(--ff); }
.btn-primary:hover { background: var(--acc-hover); }
.btn-primary.btn-full { width: 100%; padding: 14px; font-size: 15px; border-radius: 10px; margin-top: 12px; }
.btn-sm { padding: 5px 12px; background: var(--surf2); border: 1px solid var(--border); color: var(--text2); border-radius: 6px; font-size: 11px; cursor: pointer; }

/* BOTS GRID */
.bots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.bot-card { position: relative; background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; transition: all 0.2s; }
.bot-card:hover { border-color: var(--border2); }
.bot-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-right: 22px; }
.bot-ava { width: 44px; height: 44px; flex-shrink: 0; background: linear-gradient(135deg, var(--acc), var(--acc-hover)); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: white; }
.bot-ava .ico { width: 1.3em; height: 1.3em; }
.bot-cname { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-cuser { font-size: 12px; color: var(--acc2); }
.bot-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 3px 10px; border-radius: 100px; flex-shrink: 0; background: var(--bg3); color: var(--text3); }
.bot-status.on { background: rgba(34,197,94,0.15); color: var(--green); }
.bot-status.on::before { content: '●'; }
.bot-del { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--text3); cursor: pointer; font-size: 16px; z-index: 1; }
.bot-del:hover { color: var(--red); }

.bot-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 12px 8px; margin-bottom: 14px; }
.bot-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.bot-stat .ico { color: var(--acc2); width: 1.05em; height: 1.05em; }
.bot-stat b { font-size: 13px; font-weight: 700; }
.bot-stat .bot-stat-time { font-size: 11px; font-weight: 600; }
.bot-stat span { font-size: 10px; color: var(--text3); }
.bots-empty { text-align: center; padding: 60px 20px; color: var(--text3); }
.bots-empty .big { font-size: 48px; margin-bottom: 16px; }

/* SHABLONLAR */
.template-group { margin-bottom: 32px; }
.template-group-title { font-family: var(--ffd); font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.templates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.template-tabs.modal-tabs { padding: 0; margin-bottom: 20px; }
.template-tabs .mtab { font-size: 14px; padding: 10px 18px; }
.template-card { position: relative; background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; text-align: center; transition: all 0.2s; }
.template-card:hover { border-color: var(--acc); transform: translateY(-3px); }
.template-card.premium { border-color: rgba(251,191,36,0.35); }
.template-premium-badge { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; background: rgba(251,191,36,0.15); border: 1px solid rgba(251,191,36,0.4); color: #fbbf24; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 100px; }
.template-premium-badge .ico { width: 0.9em; height: 0.9em; }
.template-ico { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 14px; background: var(--glow); color: var(--acc); display: flex; align-items: center; justify-content: center; }
.template-ico .ico { width: 1.5em; height: 1.5em; }
.template-card h3 { font-family: var(--ffd); font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.template-card p { font-size: 12px; color: var(--text2); line-height: 1.6; margin-bottom: 16px; min-height: 36px; }

/* CTA BANNER — botlar ro'yxati tagidagi "yangi bot yaratish" taklifi */
.cta-banner { position: relative; overflow: hidden; margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--glow); border: 1.5px dashed rgba(34,197,94,0.4); border-radius: var(--r); padding: 22px 26px; cursor: pointer; transition: all 0.2s; }
.cta-banner:hover { border-color: var(--acc); background: rgba(34,197,94,0.12); }
.cta-banner-left { display: flex; align-items: center; gap: 16px; z-index: 1; }
.cta-banner-icon { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; border: 1.5px dashed var(--acc); display: flex; align-items: center; justify-content: center; color: var(--acc2); }
.cta-banner h3 { font-family: var(--ffd); font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.cta-banner p { font-size: 12.5px; color: var(--text2); }
.cta-banner-btn { z-index: 1; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; }
.cta-banner-plane { position: absolute; right: 24px; bottom: -10px; width: 90px; height: 90px; color: var(--acc); opacity: 0.12; transform: rotate(-15deg); pointer-events: none; }
.cta-banner-plane svg { width: 100%; height: 100%; }
@media (max-width: 640px) {
  .cta-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .cta-banner-left { flex-direction: column; }
  .cta-banner-btn { width: 100%; justify-content: center; }
}
.bot-card-bottom { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 4px; }
.bot-card-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.bot-card-actions .btn-sm { width: 100%; padding: 7px 8px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* CODE VIEW MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(6,6,10,0.7); backdrop-filter: blur(4px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-box { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); width: 100%; max-width: 760px; max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-family: var(--ffd); font-size: 18px; font-weight: 700; }
.cm-username { font-size: 12px; color: var(--acc2); }
.modal-close { background: var(--surf2); border: 1px solid var(--border); color: var(--text2); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.modal-close:hover { color: var(--text); border-color: var(--border2); }

.modal-tabs { display: flex; gap: 4px; padding: 12px 24px 0; border-bottom: 1px solid var(--border); }
.mtab { background: none; border: none; color: var(--text3); padding: 10px 14px; font-size: 13px; font-family: var(--ff); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s; }
.mtab:hover { color: var(--text2); }
.mtab.active { color: var(--acc2); border-bottom-color: var(--acc); }

.modal-body { padding: 18px 24px 24px; overflow-y: auto; }
.mtab-panel { display: none; }
.mtab-panel.active { display: block; }

.code-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.code-meta { font-size: 11px; color: var(--text3); }
.code-block { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 16px; max-height: 50vh; overflow: auto; }
.code-block code { font-family: 'Courier New', monospace; font-size: 12.5px; line-height: 1.7; color: var(--text); white-space: pre; }

.info-grid { display: flex; flex-direction: column; gap: 10px; }
.info-row { display: flex; align-items: center; justify-content: space-between; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; font-size: 13px; }
.info-row span { color: var(--text2); }
.info-row b { color: var(--text); font-weight: 600; text-align: right; max-width: 60%; }

.config-editor { width: 100%; min-height: 320px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 16px; color: var(--text); font-family: 'Courier New', monospace; font-size: 12.5px; line-height: 1.7; resize: vertical; }
.config-editor:focus { outline: none; border-color: var(--acc); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* JARAYON BOSQICHLARI (stepper) — bot yaratish sahifasi tepasida */
.stepper { display: flex; align-items: flex-start; max-width: 900px; margin: 0 auto 24px; }
.step-item { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; width: 90px; text-align: center; }
.step-circle { width: 32px; height: 32px; border-radius: 50%; background: var(--bg3); border: 2px solid var(--border2); color: var(--text3); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.step-item.active .step-circle { background: var(--acc); border-color: var(--acc); color: #06170C; }
.step-item.done .step-circle { background: transparent; border-color: var(--acc); color: var(--acc); }
.step-item.done .step-circle::before { content: '✓'; }
.step-label b { display: block; font-size: 11.5px; font-weight: 700; color: var(--text2); }
.step-item.active .step-label b, .step-item.done .step-label b { color: var(--text); }
.step-label span { font-size: 10px; color: var(--text3); }
.step-line { flex: 1; height: 2px; background: var(--border2); margin-top: 15px; }

/* CREATE LAYOUT */
.create-layout { display: grid; grid-template-columns: 1fr 400px; gap: 20px; height: calc(100vh - 180px); }
.chat-box { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); display: flex; flex-direction: column; overflow: hidden; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.msg { display: flex; gap: 10px; }
.msg.user { justify-content: flex-end; }
.msg-avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.msg-avatar.ai-ava { background: linear-gradient(135deg, var(--acc), var(--acc-hover)); color: white; }
.msg-avatar .ico { width: 1em; height: 1em; }
.msg-col { display: flex; flex-direction: column; gap: 4px; max-width: 80%; }
.msg.user .msg-col { align-items: flex-end; }
.msg-bubble { padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.65; }
.msg.ai .msg-bubble { background: var(--bg3); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.msg.user .msg-bubble { background: var(--glow); border: 1px solid rgba(34,197,94,0.3); color: var(--text); border-bottom-right-radius: 4px; }
.msg-time { font-size: 10px; color: var(--text3); padding: 0 4px; }
.msg-ticks { color: var(--acc2); }
.chk-line { display: flex; align-items: flex-start; gap: 7px; margin: 3px 0; }
.chk-ico { color: var(--acc); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

.quick-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 10px; }
.quick-chip { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); font-size: 11.5px; padding: 6px 12px; border-radius: 100px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.quick-chip:hover { border-color: var(--acc); color: var(--acc2); }

.chat-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
#chatInput, #editChatInput { flex: 1; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; color: var(--text); font-family: var(--ff); font-size: 13px; resize: none; }
#chatInput:focus, #editChatInput:focus { outline: none; border-color: var(--acc); }
#chatInput::placeholder, #editChatInput::placeholder { color: var(--text3); }
.btn-send { width: 40px; height: 40px; background: var(--acc); border: none; border-radius: 8px; color: white; cursor: pointer; font-size: 16px; transition: all 0.2s; flex-shrink: 0; }
.btn-send:hover { background: var(--acc-hover); }
.btn-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* TOKEN BOX */
/* Ichki skroll YO'Q — BotFather ko'rsatmalari to'liq ko'rinsin, kerak bo'lsa
   sahifaning o'zi skroll bo'ladi (ikkita skroll paneli chalkashtirib yuborardi) */
.token-box { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; align-self: start; overflow: visible; }
.token-box h3 { font-family: var(--ffd); font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* Bot oldindan ko'rish kartasi */
.preview-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; }
.preview-card-top { display: flex; align-items: center; gap: 12px; }
.preview-card-ava { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: linear-gradient(135deg, var(--acc), var(--acc-hover)); display: flex; align-items: center; justify-content: center; color: white; }
.preview-card-name { font-size: 13.5px; font-weight: 700; }
.preview-card-hint { font-size: 11px; color: var(--text3); }
.preview-commands { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.cmd-pill { background: var(--glow); border: 1px solid rgba(34,197,94,0.3); color: var(--acc2); font-size: 11px; font-family: monospace; padding: 4px 10px; border-radius: 100px; }
.token-secure-note { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text3); margin: 10px 0 16px; }
.token-secure-note .ico { color: var(--acc2); }
.token-guide { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 20px; }
.token-guide p { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.token-guide ol { padding-left: 18px; line-height: 2.2; font-size: 12px; color: var(--text2); }
.token-guide code { background: var(--surf2); padding: 1px 6px; border-radius: 4px; color: var(--acc2); }
.token-input { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; color: var(--text); font-family: monospace; font-size: 13px; }
.token-input:focus { outline: none; border-color: var(--acc); }
.token-input::placeholder { color: var(--text3); }
.result-box { margin-top: 14px; padding: 12px 16px; border-radius: 8px; font-size: 13px; }
.result-box.ok { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: var(--green); }
.result-box.err { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--red); }

/* CONFIG EDITOR (no-code) */
.cfg-field { margin-bottom: 18px; }
.cfg-field label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 6px; font-weight: 600; text-transform: capitalize; }
.cfg-input { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; color: var(--text); font-family: var(--ff); font-size: 13px; }
.cfg-input:focus { outline: none; border-color: var(--acc); }
.cfg-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); }
.cfg-table { width: 100%; border-collapse: collapse; }
.cfg-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); padding: 10px 12px; background: var(--bg3); border-bottom: 1px solid var(--border); }
.cfg-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.cfg-table tr:last-child td { border-bottom: none; }
.cfg-table input { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; color: var(--text); font-size: 13px; font-family: var(--ff); }
.cfg-table input:focus { outline: none; border-color: var(--acc); }
.cfg-row-del { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 14px; }
.cfg-row-del:hover { color: var(--red); }
.cfg-add-row { margin-top: 10px; }

/* XABARLAR TARIXI (msg-log) */
.msg-log { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.msg-log-row { border-radius: 8px; padding: 10px 14px; font-size: 12.5px; background: var(--bg3); border: 1px solid var(--border); }
.msg-log-row.user { border-left: 3px solid var(--acc); }
.msg-log-row.assistant { border-left: 3px solid var(--border2); opacity: 0.85; }
.msg-log-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.msg-log-top b { font-size: 12px; color: var(--acc2); }
.msg-log-top span { font-size: 10.5px; color: var(--text3); }
.msg-log-text { color: var(--text); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

/* ADMIN CREDENTIALS BOX */
.admin-cred-box { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 20px; }
.admin-cred-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; gap: 12px; }
.admin-cred-row:last-child { border-bottom: none; }
.admin-cred-row code { background: var(--surf2); padding: 4px 10px; border-radius: 6px; color: var(--acc2); }

/* TUGMALAR KONSTRUKTORI */
.btn-ai-box { background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(96,165,250,0.06)); border: 1px solid rgba(34,197,94,0.25); border-radius: var(--r); padding: 16px 18px; }
.btn-ai-box textarea { resize: vertical; }
.btn-menu-card { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; margin-bottom: 14px; }
.btn-menu-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.btn-menu-head input { flex: 1; }
.btn-menu-head .trigger-input { max-width: 180px; font-family: var(--ff); color: var(--acc2); }
.btn-menu-del { background: none; border: none; color: var(--text3); cursor: pointer; padding: 6px; flex-shrink: 0; }
.btn-menu-del:hover { color: var(--red); }
.btn-menu-response { width: 100%; margin-bottom: 12px; resize: vertical; }
.btn-row-list { display: flex; flex-direction: column; gap: 8px; }
.btn-row-item { display: flex; gap: 6px; align-items: center; background: var(--surf2); border-radius: 8px; padding: 8px; }
.btn-row-item input.btn-text { flex: 2; }
.btn-row-item input.btn-target { flex: 2; font-family: var(--ff); font-size: 12px; }
.btn-row-item input.btn-rownum { width: 44px; text-align: center; flex-shrink: 0; }
.btn-row-del { background: none; border: none; color: var(--text3); cursor: pointer; flex-shrink: 0; padding: 4px; }
.btn-row-del:hover { color: var(--red); }
.btn-add-row-link { margin-top: 8px; }

/* QO'LLANMA MODAL */
.guide-box { max-width: 640px; }
.guide-body { display: flex; flex-direction: column; gap: 20px; }
.guide-step { display: flex; gap: 14px; align-items: flex-start; }
.guide-num { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--glow); color: var(--acc2); border: 1px solid rgba(34,197,94,0.4); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; font-family: var(--ffd); }
.guide-step h3 { font-family: var(--ffd); font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.guide-step p { font-size: 13px; color: var(--text2); line-height: 1.7; }
.guide-step code { background: var(--surf2); padding: 1px 6px; border-radius: 4px; color: var(--acc2); }

/* TYPING */
.typing { display: flex; gap: 4px; padding: 8px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); animation: tb 1.2s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes tb { 0%,80%,100% { transform: scale(0.7); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }

@media (max-width: 900px) {
  .create-layout { grid-template-columns: 1fr; height: auto; }
  .dash-page { display: block; height: auto; min-height: 100vh; overflow: visible; }
  .topbar { position: sticky; top: 0; z-index: 40; background: var(--bg2); margin: -20px -20px 20px; padding: 14px 16px; }
  .topbar-brand { display: flex; }
  .topbar .mobile-menu-btn { width: 34px; height: 34px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surf); border: 1px solid var(--border); border-radius: 8px; color: var(--text); cursor: pointer; }
  .mobile-menu-btn svg { width: 20px; height: 20px; }
  .u-logout span { display: none; }
  .sidebar { display: flex; position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: 8px 0 24px rgba(0,0,0,0.4); }
  .sidebar-backdrop.mobile-open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 50; }
  .dash-main { height: auto; overflow: visible; padding: 20px; }
  .stepper { overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; }
  .step-item { width: 76px; }
  .step-line { min-width: 24px; }
  .nav-links { display: none; }
  .hero { padding: 110px 20px 30px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .hero-left { text-align: center; margin: 0 auto; max-width: 100%; }
  .hero-cta-row, .hero-checks { justify-content: center; }
  .hero-right { order: -1; margin-bottom: 4px; }
  .orb-wrap { width: 260px; height: 260px; }
  .float-card { display: none; }
  .steps-bar { flex-direction: column; align-items: stretch; margin-top: 34px; }
  .step-arrow { display: none; }
  .features-section { padding: 30px 20px 60px; }
  .footer-stats { justify-content: center; }
}

@media (max-width: 560px) {
  .navbar { padding: 12px 16px; }
  .nav-name { font-size: 15px; }
  .brand-logo-full { width: 88px; height: 54px; }
  .nav-brand { gap: 7px; }
  .nav-brand .brand-lockup-mark { width: 42px; height: 42px; }
  .nav-brand .brand-lockup-copy strong { font-size: 15px; }
  .nav-brand .brand-lockup-copy small { margin-top: 4px; font-size: 5.8px; }
  .nav-cta { padding: 8px 14px; font-size: 12.5px; }
  .hero { padding: 100px 16px 24px; }
  .hero-badge { font-size: 11.5px; padding: 6px 14px; }
  .hero-desc { font-size: 15px; }
  .hero-cta-row { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-cta-row #tg-login-btn { display: flex; justify-content: center; }
  .btn-hero-ghost { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; }
  .hero-checks { flex-direction: column; align-items: center; gap: 10px; }
  .orb-wrap { width: 210px; height: 210px; }
  .steps-bar { padding: 16px 18px; }
  .footer-stats { flex-direction: column; align-items: stretch; padding: 20px; }
  .fstat { justify-content: flex-start; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat-grid-full { grid-template-columns: 1fr; }
  .features-section-full { padding: 40px 16px 60px; }
  .dashboard-showcase { gap: 32px; margin: 42px auto 54px; padding: 0 16px; }
  .dashboard-showcase-copy h2 { font-size: 31px; }
  .dashboard-showcase-copy > p { font-size: 13px; }
  .showcase-point small { font-size: 10.5px; }
  .hero-preview-wrap { padding: 0; }
  .preview-topbar-title { display: none; }
  .preview-heading h3 { font-size: 14px; }
  .preview-heading button { padding: 6px 8px; }
  .preview-mini-chart { display: none; }
  .preview-bot-card { padding: 11px; gap: 9px; }
  .preview-status { padding: 4px 6px; }
  .preview-activity { line-height: 1.45; }
}

@media (prefers-reduced-motion: reduce) {
  .bot-illustration *, .orb-wrap::before, .float-card, .preview-window::after,
  .preview-sync i, .preview-sidebar-orb i, .preview-bot-card, .preview-ava-glow,
  .preview-mini-chart i, .preview-status i, .activity-wave::before, .activity-dots i,
  .showcase-eyebrow i, .company-badge span, .company-live i, .altron-mark i {
    animation: none !important;
  }
  .preview-bot-card { opacity: 1; transform: none; }
}

/* KOMPANIYA HAQIDA — alohida Altron.uz sahifasi */
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { content: ''; display: block; width: 100%; height: 2px; margin-top: 5px; border-radius: 2px; background: var(--acc); box-shadow: 0 0 8px rgba(34,197,94,.55); }
.company-page { min-height: 100%; overflow-x: hidden; }
.company-main { position: relative; width: 100%; max-width: 1800px; min-height: calc(100vh - 78px); margin: 0 auto; padding: 142px clamp(28px,4vw,76px) 64px; }
.company-glow { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; opacity: .2; }
.company-glow-a { width: 420px; height: 360px; top: 85px; left: -180px; background: #22c55e; }
.company-glow-b { width: 380px; height: 340px; top: 180px; right: -170px; background: #2563eb; }
.company-intro { position: relative; z-index: 1; display: grid; grid-template-columns: .82fr 1.18fr; align-items: center; gap: clamp(50px,5vw,100px); }
.company-copy { max-width: 630px; }
.company-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 7px 15px; border: 1px solid rgba(34,197,94,.32); border-radius: 100px; color: var(--acc2); background: rgba(34,197,94,.09); font-size: 12px; font-weight: 600; }
.company-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--acc2); box-shadow: 0 0 10px var(--acc2); animation: statusPulse 1.8s ease-in-out infinite; }
.company-copy h1 { font-size: clamp(42px,6vw,70px); margin-bottom: 20px; }
.company-copy > p { max-width: 580px; color: var(--text2); font-size: 17px; line-height: 1.8; }
.company-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.company-primary, .company-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border-radius: 100px; font-family: var(--ffd); font-size: 12.5px; font-weight: 700; transition: transform .2s, border-color .2s, background .2s; }
.company-primary { color: #052e16; background: linear-gradient(135deg,#4ade80,#22c55e); box-shadow: 0 12px 30px rgba(34,197,94,.16); }
.company-secondary { color: var(--text2); border: 1px solid var(--border); background: var(--surf); }
.company-primary:hover, .company-secondary:hover { transform: translateY(-2px); }
.company-secondary:hover { color: var(--text); border-color: var(--border2); }
.company-window { position: relative; overflow: hidden; border: 1px solid rgba(72,98,127,.82); border-radius: 20px; background: linear-gradient(145deg,rgba(19,32,51,.98),rgba(8,16,29,.98)); box-shadow: 0 40px 80px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.05); }
.company-window::before { content: ''; position: absolute; width: 270px; height: 270px; right: -110px; bottom: -130px; border-radius: 50%; border: 1px solid rgba(56,189,248,.26); box-shadow: 0 0 70px rgba(37,99,235,.15), inset 0 0 60px rgba(34,197,94,.08); }
.company-window-top { height: 43px; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--text3); background: rgba(15,23,42,.76); font-size: 10px; }
.company-window-dots { display: flex; gap: 6px; margin-right: 12px; }
.company-window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #fb7185; }
.company-window-dots i:nth-child(2) { background: #fbbf24; }
.company-window-dots i:nth-child(3) { background: #4ade80; }
.company-live { display: flex; align-items: center; gap: 6px; margin-left: auto; color: var(--acc2); font-weight: 600; letter-spacing: .06em; }
.company-live i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: statusPulse 1.8s ease-in-out infinite; }
.company-window-body { position: relative; z-index: 1; min-height: 470px; display: flex; flex-direction: column; justify-content: center; padding: 44px clamp(38px,4vw,68px) 48px; }
.altron-mark { position: relative; width: 72px; height: 72px; display: grid; place-items: center; margin-bottom: 27px; border: 1px solid rgba(74,222,128,.42); border-radius: 22px; color: #052e16; background: linear-gradient(145deg,#86efac,#22c55e); box-shadow: 0 18px 38px rgba(34,197,94,.2); }
.altron-mark span { font-family: var(--ffd); font-size: 34px; font-weight: 800; }
.altron-mark i { position: absolute; inset: -8px; border: 1px solid rgba(74,222,128,.16); border-radius: 27px; animation: avaGlow 3s ease-out infinite; }
.company-kicker { margin-bottom: 10px; color: var(--acc2) !important; font-size: 9px !important; font-weight: 700; letter-spacing: .16em; }
.company-window-body h2 { max-width: 620px; margin-bottom: 13px; font-family: var(--ffd); font-size: clamp(26px,3vw,40px); line-height: 1.22; }
.company-window-body > p { max-width: 680px; color: var(--text2); font-size: 13.5px; line-height: 1.8; }
.company-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.company-tags span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid rgba(74,98,128,.55); border-radius: 100px; color: var(--text2); background: rgba(15,23,42,.62); font-size: 9.5px; }
.company-tags i { width: 5px; height: 5px; border-radius: 50%; background: var(--acc); }
.company-values { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 68px; }
.company-value-card { min-height: 190px; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(145deg,rgba(30,41,59,.82),rgba(15,23,42,.78)); transition: transform .2s, border-color .2s; }
.company-value-card:hover { transform: translateY(-4px); border-color: rgba(74,222,128,.38); }
.company-value-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 20px; border: 1px solid rgba(34,197,94,.25); border-radius: 12px; color: var(--acc2); background: rgba(34,197,94,.08); }
.company-value-icon svg { width: 21px; height: 21px; }
.company-value-card h3 { margin-bottom: 8px; font-family: var(--ffd); font-size: 15px; }
.company-value-card p { color: var(--text2); font-size: 12px; line-height: 1.7; }
.company-product { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 18px; padding: 28px 30px; overflow: hidden; border: 1px solid rgba(34,197,94,.25); border-radius: 17px; background: linear-gradient(110deg,rgba(34,197,94,.12),rgba(30,41,59,.75) 55%,rgba(37,99,235,.09)); }
.company-product-logo { width: 82px; height: 82px; flex-shrink: 0; object-fit: contain; filter: drop-shadow(0 5px 12px rgba(14,165,233,.2)); }
.company-product-copy { flex: 1; }
.company-product-copy > span { color: var(--acc2); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.company-product-copy h2 { margin: 5px 0 7px; font-family: var(--ffd); font-size: 23px; }
.company-product-copy p { color: var(--text2); font-size: 12.5px; line-height: 1.6; }
.company-product > a { display: inline-flex; align-items: center; flex-shrink: 0; gap: 8px; padding: 12px 19px; border-radius: 100px; color: #052e16; background: var(--acc); font-family: var(--ffd); font-size: 12px; font-weight: 700; }
.company-footer { width: calc(100% - clamp(56px,8vw,152px)); max-width: 1648px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 auto; padding: 22px 0 34px; border-top: 1px solid var(--border); color: var(--text3); font-size: 11px; }
.company-footer a { color: var(--text); font-family: var(--ffd); font-weight: 700; }
.company-footer-brand { display: inline-flex; align-items: center; gap: 9px; }
.company-footer-brand img { display: block; width: 46px; height: 46px; flex-shrink: 0; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(14,165,233,.2)); }
.company-footer-brand > span { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.company-footer-brand strong { color: #f8fafc; font-family: var(--ffd); font-size: 16px; font-weight: 800; letter-spacing: -.35px; }
.company-footer-brand strong span { color: #38bdf8; }
.company-footer-brand small { margin-top: 4px; color: #7dd3fc; font-size: 6px; font-weight: 700; letter-spacing: .14em; }
@media (max-width: 900px) {
  .company-main { padding: 116px 22px 50px; }
  .company-intro { grid-template-columns: 1fr; gap: 42px; }
  .company-copy { max-width: 680px; text-align: center; margin: 0 auto; }
  .company-copy > p { margin: 0 auto; }
  .company-actions { justify-content: center; }
  .company-window { max-width: 680px; width: 100%; margin: 0 auto; }
}
@media (max-width: 650px) {
  .company-main { padding: 106px 16px 40px; }
  .company-copy h1 { font-size: 42px; }
  .company-copy > p { font-size: 15px; }
  .company-actions { flex-direction: column; align-items: stretch; }
  .company-window-body { min-height: auto; padding: 28px 22px 30px; }
  .company-values { grid-template-columns: 1fr; margin-top: 38px; }
  .company-value-card { min-height: auto; }
  .company-product { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 24px; }
  .company-product-copy { min-width: 150px; }
  .company-product > a { width: 100%; justify-content: center; }
  .company-footer { flex-direction: column; text-align: center; padding: 22px 16px 30px; }
}

/* SUPERADMIN */
.sa-wrap { max-width: 1200px; margin: 0 auto; padding: 28px 24px 60px; }
.sa-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.sa-header h1 { font-family: var(--ffd); font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.sa-title-badge { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; background: var(--glow); border: 1px solid rgba(34,197,94,0.3); color: var(--acc2); flex-shrink: 0; }
.sa-title-badge .ico { width: 20px; height: 20px; }
.sa-nav { display: flex; gap: 6px; margin-bottom: 28px; border-bottom: 1px solid var(--border); padding-bottom: 0; flex-wrap: wrap; }
.sa-nav-link { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; font-size: 13.5px; color: var(--text2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.15s; }
.sa-nav-link .ico { width: 16px; height: 16px; opacity: 0.75; transition: opacity 0.15s; }
.sa-nav-link:hover { color: var(--text); }
.sa-nav-link:hover .ico { opacity: 1; }
.sa-nav-link.active { color: var(--acc2); border-bottom-color: var(--acc); font-weight: 600; }
.sa-nav-link.active .ico { opacity: 1; }
.sa-type-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.sa-type-badge .ico { width: 14px; height: 14px; }
.sa-type-badge.pack { background: rgba(96,165,250,0.12); border: 1px solid rgba(96,165,250,0.3); color: #60a5fa; }
.sa-type-badge.sub { background: rgba(192,132,252,0.12); border: 1px solid rgba(192,132,252,0.3); color: #c084fc; }
.sa-status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.sa-status-badge.on { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); color: var(--acc2); }
.sa-status-badge.off { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: var(--red); }
.sa-status-badge.pending { background: rgba(250,204,21,0.12); border: 1px solid rgba(250,204,21,0.35); color: #facc15; }
.sa-status-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* TO'LOV HOLATI (dashboard tariflar oynasi) */
.pay-pending-box { display: flex; align-items: center; gap: 10px; background: rgba(250,204,21,0.08); border: 1px solid rgba(250,204,21,0.3); border-radius: var(--r); padding: 12px 16px; margin-bottom: 14px; font-size: 13px; }
.pay-pending-box .spinner { width: 16px; height: 16px; border: 2px solid rgba(250,204,21,0.3); border-top-color: #facc15; border-radius: 50%; animation: paySpin 0.8s linear infinite; flex-shrink: 0; }
@keyframes paySpin { to { transform: rotate(360deg); } }
.orders-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.order-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--surf2); border-radius: 8px; font-size: 12.5px; }
.order-row .order-main { color: var(--text2); }
.order-row .order-amount { font-weight: 700; }
.receipt-resend-btn { display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; border: 1px solid rgba(148,163,184,.24); border-radius: 7px; color: #cbd5e1; background: rgba(15,23,42,.4); font: inherit; font-size: 11.5px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.receipt-resend-btn:hover { border-color: rgba(74,222,128,.42); color: #86efac; background: rgba(34,197,94,.06); }
.receipt-resend-btn:disabled { opacity: .58; cursor: wait; }

@media (max-width: 720px) {
  .order-row { flex-wrap: wrap; }
  .order-row .order-main { width: 100%; }
}

/* BILLING — sokin, professional tarif va to'lov interfeysi */
.billing-content { width: min(100%, 1180px); margin: 0 auto; padding: 18px 0 56px; }
.billing-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.billing-kicker, .billing-card-label { display: block; margin-bottom: 9px; color: #7c8ba1; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.billing-heading h1 { max-width: 720px; margin: 0 0 9px; font-family: var(--ffd); font-size: clamp(24px,2.3vw,32px); font-weight: 700; line-height: 1.22; letter-spacing: -.55px; }
.billing-heading p { max-width: 620px; color: var(--text2); font-size: 13.5px; line-height: 1.65; }
.billing-assurance { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 8px 11px; border: 1px solid rgba(148,163,184,.18); border-radius: 8px; color: #94a3b8; background: rgba(15,23,42,.38); font-size: 11.5px; }
.billing-assurance-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.09); }

.plans-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; width: 100%; }
.plan-card { display: flex; flex-direction: column; min-height: 390px; padding: 24px; border: 1px solid rgba(148,163,184,.18); border-radius: 12px; background: rgba(24,36,57,.72); box-shadow: 0 14px 30px rgba(2,6,23,.08); transition: border-color .16s, background .16s; }
.plan-card:hover { border-color: rgba(148,163,184,.34); background: rgba(27,40,63,.82); }
.plan-card.featured { border-color: rgba(74,222,128,.36); box-shadow: inset 0 1px 0 rgba(74,222,128,.08), 0 14px 30px rgba(2,6,23,.1); }
.plan-card-head { min-height: 25px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.plan-type { color: #7c8ba1; font-size: 9.5px; font-weight: 700; letter-spacing: .14em; }
.plan-card-badge { padding: 5px 8px; border: 1px solid rgba(74,222,128,.25); border-radius: 6px; color: #86efac; background: rgba(34,197,94,.06); font-size: 9.5px; font-weight: 600; }
.plan-card h3 { min-height: 44px; margin: 0 0 8px; font-family: var(--ffd); font-size: 18px; font-weight: 700; line-height: 1.35; }
.plan-desc { min-height: 42px; margin: 0 0 20px; color: var(--text2); font-size: 12.5px; line-height: 1.6; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 20px; color: var(--text); font-family: var(--ffd); }
.plan-price strong { font-size: clamp(25px,2vw,31px); font-weight: 700; letter-spacing: -.8px; }
.plan-price span { color: var(--text2); font-size: 11.5px; font-weight: 500; }
.plan-discount-badge { padding: 5px 8px; border: 1px solid rgba(248,113,113,.3); border-radius: 6px; color: #f87171; background: rgba(239,68,68,.08); font-size: 9.5px; font-weight: 800; }
.plan-price-old { display: block; color: var(--text3); font-size: 12.5px; line-height: 1.3; text-decoration: line-through; margin: 0 0 3px; }
.plan-price-old + .plan-price, .plan-price-old + .plan-price-big { margin-top: 0; }
.checkout-summary .plan-price-old + .plan-price-big { margin-top: 2px; }
.plan-divider, .checkout-summary-divider { height: 1px; margin-bottom: 17px; background: rgba(148,163,184,.14); }
.plan-features { display: flex; flex: 1; flex-direction: column; gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; }
.plan-features li { display: flex; align-items: center; gap: 9px; color: #b3bfd0; font-size: 12px; }
.plan-check { display: grid; width: 17px; height: 17px; place-items: center; flex-shrink: 0; border: 1px solid rgba(148,163,184,.22); border-radius: 50%; color: #86efac; font-size: 9px; }
.plan-select-btn { width: 100%; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border: 1px solid rgba(148,163,184,.25); border-radius: 8px; color: #dbe4ef; background: rgba(148,163,184,.07); font: 600 12.5px var(--ff); cursor: pointer; transition: border-color .16s, background .16s; }
.plan-select-btn:hover { border-color: rgba(226,232,240,.42); background: rgba(148,163,184,.12); }
.plan-select-btn.primary { border-color: #22c55e; color: #052e16; background: #22c55e; }
.plan-select-btn.primary:hover { background: #20b957; }

.checkout-content { max-width: 980px; }
.checkout-layout { display: grid; grid-template-columns: 310px minmax(0,1fr); gap: 14px; align-items: start; }
.checkout-summary, .provider-section { border: 1px solid rgba(148,163,184,.18); border-radius: 12px; background: rgba(24,36,57,.72); }
.checkout-summary { display: block; max-width: none; margin: 0; padding: 24px; }
.checkout-summary h2, .provider-section h2 { margin: 0; font-family: var(--ffd); font-weight: 700; letter-spacing: -.3px; }
.checkout-summary h2 { min-height: 48px; font-size: 17px; line-height: 1.45; }
.checkout-summary .plan-price-big { display: flex; align-items: baseline; gap: 6px; margin: 18px 0 20px; color: var(--text); font-family: var(--ffd); }
.checkout-summary .plan-price-big strong { font-size: 28px; font-weight: 700; letter-spacing: -.7px; }
.checkout-summary .plan-price-big span { color: var(--text2); font-size: 11.5px; }
.checkout-details { display: flex; flex-direction: column; gap: 11px; }
.checkout-details > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checkout-details dt { color: var(--text3); font-size: 11.5px; }
.checkout-details dd { display: inline-flex; align-items: center; gap: 6px; color: #cbd5e1; font-size: 11.5px; }
.summary-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.provider-section { padding: 24px; }
.provider-section h2 { margin-bottom: 6px; font-size: 18px; }
.provider-section > p { margin-bottom: 20px; color: var(--text2); font-size: 12px; }
.provider-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; max-width: none; }
.provider-btn { min-height: 68px; display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 13px; border: 1px solid rgba(148,163,184,.18); border-radius: 9px; color: var(--text); background: rgba(15,23,42,.35); font: 600 13px var(--ff); cursor: pointer; text-align: left; transition: border-color .16s, background .16s; }
.provider-btn:hover:not(:disabled) { border-color: rgba(148,163,184,.4); background: rgba(30,41,59,.7); }
.provider-btn:disabled { cursor: not-allowed; opacity: .42; }
.provider-icon { width: 34px; height: 34px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid rgba(148,163,184,.22); border-radius: 8px; color: #dbe4ef; background: rgba(148,163,184,.06); font: 700 12px var(--ffd); }
.provider-icon.click { color: #7dd3fc; }
.provider-icon.payme { color: #5eead4; }
.provider-icon.uzum { color: #c4b5fd; }
.provider-icon.visa { color: #93c5fd; }
.provider-icon.other { color: #94a3b8; }
.provider-logo { position: relative; width: 104px; height: 38px; overflow: hidden; flex-shrink: 0; border: 1px solid rgba(226,232,240,.75); border-radius: 7px; background: #f8fafc; }
.provider-logo img { position: absolute; top: 50%; left: 0; display: block; width: 100%; height: auto; transform: translateY(-50%); }
.provider-btn-text { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.provider-btn-text small { color: var(--text3); font-size: 10.5px; font-weight: 400; }
.provider-arrow { color: #64748b; font-size: 16px; }
.provider-soon-badge { flex-shrink: 0; padding: 3px 7px; border: 1px solid rgba(148,163,184,.16); border-radius: 5px; color: var(--text3); background: transparent; font-size: 9.5px; font-weight: 500; }
.billing-back-link { display: inline-flex; margin-top: 18px; color: var(--text2); font-size: 12px; transition: color .15s; }
.billing-back-link:hover { color: var(--text); }

@media (max-width: 1100px) {
  .plans-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .billing-content { padding-top: 4px; }
  .billing-heading { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .billing-heading h1 { font-size: 24px; }
  .plans-grid, .checkout-layout, .provider-list { grid-template-columns: 1fr; }
  .plan-card { min-height: 0; }
  .checkout-summary h2 { min-height: 0; }
}

/* SHARTNOMA (oferta) */
.contract-box { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; margin-bottom: 16px; }
.contract-text { max-height: 260px; overflow-y: auto; font-size: 12.5px; line-height: 1.7; color: var(--text2); white-space: pre-wrap; background: var(--bg3); border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; }
.contract-agree { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text2); margin-bottom: 12px; cursor: pointer; }
.contract-agree input { margin-top: 2px; }
.plans-locked-note { font-size: 12px; color: var(--text3); text-align: center; padding: 20px 0; }
.sa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 32px; }
.sa-stat { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; }
.sa-stat .num { font-family: var(--ffd); font-size: 26px; font-weight: 800; }
.sa-stat .label { font-size: 12px; color: var(--text2); margin-top: 4px; }
.sa-stat.warn .num { color: var(--red); }
.sa-section { margin-bottom: 32px; }
.sa-section h2 { font-family: var(--ffd); font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.sa-section h2 .ico { width: 17px; height: 17px; color: var(--acc2); }
.btn-sm { display: inline-flex; align-items: center; gap: 6px; }
.btn-sm .ico { width: 13px; height: 13px; }
.sa-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); }
.sa-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sa-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text3); padding: 10px 14px; background: var(--bg3); border-bottom: 1px solid var(--border); }
.sa-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.sa-table tr:last-child td { border-bottom: none; }
.sa-denied { text-align: center; padding: 80px 20px; color: var(--text2); }
.sa-slots-input { width: 50px; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; color: var(--text); text-align: center; }
.sa-plan-input { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; color: var(--text); font-family: var(--ff); font-size: 13px; }
.sa-server-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.sa-server-card { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; }
.sa-server-card .sa-server-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.sa-server-card .label { font-size: 12.5px; color: var(--text2); }
.sa-server-card .pct { font-family: var(--ffd); font-size: 18px; font-weight: 800; }
.sa-progress-track { height: 8px; border-radius: 5px; background: var(--bg3); overflow: hidden; }
.sa-progress-fill { height: 100%; background: var(--acc); border-radius: 5px; transition: width 0.3s; }
.sa-progress-fill.warn { background: #facc15; }
.sa-progress-fill.danger { background: var(--red); }
.sa-server-sub { font-size: 11.5px; color: var(--text3); margin-top: 6px; }

@media (max-width: 700px) {
  .sa-wrap { padding: 20px 16px 40px; }
  .sa-nav { gap: 2px; }
  .sa-nav-link { padding: 8px 10px; font-size: 12.5px; }
}


/* AI kredit belgisi (chat sarlavhasida) */
.chat-header-actions { display: inline-flex; align-items: center; gap: 10px; }
.ai-credit-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; color: var(--acc2); background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); cursor: help; white-space: nowrap; }
.ai-credit-badge.empty { color: #fca5a5; background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.35); }


/* Loyiha muallifi bo'limi (Biz haqimizda sahifasi) */
.company-author { position: relative; z-index: 1; display: flex; align-items: center; gap: 28px; margin-top: 18px; padding: 26px 30px; border: 1px solid var(--border); border-radius: 17px; background: linear-gradient(145deg,rgba(30,41,59,.82),rgba(15,23,42,.78)); }
.company-author-photo { width: 132px; height: 132px; flex-shrink: 0; border-radius: 50%; object-fit: cover; border: 3px solid rgba(74,222,128,.55); box-shadow: 0 0 0 6px rgba(34,197,94,.1), 0 14px 34px rgba(0,0,0,.4); }
.company-author-copy > span { color: var(--acc2); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.company-author-copy h2 { margin: 6px 0 8px; font-family: var(--ffd); font-size: 26px; }
.company-author-copy p { max-width: 560px; color: var(--text2); font-size: 13px; line-height: 1.7; }
.company-author-copy p b { color: var(--text); letter-spacing: .04em; }
@media (max-width: 640px) { .company-author { flex-direction: column; text-align: center; padding: 24px 20px; } .company-author-photo { width: 112px; height: 112px; } }


/* "Biz haqimizda" sahifasining batafsil bo'limlari */
.company-section { position: relative; z-index: 1; margin-top: 64px; }
.company-section-head { margin-bottom: 22px; }
.company-section-head > span { color: var(--acc2); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.company-section-head h2 { margin: 6px 0 8px; font-family: var(--ffd); font-size: clamp(24px,3.2vw,34px); }
.company-section-head p { max-width: 640px; color: var(--text2); font-size: 14px; line-height: 1.7; }
.company-section .company-values { margin-top: 0; }
.company-values-four { grid-template-columns: repeat(4,1fr); }
.company-values-flat .company-value-card { min-height: 0; }
.company-values-flat .company-value-card h3 { font-size: 16px; }
.company-values-flat .company-value-card p { font-size: 13px; }
.company-story { display: grid; grid-template-columns: minmax(220px,.8fr) 1.6fr; gap: 40px; align-items: start; margin-top: 72px; }
.company-story .company-section-head { margin-bottom: 0; }
.company-story-text p { margin-bottom: 14px; color: var(--text2); font-size: 15px; line-height: 1.85; }
.company-story-text b { color: var(--text); }
.company-steps { list-style: none; display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.company-steps li { padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(145deg,rgba(30,41,59,.82),rgba(15,23,42,.78)); }
.company-steps li b { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 50%; color: #052e16; background: var(--acc2); font-family: var(--ffd); font-size: 15px; }
.company-steps li h3 { margin-bottom: 6px; font-family: var(--ffd); font-size: 15px; }
.company-steps li p { color: var(--text2); font-size: 12.5px; line-height: 1.65; }
.company-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.company-chips span { padding: 9px 16px; border: 1px solid rgba(34,197,94,.28); border-radius: 100px; color: var(--text); background: rgba(34,197,94,.08); font-size: 13px; font-weight: 500; }
.company-start-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.company-start-grid > div { padding: 24px 26px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(145deg,rgba(30,41,59,.82),rgba(15,23,42,.78)); }
.company-start-grid > div:first-child { border-color: rgba(34,197,94,.35); }
.company-start-grid h3 { margin-bottom: 12px; font-family: var(--ffd); font-size: 17px; }
.company-start-grid ul { list-style: none; }
.company-start-grid li { position: relative; padding: 6px 0 6px 24px; color: var(--text2); font-size: 14px; line-height: 1.6; }
.company-start-grid li::before { content: ""; position: absolute; left: 0; top: 13px; width: 9px; height: 9px; border-radius: 50%; background: var(--acc2); box-shadow: 0 0 10px rgba(74,222,128,.6); }
.company-start-grid li b { color: var(--text); }
.company-start-grid a, .company-faq a { color: var(--acc2); text-decoration: underline; }
.company-faq { display: grid; gap: 10px; max-width: 860px; }
.company-faq details { border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(145deg,rgba(30,41,59,.82),rgba(15,23,42,.78)); }
.company-faq summary { cursor: pointer; list-style: none; padding: 16px 20px; font-size: 14.5px; font-weight: 600; }
.company-faq summary::-webkit-details-marker { display: none; }
.company-faq summary::after { content: "+"; float: right; color: var(--acc2); font-size: 20px; line-height: 1; }
.company-faq details[open] summary::after { content: "−"; }
.company-faq details[open] { border-color: rgba(74,222,128,.38); }
.company-faq details p { padding: 0 20px 18px; color: var(--text2); font-size: 13.5px; line-height: 1.75; }
@media (max-width: 960px) {
  .company-values-four, .company-steps { grid-template-columns: repeat(2,1fr); }
  .company-story { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 640px) {
  .company-values-four, .company-steps, .company-start-grid { grid-template-columns: 1fr; }
  .company-section { margin-top: 48px; }
}

/* Orqa fondagi yorug'lik bo'rtmalari sahifani gorizontal siljitib yubormasin */
.company-main { overflow-x: clip; }


/* Muallif lavozimlari */
.company-author-roles { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; }
.company-author-roles li { padding: 5px 13px; border: 1px solid rgba(34,197,94,.35); border-radius: 100px; color: var(--acc2); background: rgba(34,197,94,.1); font-size: 12px; font-weight: 600; }
@media (max-width: 640px) { .company-author-roles { justify-content: center; } }


/* TELEFON: menyu tugmasi va ochiladigan menyu (≤900px) */
.nav-burger { display: none; }
@media (max-width: 900px) {
  .nav-burger { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 42px; height: 42px; margin-left: 8px; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: rgba(30,41,59,.7); cursor: pointer; flex-shrink: 0; }
  .nav-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
  .nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .navbar .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 16px 14px; background: rgba(15,23,42,.98); border-bottom: 1px solid var(--border); box-shadow: 0 18px 30px rgba(0,0,0,.4); }
  .navbar .nav-links.open { display: flex; }
  .navbar .nav-links a { padding: 15px 4px; font-size: 16px; border-bottom: 1px solid rgba(44,62,86,.6); }
  .navbar .nav-links a:last-child { border-bottom: 0; }
  .navbar .nav-links a.active::after { display: none; }
  .navbar .nav-links a.active { color: var(--acc2); }
}

/* TELEFON: Telegram vidjeti sahifani o'ngga cho'zib yubormasin */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-left { min-width: 0; }
  #tg-login-btn, #tg-login-btn iframe { max-width: 100% !important; }
}
@media (max-width: 640px) {
  /* Telefonda "Telegram orqali kirish" tugmasi Telegram ilovasini o'zi ochadi — vidjet ortiqcha va keng */
  #tg-login-btn { display: none !important; }
}

/* Bezak (blur) dog'lari telefonda sahifani o'ngga cho'ztirmasin */
.dashboard-showcase { overflow-x: clip; }


/* ALTRON IT TEAM logotipi (jamoa kartasida) */
.altron-logo { display: block; width: min(330px, 100%); height: auto; margin-bottom: 20px; border-radius: 18px; border: 1px solid rgba(125,211,252,.25); box-shadow: 0 14px 34px rgba(0,0,0,.45), 0 0 0 4px rgba(56,189,248,.06); }


/* ALTRON logotipi shaffof fonli — karta/ramkasiz, yengil nur bilan */
.altron-logo { width: min(380px, 100%); border: 0; border-radius: 0; box-shadow: none; filter: drop-shadow(0 10px 26px rgba(56,189,248,.22)); }

/* ── Til almashtirgich (UZ / RU / EN) ── */
.lang-switch{display:inline-flex;align-items:center;gap:2px;padding:3px;border:1px solid var(--border,rgba(255,255,255,.14));border-radius:10px;background:rgba(255,255,255,.04);flex-shrink:0}
.lang-switch .lang-btn{border:0;background:transparent;color:inherit;opacity:.65;font:600 12px/1 inherit;font-family:inherit;padding:6px 8px;border-radius:7px;cursor:pointer;letter-spacing:.04em}
.lang-switch .lang-btn:hover{opacity:1}
.lang-switch .lang-btn.active{opacity:1;background:var(--primary,#4f8cff);color:#fff}
.lang-switch.floating{position:fixed;top:12px;right:12px;z-index:1000}
.topbar-user .lang-switch{margin-right:10px}
.navbar .lang-switch{margin:0 14px 0 auto}
.navbar .nav-links{margin:0 auto}
html.i18n-pending body{visibility:hidden}
@media (max-width:640px){.lang-switch .lang-btn{padding:6px 7px}.topbar-user .lang-switch{margin-right:6px}}

/* ── Landing: tanishtiruv videosi (boshqaruv paneli o'rnida) ── */
.promo-video-wrap { display: flex; justify-content: center; align-items: center; perspective: none; }
.promo-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #070b16; border: 1px solid rgba(71,96,125,.78); box-shadow: 0 50px 100px -20px rgba(0,0,0,.62), 0 0 0 1px rgba(34,197,94,.08), 0 0 60px rgba(37,99,235,.18); }
.promo-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.promo-sound { position: absolute; right: 12px; bottom: 12px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: #fff; background: rgba(8,12,24,.62); backdrop-filter: blur(8px); cursor: pointer; transition: transform .15s, background .15s; }
.promo-sound:hover { transform: scale(1.06); background: rgba(8,12,24,.82); }
.promo-sound .ico { width: 20px; height: 20px; }
.promo-sound .ico-on { display: none; }
.promo-sound[aria-pressed="true"] .ico-on { display: block; }
.promo-sound[aria-pressed="true"] .ico-off { display: none; }
@media (max-width: 640px) { .promo-video-frame { border-radius: 22px; } .promo-video-frame.is-tall { width: min(100%, 320px); aspect-ratio: 9 / 16; margin: 0 auto; } }

/* ── Telefon navigatsiyasi: ixcham til tugmalari, "Kirish" menyu ichida ── */
.nav-mobile-cta { display: none; }
@media (max-width: 900px) {
  #navAuth { display: none; }
  .navbar { padding: 10px 14px; gap: 0; }
  .navbar .lang-switch { margin: 0 8px 0 auto; padding: 2px; border-radius: 9px; }
  .navbar .lang-switch .lang-btn { padding: 6px 7px; font-size: 11px; letter-spacing: .02em; }
  .navbar .nav-links { border-radius: 0 0 22px 22px; padding: 8px 16px 20px; max-height: calc(100vh - 76px); overflow-y: auto; }
  .navbar .nav-links > a { display: flex; align-items: center; justify-content: space-between; }
  .navbar .nav-links > a::after { content: '\203A'; color: var(--text3); font-size: 24px; line-height: 1; }
  .navbar .nav-links > a.active::after { display: block; color: var(--acc2); }
  .nav-mobile-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 16px; padding-top: 18px; border-top: 1px solid rgba(44,62,86,.6); }
  .navbar .nav-links a.nav-cta-big { width: 100%; justify-content: center; gap: 10px; padding: 17px 20px; border: 0; border-radius: 16px; font-size: 17px; background: linear-gradient(135deg, #4ade80, #22c55e); color: #052e16; box-shadow: 0 14px 30px rgba(34,197,94,.28), inset 0 1px 0 rgba(255,255,255,.35); }
  .navbar .nav-links a.nav-cta-big::after { content: none; }
  .navbar .nav-links a.nav-cta-big .ico { width: 20px; height: 20px; }
  .nav-mobile-cta small { color: var(--text3); font-size: 12px; }
}
@media (max-width: 380px) {
  .navbar .lang-switch .lang-btn { padding: 6px 5px; font-size: 10.5px; }
  .nav-brand .brand-lockup-copy small { display: none; }
}

/* Til o'zgarganda tugma shakli o'zgarmasin */
.nav-cta { white-space: nowrap; }
.btn-hero { white-space: nowrap; }
@media (max-width: 640px) {
  .btn-hero { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 340px; margin: 0 auto; padding: 15px 20px; font-size: 15.5px; }
  #dashBlock { width: 100%; }
}

/* ── Dashboard (telefon): ixcham topbar, stepper va AI chat ichki skroll bilan ── */
.chat-messages { min-height: 0; overscroll-behavior: contain; }
.msg-bubble { overflow-wrap: anywhere; word-break: break-word; }
#chatInput, #editChatInput { max-height: 140px; line-height: 1.5; }
@media (max-width: 900px) {
  /* Chat qutisi ekran balandligi bilan cheklanadi — butun sahifa uzayib ketmaydi, xabarlar ichida skroll bo'ladi */
  .create-layout > .chat-box { height: calc(100vh - 250px); height: calc(100dvh - 250px); min-height: 420px; max-height: 760px; }
  .chat-input-row { padding: 10px; align-items: flex-end; }
  .quick-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .quick-chips::-webkit-scrollbar { display: none; }
  .quick-chip { flex-shrink: 0; }
  .msg-col { max-width: calc(100% - 44px); }
  .msg-bubble { font-size: 14px; }
}
@media (max-width: 640px) {
  .dash-main { padding: 14px; }
  .topbar { margin: -14px -14px 14px; padding: 10px 12px; gap: 8px; }
  .topbar-brand strong { display: none; }
  .topbar-user { gap: 8px; margin-left: auto; }
  .topbar-user .lang-switch { margin-right: 0; padding: 2px; }
  .topbar-user .lang-switch .lang-btn { padding: 6px 7px; font-size: 11px; }
  .u-name { display: none; }
  .u-photo { width: 32px; height: 32px; }
  .u-logout { padding: 7px 9px; }
  .stepper { overflow: visible; padding-bottom: 0; margin-bottom: 14px; }
  .step-item { width: auto; flex: 1 1 0; min-width: 0; gap: 6px; }
  .step-label b { font-size: 11px; }
  .step-label span { display: none; }
  .step-line { min-width: 8px; margin-top: 15px; }
  .chat-header { padding: 12px; gap: 8px; }
  .chat-messages { padding: 12px; gap: 12px; }
  .create-layout > .chat-box { height: calc(100vh - 215px); height: calc(100dvh - 215px); }
}

/* Telefon: klaviatura ochilganda chat to'liq ekran (ko'rinadigan maydon bo'yicha) */
.chat-fs-close { display: none; }
@media (max-width: 900px) {
  body.chat-focus { overflow: hidden; }
  .chat-box.chat-fs { position: fixed; left: 0; right: 0; top: var(--vvt, 0px); height: var(--vvh, 100dvh); min-height: 0; max-height: none; z-index: 90; border-radius: 0; border-left: 0; border-right: 0; }
  .chat-box.chat-fs .chat-fs-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-left: 8px; flex-shrink: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--bg3); color: var(--text2); font-size: 14px; cursor: pointer; }
  .chat-box.chat-fs .quick-chips { display: none; }
  .chat-box.chat-fs .chat-input-row { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Bosh sahifa (telefon): ixcham ko'rinish — kamroq matn, kichik kartochkalar ── */
@media (max-width: 640px) {
  .hero { padding: 84px 16px 8px; }
  .hero-right { margin-bottom: 0; }
  .orb-wrap { width: 150px; height: 150px; }
  .hero-badge { margin-bottom: 10px; font-size: 11px; padding: 5px 12px; }
  .hero-left h1, .hero h1 { font-size: 30px; line-height: 1.15; margin-bottom: 10px; letter-spacing: -.4px; }
  .hero-desc { font-size: 14px; line-height: 1.55; margin-bottom: 16px; }
  .hero-desc br { display: none; }
  .hero-checks { display: none; }
  .hero-cta-row { margin-bottom: 4px; }

  .steps-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; margin-top: 14px; padding: 12px; border-radius: 14px; }
  .steps-bar .step { min-width: 0; gap: 8px; }
  .steps-bar .step-icon, .steps-bar .step-txt span { display: none; }
  .steps-bar .step-txt b { font-size: 12.5px; line-height: 1.3; }
  .steps-bar .step-num { width: 24px; height: 24px; font-size: 11.5px; }

  .dashboard-showcase { margin: 26px auto 30px; gap: 18px; }
  .dashboard-showcase-copy { text-align: center; }
  .dashboard-showcase-copy > p, .showcase-points { display: none; }
  .dashboard-showcase-copy h2 { font-size: 23px; margin-bottom: 4px; }
  .showcase-eyebrow { margin-bottom: 10px; }
  .showcase-cta { display: flex; justify-content: center; width: 100%; margin-top: 14px; padding: 13px 16px; }

  .features-section-full { padding: 22px 14px 30px; }
  .section-title { font-size: 21px; margin-bottom: 6px; }
  .section-sub { font-size: 12.5px; margin-bottom: 16px; }
  .feat-group-title { font-size: 15px; margin-bottom: 10px; }
  .feat-group-title:not(:first-of-type) { margin-top: 22px; }
  .feat-grid, .feat-grid-full { grid-template-columns: 1fr 1fr; gap: 10px; }
  .feat-card { padding: 14px 8px; border-radius: 14px; }
  .feat-card .ico { width: 26px; height: 26px; }
  .feat-card h3 { font-size: 12.5px; margin: 8px 0 0; line-height: 1.3; }
  .feat-card p { display: none; }
  .feat-card .badge, .feat-card-premium .premium-badge { font-size: 9px; }

  .footer-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 14px 28px; padding: 12px; }
  .fstat { gap: 8px; align-items: center; }
  .fstat .ico { width: 20px; height: 20px; }
  .fstat b { font-size: 12px; margin: 0; }
  .fstat small { display: none; }
}

/* ── Alohida sahifalar (Imkoniyatlar, Qanday ishlaydi) va bosh sahifadagi bo'lim havolalari ── */
.hero-mobile-cta { display: none; }
.subpage { padding: 104px 32px 40px; max-width: 1240px; margin: 0 auto; }
.subpage .features-section-full { padding-top: 10px; }
.subpage-title { font-size: clamp(30px, 4vw, 44px); text-align: center; margin: 0 0 8px; }
.subpage-sub { text-align: center; color: var(--text2); margin: 0 0 8px; }
.subpage .steps-bar { margin-top: 28px; }
.subpage-video { margin: 36px auto 0; max-width: 760px; }
.subpage-cta { margin: 48px auto 20px; text-align: center; }
.subpage-cta h2 { font-family: var(--ffd); font-size: 24px; margin: 0 0 8px; }
.subpage-cta p { color: var(--text2); margin: 0 0 18px; }
.subpage-cta .showcase-cta { display: inline-flex; }
.home-links { max-width: 1180px; margin: 10px auto 30px; padding: 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.home-link { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--surf); border: 1px solid var(--border); border-radius: 16px; transition: all .2s; }
.home-link:hover { border-color: var(--acc); transform: translateY(-3px); }
.home-link b { font-family: var(--ffd); font-size: 15px; }
.home-link span { color: var(--text2); font-size: 12.5px; }
@media (max-width: 900px) {
  /* "Kirish" — sarlavha ostida o'ng tomonda, menyu ichida emas */
  .hero-mobile-cta { display: flex; justify-content: flex-end; padding: 0 16px; }
  .hero > .hero-mobile-cta { position: absolute; top: 84px; right: 0; left: 0; z-index: 5; }
  .subpage > .hero-mobile-cta { margin: 0 0 14px; padding: 0; }
  .hero-mobile-cta .nav-cta { padding: 9px 18px; font-size: 14px; box-shadow: 0 8px 20px rgba(34,197,94,.22); }
  /* Menyu bo'limlari ketma-ket, pastga */
  .navbar .nav-links { flex-direction: column !important; align-items: stretch; }
  .navbar .nav-links > a { width: 100%; }
  .subpage { padding: 84px 14px 24px; }
}
@media (max-width: 640px) {
  .home-links { grid-template-columns: 1fr; gap: 10px; padding: 0 14px; margin: 4px auto 20px; }
  .home-link { flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 16px; }
  .home-link b { font-size: 14px; }
  .home-link span { font-size: 12px; text-align: right; }
  .subpage-title { font-size: 26px; }
  .subpage .steps-bar { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .subpage .steps-bar .step-icon { display: flex; }
  .subpage .steps-bar .step-txt span { display: block; }
  .subpage .feat-card p { display: block; font-size: 11px; margin-top: 4px; }
  .subpage-cta h2 { font-size: 20px; }
  .subpage-cta .showcase-cta { width: 100%; justify-content: center; }
}

/* ── AI yordamchi bloki (Imkoniyatlar) ── */
.ai-hero { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; margin: 6px auto 8px; padding: 38px; max-width: 1180px; border-radius: 28px; background: linear-gradient(135deg, rgba(34,197,94,.10), rgba(37,99,235,.14) 55%, rgba(168,85,247,.10)); border: 1px solid rgba(74,222,128,.35); box-shadow: 0 30px 80px -30px rgba(34,197,94,.35); overflow: hidden; }
.ai-hero-glow { position: absolute; inset: -40% -10% auto auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(34,197,94,.28), transparent 65%); filter: blur(10px); animation: aiGlow 6s ease-in-out infinite alternate; pointer-events: none; }
@keyframes aiGlow { from { transform: translate(0,0) scale(1); opacity: .7; } to { transform: translate(-40px,30px) scale(1.15); opacity: 1; } }
.ai-hero-copy, .ai-hero-demo { position: relative; z-index: 1; }
.ai-hero-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 100px; font-size: 11px; font-weight: 800; letter-spacing: .12em; color: #052e16; background: linear-gradient(135deg,#86efac,#22c55e); }
.ai-hero-badge .ico { width: 14px; height: 14px; }
.ai-hero h2 { font-family: var(--ffd); font-size: clamp(26px, 3.2vw, 40px); line-height: 1.12; letter-spacing: -.5px; margin: 14px 0 12px; }
.ai-hero-copy > p { color: var(--text2); font-size: 15.5px; line-height: 1.65; margin: 0 0 16px; }
.ai-hero-points { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 9px; }
.ai-hero-points li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.ai-hero-points li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: rgba(34,197,94,.18); color: var(--acc2); }
.ai-hero-points .ico { width: 12px; height: 12px; }
.ai-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.ai-hero-chips span { padding: 6px 12px; border-radius: 100px; font-size: 12px; color: var(--text2); background: rgba(255,255,255,.05); border: 1px solid var(--border); }
.ai-hero-cta { display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 16px; font-family: var(--ffd); font-size: 16px; font-weight: 800; color: #052e16; background: linear-gradient(135deg,#4ade80,#22c55e); box-shadow: 0 16px 36px rgba(34,197,94,.35), inset 0 1px 0 rgba(255,255,255,.4); transition: transform .2s, box-shadow .2s; animation: aiCtaPulse 2.6s ease-in-out infinite; }
.ai-hero-cta:hover { transform: translateY(-2px); }
.ai-hero-cta .ico { width: 18px; height: 18px; }
@keyframes aiCtaPulse { 0%,100% { box-shadow: 0 16px 36px rgba(34,197,94,.30), 0 0 0 0 rgba(34,197,94,.45); } 50% { box-shadow: 0 16px 36px rgba(34,197,94,.30), 0 0 0 12px rgba(34,197,94,0); } }
.ai-hero-note { display: block; margin-top: 10px; color: var(--text3); font-size: 12px; }
.ai-hero-demo { background: rgba(9,16,32,.92); border: 1px solid rgba(71,96,125,.7); border-radius: 20px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); overflow: hidden; }
.ai-demo-head { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: rgba(15,23,42,.9); border-bottom: 1px solid var(--border); }
.ai-demo-head i { width: 9px; height: 9px; border-radius: 50%; background: #334155; }
.ai-demo-head i:nth-child(1) { background: #fb7185; } .ai-demo-head i:nth-child(2) { background: #fbbf24; } .ai-demo-head i:nth-child(3) { background: #4ade80; }
.ai-demo-head b { margin-left: 8px; font-size: 12px; color: var(--text2); }
.ai-demo-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 290px; }
.ai-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 13px; line-height: 1.5; }
.ai-user { align-self: flex-end; background: #1d4ed8; color: #fff; border-bottom-right-radius: 4px; }
.ai-bot { align-self: flex-start; background: #1e293b; color: var(--text); border-bottom-left-radius: 4px; }
.ai-steps { background: #1e293b; border-radius: 14px; padding: 10px 13px; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--text); }
.ai-steps div { display: flex; align-items: center; gap: 8px; }
.ai-steps span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #22c55e; color: #052e16; }
.ai-steps .ico, .ai-ready .ico { width: 11px; height: 11px; }
.ai-ready { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 100px; font-size: 12.5px; font-weight: 800; color: #052e16; background: linear-gradient(135deg,#86efac,#22c55e); }
.ai-d1, .ai-d2, .ai-d3, .ai-d4 { opacity: 0; transform: translateY(10px); animation: aiShow 11s ease-in-out infinite; }
.ai-d1 { animation-delay: .3s; } .ai-d2 { animation-delay: 1.6s; } .ai-d3 { animation-delay: 3.2s; } .ai-d4 { animation-delay: 5s; }
@keyframes aiShow { 0% { opacity: 0; transform: translateY(10px); } 5%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateY(-6px); } }
.ai-or { display: flex; align-items: center; gap: 14px; max-width: 1180px; margin: 22px auto 6px; color: var(--text3); font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; }
.ai-or::before, .ai-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
@media (max-width: 900px) {
  .ai-hero { grid-template-columns: 1fr; gap: 20px; padding: 22px 16px; border-radius: 22px; }
  .ai-hero h2 { font-size: 24px; margin: 12px 0 8px; }
  .ai-hero-copy > p { font-size: 14px; margin-bottom: 12px; }
  .ai-hero-points li { font-size: 13px; }
  .ai-hero-chips { margin-bottom: 16px; }
  .ai-hero-chips span:nth-child(n+5) { display: none; }
  .ai-hero-cta { width: 100%; justify-content: center; padding: 16px 18px; }
  .ai-hero-note { text-align: center; }
  .ai-demo-body { min-height: 0; }
  .ai-or { margin-top: 16px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-hero-glow, .ai-hero-cta { animation: none; }
  .ai-d1, .ai-d2, .ai-d3, .ai-d4 { animation: none; opacity: 1; transform: none; }
}

/* Telegram orqali kirish: holat xabari */
.tg-toast { position: fixed; left: 50%; bottom: 22px; z-index: 300; transform: translate(-50%, 24px); max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 14px; background: rgba(8,14,28,.96); border: 1px solid rgba(74,222,128,.45); color: #e2e8f0; font-size: 14px; line-height: 1.4; text-align: center; box-shadow: 0 16px 40px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.tg-toast.show { opacity: 1; transform: translate(-50%, 0); }
.tg-toast.err { border-color: rgba(248,113,113,.6); }

/* Telegram vidjeti: iframe orqa foni burchaklarda ko'rinib qolmasin */
#tg-login-btn { display: inline-flex; align-items: center; line-height: 0; border-radius: 20px; overflow: hidden; background: transparent; color-scheme: light; }
#tg-login-btn iframe { border-radius: 20px; background: transparent !important; color-scheme: light; }

/* ── Dashboard (kompyuter/noutbuk): "Bot yaratish" bitta ekranga sig'adi, sahifa skrolli yo'q ── */
@media (min-width: 901px) {
  .dash-main:has(#sec-create[style*="block"]) { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 20px; }
  .dash-main:has(#sec-create[style*="block"]) > .topbar { flex-shrink: 0; }
  #sec-create[style*="block"] { display: flex !important; flex-direction: column; flex: 1; min-height: 0; }
  #sec-create[style*="block"] > .sec-header { flex-shrink: 0; margin-bottom: 8px; }
  #sec-create[style*="block"] > .sec-header h1 { font-size: 20px; }
  #sec-create[style*="block"] > .stepper { flex-shrink: 0; margin-bottom: 12px; }
  #sec-create[style*="block"] .create-layout { flex: 1; min-height: 0; height: auto; }
  #sec-create[style*="block"] .create-layout > .chat-box,
  #sec-create[style*="block"] .create-layout > .token-box { min-height: 0; }
  #sec-create[style*="block"] .create-layout > .token-box { overflow-y: auto; align-self: stretch; }
}
@media (min-width: 901px) {
  .dash-main:has(#sec-edit[style*="block"]) { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 20px; }
  .dash-main:has(#sec-edit[style*="block"]) > .topbar { flex-shrink: 0; }
  #sec-edit[style*="block"] { display: flex !important; flex-direction: column; flex: 1; min-height: 0; }
  #sec-edit[style*="block"] > .sec-header { flex-shrink: 0; margin-bottom: 10px; }
  #sec-edit[style*="block"] .create-layout { flex: 1; min-height: 0; height: auto; }
  #sec-edit[style*="block"] .create-layout > .chat-box,
  #sec-edit[style*="block"] .create-layout > .token-box { min-height: 0; }
  #sec-edit[style*="block"] .create-layout > .token-box { overflow-y: auto; align-self: stretch; }
}

/* ── Shablonlar: ixcham kartochka, tavsif ustiga borganda (yoki bosganda) ochiladi ── */
.tab-ico { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.templates-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.template-card { display: flex; flex-direction: column; align-items: center; min-height: 252px; padding: 22px 16px 16px; overflow: hidden; cursor: pointer; }
.template-card h3 { margin: 2px 0 6px; }
.template-card .btn-primary { margin-top: auto; }
.tpl-hint { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 14px; font-size: 11.5px; color: var(--text3); }
.tpl-hint svg { width: 14px; height: 14px; }
.tpl-desc { position: absolute; left: 0; right: 0; top: 0; bottom: 68px; padding: 14px 16px 6px; text-align: left; background: linear-gradient(180deg, rgba(14,24,42,.98), rgba(14,24,42,.97)); border-bottom: 1px solid var(--border); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease, visibility .18s; overflow-y: auto; z-index: 2; }
.tpl-desc h4 { font-family: var(--ffd); font-size: 13.5px; margin: 0 0 6px; color: var(--acc2); }
.tpl-desc p { margin: 0; min-height: 0; font-size: 12.5px; line-height: 1.55; color: var(--text); }
.template-card .btn-primary { position: relative; z-index: 3; }
.template-card.open .tpl-desc, .template-card:focus-within .tpl-desc { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) { .template-card:hover .tpl-desc { opacity: 1; visibility: visible; transform: none; } }
.template-premium-badge { z-index: 4; }

/* ── Shablon kartochkasi v2: ustiga borganda joyida kengayadi, rasm yo'qolmaydi ── */
.templates-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; align-items: start; }
.template-slot { position: relative; height: 236px; }
.template-slot .template-card { position: absolute; top: 0; left: 0; right: 0; min-height: 236px; height: auto; padding: 22px 16px 16px; overflow: visible; display: flex; flex-direction: column; align-items: center; cursor: pointer; background: linear-gradient(180deg, rgba(30,41,59,.92), rgba(15,23,42,.96)); border: 1px solid rgba(71,96,125,.55); border-radius: 18px; transition: border-color .2s, box-shadow .25s, transform .2s; }
.template-slot .template-ico { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; background: radial-gradient(circle at 30% 25%, rgba(74,222,128,.32), rgba(34,197,94,.10)); border: 1px solid rgba(74,222,128,.35); box-shadow: 0 8px 22px -8px rgba(34,197,94,.55); transition: transform .25s; }
.template-slot .template-ico .ico { width: 1.6em; height: 1.6em; }
.template-slot .template-card h3 { font-size: 15px; margin: 0 0 6px; line-height: 1.3; }
.template-slot .tpl-hint { margin-bottom: 14px; }
.template-slot .tpl-desc { position: static; inset: auto; padding: 0; width: 100%; display: grid; grid-template-rows: 0fr; opacity: 0; visibility: visible; transform: none; background: none; border: 0; overflow: visible; transition: grid-template-rows .28s ease, opacity .22s ease; }
.template-slot .tpl-desc-in { overflow: hidden; min-height: 0; }
.template-slot .tpl-desc p { margin: 0 0 14px; padding-top: 4px; font-size: 12.5px; line-height: 1.6; color: var(--text2); text-align: left; min-height: 0; }
.template-slot .btn-primary { margin-top: auto; }
.template-slot .template-card:hover, .template-slot .template-card.open, .template-slot .template-card:focus-within { z-index: 20; border-color: rgba(74,222,128,.7); box-shadow: 0 22px 50px -14px rgba(0,0,0,.65), 0 0 0 1px rgba(34,197,94,.25), 0 0 34px -10px rgba(34,197,94,.45); transform: translateY(-3px); background: linear-gradient(180deg, #1b2740, #101a30); }
.template-slot .template-card:hover .tpl-desc, .template-slot .template-card.open .tpl-desc, .template-slot .template-card:focus-within .tpl-desc { grid-template-rows: 1fr; opacity: 1; }
.template-slot .template-card:hover .template-ico, .template-slot .template-card.open .template-ico { transform: scale(1.06); }
.template-slot .template-card:hover .tpl-hint, .template-slot .template-card.open .tpl-hint { opacity: 0; height: 0; margin: 0; overflow: hidden; }
.template-slot .template-card.premium { border-color: rgba(250,204,21,.4); }
.template-slot .template-card.premium .template-ico { background: radial-gradient(circle at 30% 25%, rgba(250,204,21,.32), rgba(250,204,21,.08)); border-color: rgba(250,204,21,.4); box-shadow: 0 8px 22px -8px rgba(250,204,21,.45); color: #facc15; }
@media (max-width: 640px) {
  .templates-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .template-slot { height: 228px; }
  .template-slot .template-card { min-height: 228px; padding: 16px 10px 12px; }
  .template-slot .template-card h3 { font-size: 13px; }
  .template-slot .btn-primary { font-size: 12px; padding: 10px 6px; }
}

/* Rus/ingliz tilida logotip ostidagi kichik yozuv aniq o'qilsin */
html:not([lang="uz"]) .brand-lockup-copy small { letter-spacing: .06em; }
html:not([lang="uz"]) .sb-brand .brand-lockup-copy small { font-size: 6.4px; }

/* AI chat: tartibli matn (sarlavha, abzats, band) */
.msg-bubble .md-p { margin: 0; }
.msg-bubble .md-gap { height: 8px; }
.msg-bubble .md-h { margin: 2px 0 4px; font-family: var(--ffd); font-size: 14px; font-weight: 700; color: var(--text); }
.msg-bubble .chk-line { margin: 3px 0; }

/* ── Ma'lumotlarni boshqarish oynasi ── */
.dm-box { width: min(920px, 96vw); max-height: 90vh; display: flex; flex-direction: column; }
.dm-tabs { display: flex; gap: 6px; padding: 0 20px 12px; overflow-x: auto; scrollbar-width: thin; }
.dm-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 100px; background: var(--bg3); color: var(--text2); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: all .15s; }
.dm-tab:hover { border-color: var(--acc); color: var(--text); }
.dm-tab.active { background: rgba(34,197,94,.14); border-color: var(--acc); color: var(--acc2); }
.dm-tab-ico .ico { width: 16px; height: 16px; }
.dm-toolbar { display: flex; align-items: center; gap: 10px; padding: 0 20px 12px; }
.dm-search { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg3); color: var(--text); font-size: 13px; }
.dm-search:focus { outline: none; border-color: var(--acc); }
.dm-count { color: var(--text3); font-size: 12px; white-space: nowrap; }
.dm-add { white-space: nowrap; padding: 10px 16px; }
.dm-add .ico { width: 16px; height: 16px; vertical-align: -3px; }
.dm-hint { margin: 0 20px 12px; padding: 10px 14px; border: 1px dashed var(--border2); border-radius: 10px; color: var(--text2); font-size: 12.5px; line-height: 1.5; }
.dm-body { flex: 1; min-height: 120px; overflow: auto; padding: 0 20px 12px; }
.dm-empty { padding: 36px 12px; text-align: center; color: var(--text3); font-size: 13.5px; }
.dm-table-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: auto; }
.dm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dm-table th { position: sticky; top: 0; background: var(--bg3); text-align: left; padding: 10px 12px; color: var(--text3); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.dm-table td { padding: 10px 12px; border-top: 1px solid var(--border); color: var(--text); vertical-align: top; max-width: 320px; overflow-wrap: anywhere; }
.dm-table tr:hover td { background: rgba(255,255,255,.025); }
.dm-actions { white-space: nowrap; text-align: right; width: 1%; }
.dm-icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; margin-left: 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg3); color: var(--text2); cursor: pointer; transition: all .15s; }
.dm-icon-btn .ico { width: 15px; height: 15px; }
.dm-icon-btn:hover { border-color: var(--acc); color: var(--acc2); }
.dm-icon-btn.danger:hover { border-color: #f87171; color: #f87171; }
.dm-yes { color: var(--acc2); font-weight: 800; }
.dm-no { color: var(--text3); }
.dm-foot { padding: 6px 20px 16px; text-align: right; }
.dm-link { background: none; border: 0; color: var(--text3); font-size: 12px; cursor: pointer; text-decoration: underline; }
.dm-form-overlay { z-index: 130; }
.dm-form-box { width: min(520px, 94vw); }
.dm-field { margin-bottom: 14px; }
.dm-field > label { display: block; margin-bottom: 6px; color: var(--text2); font-size: 12.5px; font-weight: 600; }
.dm-req { color: #f87171; font-style: normal; }
.dm-input { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg3); color: var(--text); font-family: var(--ff); font-size: 14px; }
.dm-input:focus { outline: none; border-color: var(--acc); }
textarea.dm-input { resize: vertical; line-height: 1.5; }
.dm-check { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.dm-help { display: block; margin-top: 5px; color: var(--text3); font-size: 11.5px; line-height: 1.45; }
@media (max-width: 640px) {
  .dm-box { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
  .dm-toolbar { flex-wrap: wrap; }
  .dm-search { flex-basis: 100%; }
  .dm-count { margin-right: auto; }
  .dm-table th:nth-child(n+3), .dm-table td:nth-child(n+3):not(.dm-actions) { display: none; }
}
.dm-settings { max-width: 640px; padding-top: 4px; }
.dm-settings .btn-primary { margin-top: 6px; }
.dm-clear { white-space: nowrap; border-color: rgba(248,113,113,.5); color: #f87171; }
.dm-clear:hover { background: rgba(248,113,113,.12); }

/* ── Admin kirish ma'lumotlari kartochkasi ── */
.cred-card { margin-top: 4px; padding: 16px; border: 1px solid rgba(74,222,128,.45); border-radius: 16px; background: linear-gradient(180deg, rgba(34,197,94,.10), rgba(34,197,94,.04)); text-align: left; }
.cred-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: 14.5px; color: var(--text); }
.cred-head > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cred-check { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: #22c55e; color: #052e16; font-weight: 800; }
.cred-open { padding: 7px 12px; border-radius: 10px; border: 1px solid rgba(74,222,128,.5); color: var(--acc2); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.cred-warn { margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(250,204,21,.12); border: 1px solid rgba(250,204,21,.45); color: #fde68a; font-size: 13px; line-height: 1.45; }
.cred-intro { margin-bottom: 12px; color: var(--text2); font-size: 13px; line-height: 1.5; }
.cred-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding: 12px; border-radius: 12px; background: rgba(8,14,28,.75); border: 1px solid var(--border2, var(--border)); }
.cred-step { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--acc); color: #052e16; font-size: 13px; font-weight: 800; }
.cred-main { flex: 1; min-width: 0; }
.cred-label { margin-bottom: 4px; color: var(--text); font-size: 12.5px; font-weight: 700; }
.cred-label small { color: var(--text3); font-weight: 500; }
.cred-val { font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace; font-size: 19px; font-weight: 700; letter-spacing: .02em; color: #bbf7d0; overflow-wrap: anywhere; user-select: all; cursor: text; }
.cred-copy { flex-shrink: 0; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(74,222,128,.55); background: rgba(34,197,94,.14); color: var(--acc2); font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s; white-space: nowrap; }
.cred-copy:hover { background: rgba(34,197,94,.26); }
.cred-copy.copied, .cred-actions .copied { background: #22c55e !important; color: #052e16 !important; border-color: #22c55e !important; }
.cred-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.cred-actions .btn-primary { flex: 1; min-width: 160px; }
.cred-note { color: var(--text3); font-size: 12px; line-height: 1.5; }
@media (max-width: 480px) {
  .cred-row { flex-wrap: wrap; }
  .cred-copy { width: 100%; }
  .cred-val { font-size: 17px; }
}
/* Tor o'ng panelda (token qutisi) qatorlar sig'ishi uchun */
.token-box .cred-row, .modal-body .cred-row { flex-wrap: wrap; }
.token-box .cred-copy, .modal-body .cred-copy { width: 100%; }
.token-box .cred-val, .modal-body .cred-val { font-size: 18px; }

.mobile-only { display: none; }
@media (max-width: 820px) {
  .mobile-only { display: block; }
  .back-to-chat { width: 100%; margin-bottom: 14px; padding: 12px; border: 1px solid var(--border, #2a3550); border-radius: 12px; background: transparent; color: inherit; font: inherit; font-weight: 600; }
}

.managed-box { margin: 4px 0 18px; }
.managed-note { margin: 8px 0 0; font-size: 13px; opacity: .75; }
.managed-or { margin: 16px 0 4px; text-align: center; font-size: 13px; opacity: .6; }

.manual-token { margin-top: 12px; }
.manual-token-sum { cursor: pointer; padding: 10px 0; font-weight: 600; opacity: .85; }

/* Bot yaratish: ikki tanlov — Telegramda ochish / Token kiritish */
.create-choice-title { margin: 20px 0 10px; font-size: 16px; }
.create-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 12px 14px; background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; color: inherit; font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.choice-btn b { font-size: 14.5px; }
.choice-btn small { font-size: 12px; opacity: .65; line-height: 1.3; }
.choice-btn:hover { border-color: var(--acc2); }
.choice-btn.active { border-color: var(--acc2); background: rgba(74,222,128,.1); }
.choice-btn.disabled:not(.active) { opacity: .55; }
.choice-panel { margin-top: 14px; }
.choice-panel .managed-hint { margin: 10px 0 0; text-align: center; }
@media (max-width: 480px) { .create-choice { grid-template-columns: 1fr; } }

/* ── Bot ishchi maydoni ── */
.bot-card-click { cursor: pointer; transition: transform .15s, border-color .15s; }
.bot-card-click:hover { transform: translateY(-2px); border-color: rgba(74,222,128,.45); }
.bot-card-hint { margin-top: 14px; font-size: 13px; opacity: .6; }
.ws-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; position: relative; }
.ws-namebox { position: relative; flex: 1; min-width: 0; }
.ws-name { background: none; border: 0; color: inherit; font: inherit; font-size: 20px; font-weight: 800; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.ws-name:hover { background: var(--bg3); }
.ws-caret { opacity: .6; font-size: 14px; }
.ws-menu { position: absolute; z-index: 20; top: 100%; left: 0; min-width: 220px; background: var(--bg2, #111827); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.ws-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.ws-menu button:hover { background: var(--bg3); }
.ws-menu .danger { color: #f87171; }
.ws-open-tg { text-decoration: none; white-space: nowrap; }
.ws-layout { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; gap: 16px; height: calc(100vh - 190px); min-height: 520px; }
.ws-right { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: hidden; }
.ws-tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; }
.ws-tabs button { background: none; border: 0; color: inherit; font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 9px; cursor: pointer; opacity: .7; white-space: nowrap; }
.ws-tabs button.active { background: rgba(255,255,255,.1); opacity: 1; }
.ws-panel { flex: 1; min-height: 0; overflow-y: auto; }
.ws-loading { padding: 18px; opacity: .6; font-size: 14px; }
.ws-manage { display: grid; grid-template-columns: minmax(230px, 300px) 1fr; gap: 14px; align-items: start; }
.ws-list { display: flex; flex-direction: column; gap: 6px; }
.ws-item { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; background: var(--bg3); border: 1px solid transparent; border-radius: 14px; padding: 10px 12px; color: inherit; font: inherit; cursor: pointer; }
.ws-item:hover { border-color: var(--border); }
.ws-item.active { background: rgba(59,130,246,.22); border-color: rgba(96,165,250,.55); }
.ws-item-ico { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; font-size: 18px; }
.ws-item-txt { display: flex; flex-direction: column; min-width: 0; }
.ws-item-txt b { font-size: 14px; }
.ws-item-txt small { font-size: 12px; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-detail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ws-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.ws-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .6; margin-bottom: 10px; }
.ws-stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ws-stats3 b { display: block; font-size: 28px; line-height: 1.1; }
.ws-stats3 span { font-size: 12px; opacity: .65; }
.ws-sub { margin-top: 10px; font-size: 12.5px; opacity: .65; line-height: 1.5; }
.ws-hint { margin-top: 6px; font-size: 12px; opacity: .6; }
.ws-chart { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.ws-chart.big { height: 220px; }
.ws-bar { flex: 1; min-width: 3px; background: linear-gradient(180deg, #4ade80, #16a34a); border-radius: 3px 3px 0 0; }
.ws-legend { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; opacity: .55; }
.ws-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ws-link code { word-break: break-all; }
.ws-qr { margin: 14px 0 4px; background: #fff; padding: 8px; border-radius: 10px; width: fit-content; }
.ws-card textarea { width: 100%; box-sizing: border-box; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: inherit; font: inherit; resize: vertical; }
.ws-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ws-chip { background: transparent; border: 1px solid var(--border); color: inherit; font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.ws-chip.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.ws-check { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; font-size: 13px; }
.ws-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.ws-row:last-child { border-bottom: 0; }
.ws-row small { display: block; opacity: .6; font-size: 12px; font-weight: 400; }
.ws-flow { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.ws-flowhint { font-size: 13px; opacity: .6; }
.ws-flowgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; width: 100%; }
.ws-flowcard { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; width: 100%; box-sizing: border-box; }
.ws-flowcard.start { border-color: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.2); max-width: 420px; }
.ws-flowtrig { font-family: monospace; font-weight: 700; color: #4ade80; margin-bottom: 4px; }
.ws-flowtxt { font-size: 12.5px; opacity: .8; white-space: pre-wrap; word-break: break-word; }
.ws-flowbtns { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ws-flowbtn { background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.35); border-radius: 8px; padding: 3px 8px; font-size: 12px; }
.ws-flowbtn small { opacity: .6; }
.ws-logs .ws-log { display: grid; grid-template-columns: 90px 110px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.ws-log time { opacity: .55; font-family: monospace; font-size: 12px; }
.ws-log.b span { opacity: .75; }
.ws-log b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-inline { position: static !important; max-width: none !important; width: 100% !important; box-shadow: none !important; margin: 0 !important; max-height: none !important; }
.dm-inline .modal-head, .dm-inline .dm-foot { display: none; }
@media (max-width: 900px) {
  .ws-layout { grid-template-columns: 1fr; height: auto; }
  .ws-right { overflow: visible; }
  .ws-panel { overflow: visible; }
  .ws-manage { grid-template-columns: 1fr; }
  .ws-top { flex-wrap: wrap; }
  .ws-logs .ws-log { grid-template-columns: 1fr; gap: 2px; }
}

.ws-preview { background: linear-gradient(135deg,#1e3a2f,#14281f); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.ws-bubble { background: #fff; color: #111; border-radius: 12px 12px 12px 4px; padding: 9px 12px; font-size: 14px; white-space: pre-wrap; word-break: break-word; max-width: 90%; }
.ws-prevbtns { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; max-width: 90%; }
.ws-prevbtn { background: rgba(255,255,255,.18); color: #fff; text-align: center; border-radius: 8px; padding: 7px; font-size: 13px; }
.ws-btnrow { display: grid; grid-template-columns: 1fr 1.4fr; gap: 6px; margin-top: 6px; }
.ws-btnrow input { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: inherit; font: inherit; min-width: 0; }
.ws-actions2 { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ── Dizayn v3: sokin, aniq, Linear/Vercel ruhida ── */
:root {
  --bg: #0a0c10; --bg2: #0d1015; --bg3: #12161d;
  --surf: #0f1319; --surf2: #151a22;
  --border: rgba(255,255,255,.07); --border2: rgba(255,255,255,.12);
  --text: #e8eaee; --text2: #98a1b0; --text3: #6b7482;
  --r: 12px;
}
html, body { background: var(--bg); }
body { -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
.dash-page { background: var(--bg); }
.dash-main {
  background:
    radial-gradient(900px 380px at 12% -8%, rgba(34,197,94,.07), transparent 70%),
    var(--bg);
  padding: 28px 36px;
}
.sidebar { background: var(--bg2); border-right: 1px solid var(--border); }
.dash-main h1, .sec-header h1 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }

/* Kartalar */
.chat-box, .token-box, .ws-card, .bot-card, .ws-item {
  background: var(--surf); border: 1px solid var(--border); border-radius: 14px; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.chat-header { padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 13.5px; font-weight: 600; }
.bot-card-click { transition: border-color .15s, background .15s; }
.bot-card-click:hover { transform: none; background: var(--surf2); border-color: var(--border2); box-shadow: none; }
.bot-card-hint { font-size: 12.5px; color: var(--text3); opacity: 1; }

/* Chat */
.msg-bubble { font-size: 13.5px; line-height: 1.6; }
.msg.ai .msg-bubble { background: var(--surf2); border: 1px solid var(--border); }
.msg.user .msg-bubble { background: rgba(34,197,94,.10); border: 1px solid rgba(34,197,94,.22); }
.msg-avatar.ai-ava { background: var(--surf2); border: 1px solid var(--border2); color: var(--acc2); }
.chat-input-row { border-top: 1px solid var(--border); padding: 12px; }
.chat-input-row #chatInput, .chat-input-row #editChatInput {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; box-shadow: none;
}
.chat-input-row #chatInput:focus, .chat-input-row #editChatInput:focus {
  border-color: rgba(74,222,128,.55); box-shadow: 0 0 0 3px rgba(74,222,128,.12);
}
.btn-send { border-radius: 12px; }
.quick-chip { background: transparent; border-color: var(--border); }

/* Bo'sh chat — hero */
.chat-hero { display: none; }
.chat-box.is-empty .chat-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 24px 8px; gap: 8px; flex: 1; overflow-y: auto; }
.chat-box.is-empty .chat-messages, .chat-box.is-empty #starterChips { display: none; }
.chat-hero-orb { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; color: var(--acc2);
  background: var(--surf2); border: 1px solid var(--border2); }
.chat-hero h2 { font-family: var(--ffd); font-size: 21px; font-weight: 650; letter-spacing: -.02em; margin-top: 10px; }
.chat-hero p { color: var(--text2); font-size: 13.5px; max-width: 440px; line-height: 1.6; }
.chat-hero-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; width: 100%; max-width: 620px; }
.chat-hero-grid button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 13px; border-radius: 10px; cursor: pointer;
  background: var(--surf); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: 13px; transition: border-color .15s, background .15s; }
.chat-hero-grid button:hover { background: var(--surf2); border-color: var(--border2); }
.chat-hero-grid i { font-style: normal; width: 20px; height: 20px; flex-shrink: 0; display: grid; place-items: center; border-radius: 6px;
  background: var(--bg3); font-size: 11px; color: var(--text3); font-weight: 600; }
@media (max-width: 640px) { .chat-hero-grid { grid-template-columns: 1fr; } .chat-hero h2 { font-size: 19px; } }

/* Bot ishchi maydoni */
.ws-top { gap: 12px; margin-bottom: 18px; }
.ws-name { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.ws-user { display: inline-flex; align-items: center; gap: 8px; color: var(--text3); font-size: 12.5px; margin-left: 4px; }
.ws-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.ws-dot.off { background: #64748b; box-shadow: none; }
.ws-top .btn-sm { background: transparent; border: 1px solid var(--border); color: var(--text2); }
.ws-top .btn-sm:hover { border-color: var(--border2); color: var(--text); }
.ws-layout { grid-template-columns: minmax(320px, 430px) 1fr; gap: 14px; }
.ws-tabs { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0; gap: 4px; width: 100%; }
.ws-tabs button { border-radius: 8px 8px 0 0; padding: 10px 14px; font-weight: 550; font-size: 13.5px; opacity: .6; position: relative; }
.ws-tabs button.active { background: transparent; opacity: 1; }
.ws-tabs button.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--acc2); border-radius: 2px; }
.ws-manage { grid-template-columns: minmax(240px, 290px) 1fr; gap: 14px; }
.ws-list { gap: 4px; }
.ws-item { padding: 10px 12px; border-radius: 12px; background: transparent; border: 1px solid transparent; }
.ws-item:hover { background: var(--surf); }
.ws-item.active { background: var(--surf2); border-color: var(--border2); }
.ws-item-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--surf2) !important; border: 1px solid var(--border); }
.ws-item.active .ws-item-ico { background: var(--bg3) !important; }
.ws-item-ico svg { width: 18px; height: 18px; }
.ws-item-txt b { font-size: 13.5px; font-weight: 600; }
.ws-item-txt small { font-size: 12px; color: var(--text3); opacity: 1; }
.ws-card { padding: 18px 20px; }
.ws-title { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--text3); opacity: 1; margin-bottom: 14px; }
.ws-stats3 { gap: 0; }
.ws-stats3 > div { padding: 0 18px; border-left: 1px solid var(--border); }
.ws-stats3 > div:first-child { padding-left: 0; border-left: 0; }
.ws-stats3 b { font-size: 30px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ws-stats3 span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text3); opacity: 1; }
.ws-sub { color: var(--text3); opacity: 1; font-size: 12.5px; }
.ws-chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ws-range { display: inline-flex; gap: 2px; padding: 2px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; }
.ws-range button { background: none; border: 0; color: var(--text3); font: inherit; font-size: 12px; font-weight: 550; padding: 3px 10px; border-radius: 6px; cursor: pointer; }
.ws-range button.active { background: var(--surf2); color: var(--text); }
.ws-svg { width: 100%; height: auto; display: block; overflow: visible; }
.ws-svg .grid { stroke: rgba(255,255,255,.06); stroke-width: 1; }
.ws-svg .axis { fill: var(--text3); font-size: 10.5px; }
.ws-svg .line { fill: none; stroke: #4ade80; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ws-svg .area { fill: url(#wsGrad); }
.ws-svg .dot { fill: #4ade80; stroke: var(--surf); stroke-width: 2; }
.ws-chart, .ws-bar, .ws-legend { display: none; }
.ws-chip { background: transparent; border-color: var(--border); color: var(--text2); }
.ws-chip.active { background: var(--surf2); border-color: rgba(74,222,128,.5); color: var(--text); }
.ws-card textarea, .ws-btnrow input { background: var(--bg2); border-color: var(--border); border-radius: 10px; }
.ws-preview { background: var(--bg2); border: 1px solid var(--border); }
.ws-flowcard { background: var(--surf); }
.ws-row { border-bottom-color: var(--border); }

/* ── Bosh sahifa: v3 uslubida tinchlantirilgan ko'rinish ── */
.hero-glow { background: radial-gradient(ellipse at 18% 22%, rgba(34,197,94,.10) 0%, transparent 58%); }
.hero-side-fx { display: none; }
.hero { padding-top: 120px; }
.hero-badge { background: transparent; border: 1px solid var(--border2); color: var(--text2); font-weight: 550; padding: 6px 14px; }
.hero h1 { font-weight: 700; letter-spacing: -.035em; line-height: 1.08; font-size: clamp(34px, 4.4vw, 56px); }
.hero-desc { color: var(--text2); font-size: 16px; line-height: 1.7; max-width: 520px; }
.hero-left { max-width: 600px; }
.hero-grid { max-width: 1240px; gap: 48px; }
.nav-cta { box-shadow: none; }

/* ── Ma'lumotlar bazasi ko'rinishi (jadvallar) ── */
.wsdb { display: grid; grid-template-columns: 230px 1fr; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surf); min-height: 460px; }
.wsdb-side { border-right: 1px solid var(--border); padding: 10px; background: var(--bg2); overflow-y: auto; }
.wsdb-sec { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); padding: 12px 10px 6px; }
.wsdb-tab { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; background: none; border: 1px solid transparent; color: var(--text2); font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.wsdb-tab:hover { background: var(--surf); color: var(--text); }
.wsdb-tab.active { background: var(--surf2); border-color: var(--border2); color: var(--text); }
.wsdb-ico { width: 16px; height: 16px; flex-shrink: 0; display: grid; place-items: center; opacity: .8; }
.wsdb-ico svg { width: 16px; height: 16px; }
.wsdb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.wsdb-cnt { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--bg3); border: 1px solid var(--border); color: var(--text2); }
.wsdb-main { min-width: 0; display: flex; flex-direction: column; }
.wsdb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.wsdb-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14.5px; }
.wsdb-title svg { width: 16px; height: 16px; opacity: .7; }
.wsdb-pill { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--bg3); border: 1px solid var(--border); color: var(--text2); font-weight: 500; }
.wsdb-tools { display: flex; align-items: center; gap: 8px; }
.wsdb-search { display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 34px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg2); color: var(--text3); }
.wsdb-search svg { width: 14px; height: 14px; }
.wsdb-search input { background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 13px; width: 150px; }
.wsdb-iconbtn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--bg2); color: var(--text2); cursor: pointer; }
.wsdb-iconbtn:hover { color: var(--text); border-color: var(--border2); }
.wsdb-iconbtn svg { width: 15px; height: 15px; }
.wsdb-iconbtn.add { background: var(--acc); border-color: var(--acc); color: #052e16; }
.wsdb-iconbtn.sm { width: 28px; height: 28px; border-radius: 8px; }
.wsdb-iconbtn.danger:hover { color: #f87171; border-color: rgba(248,113,113,.4); }
.wsdb-tablewrap { overflow: auto; flex: 1; }
.wsdb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wsdb-table th { position: sticky; top: 0; background: var(--surf); text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); font-weight: 600; color: var(--text); white-space: nowrap; }
.wsdb-table th span { margin-right: 6px; }
.wsdb-type { font-style: normal; font-size: 9.5px; font-weight: 600; letter-spacing: .04em; padding: 1px 5px; border-radius: 4px; background: var(--bg3); color: var(--text3); border: 1px solid var(--border); vertical-align: middle; }
.wsdb-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text2); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wsdb-table tbody tr:hover td { background: rgba(255,255,255,.025); }
.wsdb-table td.editable { cursor: text; }
.wsdb-table td.editable:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--border2); }
.wsdb-table td.saving { opacity: .5; }
.wsdb-cell-input { width: 100%; min-width: 100px; background: var(--bg2); border: 1px solid var(--acc2); border-radius: 6px; color: var(--text); font: inherit; padding: 4px 8px; outline: 0; box-shadow: 0 0 0 3px rgba(74,222,128,.12); }
.wsdb-act { width: 1%; white-space: nowrap; text-align: right; }
.wsdb-act .wsdb-iconbtn { display: inline-grid; margin-left: 4px; }
.wsdb-empty { padding: 56px 20px; text-align: center; color: var(--text3); }
.wsdb-foot { padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text3); }
.wsdb-form { padding: 16px 18px; max-width: 640px; }
@media (max-width: 900px) {
  .wsdb { grid-template-columns: 1fr; }
  .wsdb-side { border-right: 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 4px; }
  .wsdb-sec { width: 100%; padding: 6px 4px 2px; }
  .wsdb-tab { width: auto; }
}

/* ── Dashboard fon: mesh gradient + to'r + sekin harakatlanuvchi nurlar ── */
.dash-page { position: relative; background: #070a12; }
.dash-main { background: transparent !important; position: relative; z-index: 1; }
.sidebar { position: relative; z-index: 2; background: rgba(8,11,19,.78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.dash-page::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(55% 45% at 12% 8%, rgba(16,185,129,.22), transparent 62%),
    radial-gradient(48% 42% at 92% 4%, rgba(99,102,241,.22), transparent 62%),
    radial-gradient(60% 50% at 50% 108%, rgba(56,189,248,.14), transparent 60%),
    radial-gradient(40% 38% at 4% 96%, rgba(168,85,247,.14), transparent 60%),
    linear-gradient(180deg, #080b14 0%, #0a0e1a 100%);
}
.dash-page::after {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .9;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 0%, transparent 75%);
}
.dash-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.dash-orbs i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; will-change: transform; }
.dash-orbs i:nth-child(1) { width: 420px; height: 420px; left: 18%; top: 12%; background: rgba(16,185,129,.30); animation: orbA 26s ease-in-out infinite alternate; }
.dash-orbs i:nth-child(2) { width: 380px; height: 380px; right: 10%; top: 30%; background: rgba(99,102,241,.28); animation: orbB 32s ease-in-out infinite alternate; }
.dash-orbs i:nth-child(3) { width: 320px; height: 320px; left: 42%; bottom: -6%; background: rgba(56,189,248,.20); animation: orbC 29s ease-in-out infinite alternate; }
@keyframes orbA { to { transform: translate(120px, 90px) scale(1.15); } }
@keyframes orbB { to { transform: translate(-140px, -60px) scale(1.2); } }
@keyframes orbC { to { transform: translate(-90px, -110px) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .dash-orbs i { animation: none; } }

/* Kartalar fon ustida shishadek */
.bot-card, .chat-box, .token-box, .ws-card, .wsdb {
  background: rgba(14,18,28,.62);
  -webkit-backdrop-filter: blur(12px) saturate(130%); backdrop-filter: blur(12px) saturate(130%);
  border-color: rgba(255,255,255,.08);
}
.bot-card-click:hover { background: rgba(20,26,40,.7); border-color: rgba(74,222,128,.35); }

/* ── Bot sozlamalari yuqori tugmalari: aniq ko'rinadigan ── */
.ws-top .btn-sm {
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.24); color: #eef1f6;
  font-weight: 600; font-size: 13px; padding: 9px 16px; border-radius: 10px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ws-top .btn-sm:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); color: #fff; }
.ws-top .ws-open-tg { background: rgba(34,197,94,.16); border-color: rgba(74,222,128,.6); color: #86efac; }
.ws-top .ws-open-tg:hover { background: rgba(34,197,94,.26); border-color: #4ade80; color: #bbf7d0; }

/* ── Yon menyu: v3 qoidasi telefon drawer'ni buzmasin ── */
@media (min-width: 821px) { .sidebar { position: relative; z-index: 2; } }
@media (max-width: 820px) {
  .sidebar { position: fixed; z-index: 60; background: rgba(8,11,19,.97); }
}

/* ── Bot ishchi maydoni: telefon ── */
.ws-mtabs { display: none; }
.ws-save { margin-bottom: 14px; }
@media (max-width: 900px) {
  .dash-main { padding: 14px 12px 28px; }
  .ws-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; align-items: center; margin-bottom: 12px; }
  .ws-top .btn-sm { justify-content: center; text-align: center; }
  .ws-namebox { min-width: 0; }
  .ws-name { font-size: 17px; max-width: 100%; display: flex; align-items: center; gap: 6px; }
  .ws-name #editBotTitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ws-user { grid-column: 1 / -1; margin-left: 0; font-size: 12px; }
  .ws-top > .btn-sm:not(.ws-open-tg), .ws-top > .ws-open-tg { grid-column: auto; }
  .ws-top > button.btn-sm[onclick*="wsOpenHistory"] { grid-column: 1; }
  .ws-open-tg { grid-column: 2; }
  .ws-mtabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; position: sticky; top: 0; z-index: 20; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .ws-mtabs button { background: none; border: 0; color: var(--text2); font: inherit; font-weight: 600; font-size: 14px; padding: 11px; border-radius: 10px; cursor: pointer; }
  .ws-mtabs button.active { background: rgba(255,255,255,.12); color: #fff; }
  .ws-layout { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; gap: 12px; }
  .ws-layout[data-view="chat"] .ws-right { display: none; }
  .ws-layout[data-view="panel"] .chat-box { display: none; }
  .ws-layout .chat-box { height: calc(100vh - 230px); min-height: 420px; max-height: 720px; }
  .ws-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .ws-manage { grid-template-columns: minmax(0, 1fr); }
  .ws-item { padding: 9px 10px; }
  .ws-stats3 b { font-size: 24px; }
  .ws-stats3 > div { padding: 0 10px; }
  .wsdb { grid-template-columns: minmax(0, 1fr); }
  .wsdb-side { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--border); }
  .wsdb-sec { display: none; }
  .wsdb-tab { width: auto; flex-shrink: 0; }
  .wsdb-head { padding: 10px 12px; }
  .wsdb-search input { width: 110px; }
  .ws-suggest { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; }
  .ws-suggest .quick-chip { flex-shrink: 0; }
  .chat-input-row { position: sticky; bottom: 0; background: rgba(10,14,24,.92); }
  .chat-hero h2 { font-size: 18px; }
}

/* ── Telefon: bot ishchi maydoni sahifa scrollsiz, ichki scroll bilan ── */
@media (max-width: 900px) {
  #sec-edit[style*="block"] { display: flex !important; flex-direction: column; overflow: hidden; }
  #sec-edit > * { flex-shrink: 0; }
  #sec-edit > .ws-layout { flex: 1 1 auto; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); height: auto !important; }
  .ws-layout .chat-box { height: auto !important; min-height: 0 !important; max-height: none !important; }
  .ws-layout .ws-right { overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
  .dash-main { overflow-x: hidden; }
  .dash-page { overflow-x: hidden; }
}

/* ── Telefon: Bot yaratish sahifasi ixcham va ekranga sig'adi ── */
@media (max-width: 900px) {
  #sec-create .sec-header { margin-bottom: 6px; }
  #sec-create .sec-header h1 { font-size: 18px; }
  #createStepper { margin: 4px 0 10px; }
  #createStepper .step-label span { display: none; }
  #createStepper .step-label b { font-size: 11px; }
  #createStepper .step-circle { width: 26px; height: 26px; font-size: 12px; }
  #sec-create.fit-screen { display: flex !important; flex-direction: column; overflow: hidden; }
  #sec-create.fit-screen > * { flex-shrink: 0; }
  #sec-create.fit-screen > .create-layout { flex: 1 1 auto; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); height: auto !important; }
  #sec-create.fit-screen .chat-box { height: auto !important; min-height: 0 !important; max-height: none !important; }
  .chat-box.is-empty .chat-hero { padding: 16px 12px 6px; gap: 6px; }
  .chat-hero-orb { width: 42px; height: 42px; font-size: 22px; }
  .chat-hero p { font-size: 12.5px; }
  .chat-hero-grid { grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
  .chat-hero-grid button { padding: 9px 10px; font-size: 12px; gap: 7px; }
  .chat-hero-grid i { display: none; }
}

/* Markdown bandi: matn alohida ustun bo'lib, so'zlar bo'laklanmasin */
.chk-line .chk-txt { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.chk-line code, .md-p code { white-space: normal; overflow-wrap: anywhere; }

/* "Yangi kod tayyor" — ixcham qator */
.ws-save { padding: 12px 16px; margin-bottom: 12px; }
.ws-save-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ws-save-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.ws-save-txt span { font-size: 12.5px; color: var(--text2); }
.ws-save .btn-primary { white-space: nowrap; }
#sec-edit:has(#editSaveBox[style*="block"]) .ws-layout { height: calc(100vh - 262px); }
@media (max-width: 900px) {
  #sec-edit:has(#editSaveBox[style*="block"]) .ws-layout { height: auto; }
  .ws-save .btn-primary { width: 100%; }
}

/* Telefon: "Yangi kod tayyor" bir qatorli ixcham panel */
@media (max-width: 900px) {
  .ws-save { padding: 8px 10px; margin-bottom: 8px; }
  .ws-save-row { flex-wrap: nowrap; gap: 8px; }
  .ws-save-txt { flex: 1 1 auto; }
  .ws-save-txt b { font-size: 13px; }
  .ws-save-txt span { display: none; }
  .ws-save .btn-primary { width: auto; flex: 0 0 auto; padding: 9px 12px; font-size: 13px; }
}

.ws-savebtn { padding: 0 22px; height: 40px; border-radius: 10px; font-weight: 700; white-space: nowrap; }
.ws-btnrow input { height: 40px; }

/* Kredit paneli — chat kiritish maydoni ustida */
.credit-bar { display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 8px 10px 8px 14px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border); font-size: 13px; color: var(--text2); }
.credit-bar-ico { display: grid; place-items: center; color: var(--acc2); }
.credit-bar-ico svg { width: 16px; height: 16px; }
.credit-bar-text { flex: 1; min-width: 0; color: var(--text); font-weight: 550; }
.credit-bar-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; text-decoration: none; white-space: nowrap;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: var(--text); font-weight: 650; font-size: 13px; }
.credit-bar-btn svg { width: 14px; height: 14px; }
.credit-bar-btn:hover { background: rgba(255,255,255,.14); }
.credit-bar.low { border-color: rgba(251,191,36,.45); }
.credit-bar.low .credit-bar-ico { color: #fbbf24; }
.credit-bar.empty { border-color: rgba(248,113,113,.55); background: rgba(239,68,68,.08); }
.credit-bar.empty .credit-bar-ico { color: #f87171; }
.credit-bar.empty .credit-bar-btn, .credit-bar.low .credit-bar-btn { background: var(--acc); border-color: var(--acc); color: #052e16; }
@media (max-width: 900px) { .credit-bar { margin: 0 8px 6px; padding: 6px 8px 6px 10px; font-size: 12.5px; } .credit-bar-btn { padding: 6px 10px; } }

/* ── Xabar yuborish kompozeri (Telegram uslubida) ── */
.bc-card { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: rgba(10,14,22,.7); }
.bc-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.bc-head b { display: block; font-size: 14.5px; }
.bc-head small { font-size: 10.5px; letter-spacing: .08em; color: var(--text3); }
.bc-ava, .bc-msg-ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surf2); border: 1px solid var(--border2); color: var(--text); flex-shrink: 0; }
.bc-ava svg, .bc-msg-ava svg { width: 18px; height: 18px; }
.bc-wall { min-height: 150px; padding: 16px; display: flex; align-items: flex-start;
  background:
    radial-gradient(circle at 12% 20%, rgba(255,255,255,.18) 0 2px, transparent 3px) 0 0 / 46px 46px,
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.14) 0 1.5px, transparent 2.5px) 0 0 / 38px 38px,
    linear-gradient(135deg, #7fa684 0%, #a9c7a3 55%, #bcd3b1 100%); }
.bc-msg { display: flex; gap: 10px; align-items: flex-end; max-width: 100%; }
.bc-bubble { background: #fff; color: #111; border-radius: 14px 14px 14px 4px; padding: 9px 12px 18px; position: relative; min-width: 120px; max-width: 520px; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.bc-prevtext { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.bc-prevtext.empty { color: #888; font-style: italic; }
.bc-prevtext a { color: #2a7fd3; }
.bc-time { position: absolute; right: 10px; bottom: 4px; font-size: 11px; color: #888; }
.bc-prevbtns { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.bc-prevbtn { background: rgba(42,127,211,.12); color: #2a7fd3; text-align: center; border-radius: 8px; padding: 7px; font-size: 13px; font-weight: 600; }
.bc-editor { border: 1px solid rgba(56,189,248,.45); border-radius: 12px; margin: 14px; background: rgba(8,12,20,.8); }
.bc-toolbar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.bc-toolbar button { background: none; border: 0; color: var(--text2); width: 32px; height: 30px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px; }
.bc-toolbar button:hover { background: rgba(255,255,255,.08); color: var(--text); }
.bc-toolbar .bc-name { width: auto; padding: 0 8px; font-family: monospace; font-size: 12.5px; }
.bc-sep { width: 1px; height: 18px; background: var(--border2); margin: 0 6px; }
.bc-editor textarea { width: 100%; border: 0 !important; background: transparent !important; resize: vertical; min-height: 110px; padding: 12px; outline: 0; box-sizing: border-box; color: inherit; font: inherit; }
.bc-count { text-align: right; padding: 0 12px 8px; font-size: 11.5px; color: var(--text3); }
.bc-tip { padding: 0 16px 14px; font-size: 12.5px; color: var(--text3); }
.bc-tip code { background: var(--bg3); padding: 1px 6px; border-radius: 5px; }
.bc-sec { padding: 14px 4px; border-top: 1px solid var(--border); }
.bc-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.bc-sec-head span { font-size: 12.5px; color: var(--text3); }
.bc-add { width: 100%; margin-top: 8px; padding: 9px; border-radius: 10px; border: 1px dashed var(--border2); background: transparent; color: var(--text2); font: inherit; cursor: pointer; }
.bc-add:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.bc-dim { color: var(--text3); font-weight: 400; }
.bc-test { display: inline-block; margin-top: 8px; background: none; border: 0; color: var(--text2); font: inherit; cursor: pointer; padding: 6px 0; }
.bc-test:hover { color: var(--acc2); }
.bc-send { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.bc-send-btn { padding: 0 24px; height: 44px; border-radius: 12px; font-weight: 700; white-space: nowrap; margin-left: auto; }
.ws-chip.active { background: #1d8fe0; border-color: #1d8fe0; color: #fff; }

/* To'lovlar */
.pay-intro { text-align: center; padding: 28px 22px; }
.pay-star { font-size: 38px; }
.pay-text { max-width: 480px; margin: 0 auto 16px; color: var(--text2); font-size: 13.5px; line-height: 1.65; }
.pay-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ws-stats4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.ws-stats4 > div { padding: 0 14px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.ws-stats4 > div:first-child { padding-left: 0; border-left: 0; }
.ws-stats4 span { font-size: 11.5px; color: var(--text3); text-transform: uppercase; letter-spacing: .05em; }
.ws-stats4 b { font-size: 24px; letter-spacing: -.02em; }
.ws-stats4 small { color: var(--text3); font-size: 12px; }
.pay-rowbtns { display: flex; gap: 6px; }
.pay-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.pay-form select, .pay-form input { padding: 9px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); color: inherit; font: inherit; min-width: 0; }
.pay-form .ws-btnrow { margin-bottom: 8px; }
.pay-offer { margin-top: 14px; padding: 14px 16px; border: 1px solid rgba(251,191,36,.4); background: rgba(251,191,36,.07); border-radius: 14px; display: flex; flex-direction: column; gap: 10px; }
.pay-offer b { display: block; }
.pay-offer span { font-size: 12.5px; color: var(--text2); }
@media (max-width: 900px) { .ws-stats4 { grid-template-columns: 1fr 1fr; gap: 14px 0; } .ws-stats4 > div:nth-child(3) { padding-left: 0; border-left: 0; } }

/* A/B/C javob variantlari */
.answer-options { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: var(--text); font-size: 13.5px; cursor: pointer; white-space: normal; text-align: left; }
.opt-chip:hover { background: rgba(74,222,128,.12); border-color: rgba(74,222,128,.55); }
.opt-letter { font-style: normal; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0;
  background: rgba(74,222,128,.18); color: #86efac; font-weight: 700; font-size: 12.5px; }
.opt-other .opt-letter { background: rgba(255,255,255,.1); color: var(--text2); }

/* Xabar yuborish — ixcham, scrollsiz */
.bc2 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr); gap: 16px; align-items: start; }
.bc2-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bc2-editor { margin: 0; }
.bc2-editor textarea { min-height: 96px; max-height: 170px; }
.bc2-count { margin-left: auto; font-size: 11.5px; color: var(--text3); padding-right: 6px; }
.bc2-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.bc2-row span { font-size: 12px; color: var(--text3); flex: 1; }
.bc2-addlink { background: none; border: 0; color: var(--acc2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.bc2-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); }
.bc2-foot .ws-check { margin: 0; }
.bc2-foot .bc-test { margin: 0; }
.bc2-send { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.bc2-right { position: sticky; top: 0; }
.bc2-wall { min-height: 170px; }
#wsBtnRows .ws-btnrow { margin-top: 0; margin-bottom: 6px; }
@media (max-width: 1100px) { .bc2 { grid-template-columns: minmax(0, 1fr); } .bc2-right { position: static; order: -1; } .bc2-wall { min-height: 110px; } }

/* Ish maydoni: scroll paneli ko'rinmasin (g'ildirak/barmoq bilan baribir aylanadi) */
.ws-panel, .ws-right, .ws-list, .ws-detail, .ws-manage { scrollbar-width: none; }
.ws-panel::-webkit-scrollbar, .ws-right::-webkit-scrollbar, .ws-list::-webkit-scrollbar,
.ws-detail::-webkit-scrollbar, .ws-manage::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* Vositalar kartasi (AI nima qilgani) */
.tool-card { margin: 0 0 10px; border: 1px solid rgba(74,222,128,.28); border-radius: 12px; background: rgba(74,222,128,.05); overflow: hidden; }
.tool-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 13px; font-weight: 600; color: #bbf7d0; }
.tool-card > summary::-webkit-details-marker { display: none; }
.tool-card > summary b { color: #fff; }
.tool-card.running { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.04); }
.tool-card.running > summary { color: var(--text2); }
.tc-item { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-top: 1px solid rgba(255,255,255,.07); font-size: 12.5px; color: var(--text2); }
.tc-ok { width: 16px; text-align: center; color: #4ade80; flex-shrink: 0; font-weight: 700; }
.tc-rm { color: #f87171; }
.tc-file { font-family: ui-monospace, Consolas, monospace; color: var(--text); background: rgba(255,255,255,.07); padding: 1px 7px; border-radius: 6px; font-size: 12px; }
.tc-item code { background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 6px; }
.tc-spin { width: 12px; height: 12px; margin: 0 2px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: #4ade80; animation: tcspin .8s linear infinite; }
@keyframes tcspin { to { transform: rotate(360deg); } }

/* "Yozmoqda…" — javob kelguncha ko'rinadigan animatsion indikator */
.thinking { display: inline-flex; align-items: center; gap: 9px; padding: 4px 2px; color: var(--text2); font-size: 13.5px; }
.think-ring { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(74,222,128,.25); border-top-color: #4ade80; animation: tcspin .8s linear infinite; }
.think-dots { display: inline-flex; gap: 3px; }
.think-dots i { width: 5px; height: 5px; border-radius: 50%; background: #4ade80; opacity: .3; animation: thinkblink 1.2s ease-in-out infinite; }
.think-dots i:nth-child(2) { animation-delay: .2s; }
.think-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes thinkblink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Oqim — chiziqli xarita */
.wf-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 46px; padding: 8px 6px 18px; min-height: 300px; }
.wf-svg { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.wf-hint { font-size: 12.5px; color: var(--text3); margin-bottom: -30px; }
.wf-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 18px; position: relative; z-index: 1; }
.wf-node { width: 210px; background: var(--bg3); border: 1px solid var(--border2, rgba(255,255,255,.14)); border-radius: 14px; padding: 10px 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.wf-node:hover { border-color: rgba(74,222,128,.5); }
.wf-node.start { border-color: rgba(74,222,128,.7); box-shadow: 0 0 0 3px rgba(74,222,128,.12); }
.wf-node.sel { border-color: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.22); }
.wf-trig { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: #86efac; font-size: 13px; margin-bottom: 4px; }
.wf-txt { font-size: 12px; color: var(--text2); line-height: 1.4; white-space: pre-wrap; word-break: break-word; max-height: 70px; overflow: hidden; }
.wf-btns { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.wf-btn { font-size: 11.5px; padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); }
.wf-btn.link { background: rgba(74,222,128,.14); border-color: rgba(74,222,128,.4); color: #bbf7d0; }
.wf-orph-title { font-size: 12px; color: var(--text3); margin-top: -8px; }
.wf-orph .wf-node { opacity: .85; }
.wf-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; margin-top: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg2, #0d1424); }
.wf-bar-txt { font-size: 13px; color: var(--text2); }
.wf-bar-txt b { color: #86efac; font-family: ui-monospace, Consolas, monospace; }
.wsdb-desc { padding: 8px 18px; font-size: 12.5px; color: var(--text3); border-bottom: 1px solid var(--border); }
.wsdb-type { text-transform: none; }

/* O'zgarishlar tarixi */
#wsHistList { padding: 4px 22px 18px; }
.wh-day { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text3); padding: 14px 0 6px; }
.wh-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg3); }
.wh-title { font-weight: 600; font-size: 14px; }
.wh-new { font-size: 10.5px; font-weight: 600; color: #4ade80; background: rgba(74,222,128,.12); border-radius: 6px; padding: 1px 6px; margin-left: 6px; }
.wh-meta { font-size: 12px; color: var(--text3); margin-top: 2px; }
.wh-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.wh-after { font-size: 12px; color: var(--text3); }
.wh-chip { font-size: 12px; padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,.08); }
.wh-chip.add { background: rgba(74,222,128,.14); color: #bbf7d0; }
.wh-chip.rm { background: rgba(248,113,113,.14); color: #fecaca; }
.wh-chip.muted { opacity: .6; }
.wh-empty { padding: 26px 22px; display: flex; flex-direction: column; gap: 6px; color: var(--text2); font-size: 13.5px; }
.wh-empty b { color: var(--text); font-size: 15px; }

/* Telegram uslubidagi oldindan ko'rish */
.tgp { background: #0e1621; border-radius: 14px; padding: 12px; margin-top: 10px; }
.tgp-bubble { background: #182533; color: #e8eef5; border-radius: 12px 12px 12px 4px; padding: 9px 12px; font-size: 13px; line-height: 1.45; max-width: 92%; }
.tgp-kb { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; max-width: 92%; }
.tgp-row { display: flex; gap: 4px; }
.tgp-btn { flex: 1; text-align: center; background: rgba(82,136,193,.28); color: #cfe3f7; border-radius: 8px; padding: 6px 8px; font-size: 12.5px; }
.tgp-note { font-size: 11.5px; color: var(--text3); margin-top: 8px; text-align: center; }
.tc-name { color: var(--text); font-size: 12.5px; }

/* Fon qatlamlari kontent ORQASIDA bo'lsin (superadmin, to'lov va boshqa sahifalarda matn yopilib qolmasin) */
.dash-page::before, .dash-page::after, .dash-orbs { z-index: -1; }

/* Bosqichlar (1–4): chiroyli kartochkalar */
.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 900px; margin: 0 auto 22px; }
.stepper .step-line { display: none; }
.stepper .step-item { flex-direction: row; align-items: center; gap: 12px; width: auto; padding: 11px 14px; text-align: left;
  border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.03); position: relative; transition: border-color .2s, background .2s, box-shadow .2s; }
.stepper .step-circle { width: 32px; height: 32px; flex-shrink: 0; font-size: 13px; }
.stepper .step-item.active { border-color: rgba(74,222,128,.55); background: linear-gradient(135deg, rgba(74,222,128,.14), rgba(74,222,128,.04)); box-shadow: 0 0 0 3px rgba(74,222,128,.08); }
.stepper .step-item.active .step-circle { box-shadow: 0 0 14px rgba(74,222,128,.5); }
.stepper .step-item.done { border-color: rgba(74,222,128,.3); background: rgba(74,222,128,.06); }
.stepper .step-label b { font-size: 13px; }
.stepper .step-label span { font-size: 11px; display: block; margin-top: 2px; }
.stepper .step-item:not(:last-child)::after { content: ''; position: absolute; right: -13px; top: 50%; width: 12px; height: 2px; background: var(--border2); }
.stepper .step-item.done:not(:last-child)::after { background: rgba(74,222,128,.6); }
@media (max-width: 760px) {
  .stepper { gap: 6px; margin-bottom: 14px; }
  .stepper .step-item { flex-direction: column; gap: 6px; padding: 9px 4px; text-align: center; }
  .stepper .step-label span { display: none; }
  .stepper .step-label b { font-size: 11px; }
  .stepper .step-item:not(:last-child)::after { display: none; }
}

/* Chat ostidagi "Telegramda botni yaratish" paneli */
.managed-bar { flex-direction: column; gap: 6px; padding: 10px 16px 6px; border-top: 1px solid var(--border); }
.managed-bar .managed-cta { width: 100%; padding: 13px 16px; font-size: 15px; }
.managed-hint { font-size: 12px; color: var(--text3); text-align: center; }

/* Bot yaratish (desktop): bosqichlar o'ng burchakda ixcham, chat yuqoriga siljigan */
@media (min-width: 901px) {
  #sec-create { position: relative; }
  #sec-create .sec-header { margin-bottom: 14px; min-height: 44px; }
  #sec-create .stepper { position: absolute; top: 0; right: 0; width: 470px; max-width: 52%; margin: 0; gap: 6px; }
  #sec-create .stepper .step-item { padding: 6px 8px; gap: 7px; border-radius: 10px; }
  #sec-create .stepper .step-circle { width: 24px; height: 24px; font-size: 11.5px; }
  #sec-create .stepper .step-label b { font-size: 11.5px; white-space: nowrap; }
  #sec-create .stepper .step-label span { display: none; }
  #sec-create .stepper .step-item:not(:last-child)::after { display: none; }
  #sec-create .create-layout { height: calc(100vh - 150px); min-height: 520px; }
}

@media (min-width: 901px) {
  #sec-create .stepper { width: 500px; max-width: 56%; gap: 5px; }
  #sec-create .stepper .step-item { padding: 6px 7px; gap: 6px; }
  #sec-create .stepper .step-label b { font-size: 11px; }
}

/* Bot yaratish (desktop): sarlavhasiz; bosqichlar o'ng ustunda token paneli bilan bir xil kenglikda */
@media (min-width: 901px) {
  #sec-create { display: grid !important; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto minmax(0, 1fr);
    column-gap: 20px; row-gap: 12px; height: calc(100vh - 150px); min-height: 520px; position: static; }
  #sec-create > .sec-header { display: none; }
  #sec-create .stepper { position: static; grid-column: 2; grid-row: 1; width: 100%; max-width: none; margin: 0; gap: 6px; }
  #sec-create .stepper .step-item { flex-direction: column; justify-content: center; gap: 5px; padding: 8px 4px; text-align: center; min-width: 0; }
  #sec-create .stepper .step-circle { width: 26px; height: 26px; font-size: 12px; }
  #sec-create .stepper .step-label b { font-size: 10.5px; white-space: nowrap; }
  #sec-create .create-layout { display: contents; }
  #sec-create .create-layout > .chat-box { grid-column: 1; grid-row: 1 / span 2; height: auto; min-height: 0; }
  #sec-create .create-layout > #tokenBox { grid-column: 2; grid-row: 2; margin: 0; height: auto; min-height: 0; overflow-y: auto; }
}

/* Bot yaratish (desktop) — YAKUNIY: chat eng tepadan boshlanadi; yuqori panel va bosqichlar o'ng ustunda */
@media (min-width: 901px) {
  .dash-main:has(#sec-create) > .topbar { width: 452px; margin: -32px -32px 0 auto; border-bottom: 0; }
  #sec-create[style*="block"] { display: grid !important; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto minmax(0, 1fr);
    column-gap: 20px; row-gap: 12px; flex: 1 1 auto; min-height: 0; height: auto; margin-top: -50px; position: static; }
  #sec-create[style*="block"] > .sec-header { display: none; }
  #sec-create[style*="block"] > .stepper { position: static; grid-column: 2; grid-row: 1; width: 100%; max-width: none; margin: 50px 0 0; }
  #sec-create[style*="block"] .create-layout { display: contents; }
  #sec-create[style*="block"] .create-layout > .chat-box { grid-column: 1; grid-row: 1 / span 2; height: auto; min-height: 0; max-height: none; }
  #sec-create[style*="block"] .create-layout > #tokenBox { grid-column: 2; grid-row: 2; margin: 0; height: auto; min-height: 0; overflow-y: auto; }
}

/* Bot ishchi maydoni — to'liq ekran (Botable kabi): chap menyu va yuqori panel yashirinadi, "Orqaga" Botlarim'ga qaytaradi */
body:has(#sec-edit[style*="block"]) .sidebar,
body:has(#sec-edit[style*="block"]) .sidebar-backdrop { display: none !important; }
.dash-main:has(#sec-edit[style*="block"]) > .topbar { display: none; }
@media (min-width: 901px) {
  .dash-main:has(#sec-edit[style*="block"]) { padding: 14px 20px 16px; }
  #sec-edit[style*="block"] > .ws-layout { flex: 1 1 auto; min-height: 0; height: auto !important; }
  #sec-edit[style*="block"] > .ws-top { margin-bottom: 10px; }
}

/* Ish maydoni: AI chat kengroq */
@media (min-width: 901px) {
  .ws-layout { grid-template-columns: minmax(400px, 34%) minmax(0, 1fr); }
}

/* ── Ish maydoni AI chati: mijozga qulay, aniq dizayn ── */
.ws-layout .chat-box { background: rgba(13,17,27,.72); border-radius: 18px; }
.ws-layout .chat-header { padding: 14px 18px; }
.ws-layout .chat-header > span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.ws-layout .chat-title-col { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.ws-layout .chat-title-col b { font-size: 14.5px; font-weight: 700; }
.ws-layout .chat-title-col small { font-size: 11.5px; font-weight: 400; color: var(--text3); }

/* 1) Xabarlar: kattaroq, o'qish oson */
.ws-layout .chat-messages { padding: 18px 16px; gap: 16px; }
.ws-layout .msg { gap: 11px; }
.ws-layout .msg-avatar { width: 32px; height: 32px; border-radius: 10px; }
.ws-layout .msg.ai .msg-bubble { background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); border-radius: 4px 16px 16px 16px;
  padding: 12px 16px; font-size: 14.5px; line-height: 1.65; }
.ws-layout .msg.user .msg-bubble { background: linear-gradient(135deg, rgba(34,197,94,.26), rgba(34,197,94,.14)); border: 1px solid rgba(74,222,128,.35);
  border-radius: 16px 4px 16px 16px; padding: 11px 16px; font-size: 14.5px; line-height: 1.55; max-width: 88%; }
.ws-layout .msg-time { opacity: 0; transition: opacity .15s; }
.ws-layout .msg:hover .msg-time { opacity: 1; }
.ws-layout .msg-bubble .chk-line { margin: 5px 0; }

/* 2) Takliflar: bitta qatorda surib ko'riladigan tugmalar */
.ws-layout .ws-suggest { flex-wrap: nowrap; overflow-x: auto; padding: 8px 14px 6px; gap: 8px; scrollbar-width: none; }
.ws-layout .ws-suggest::-webkit-scrollbar { display: none; }
.ws-layout .ws-suggest .quick-chip { flex-shrink: 0; padding: 8px 14px; font-size: 12.5px; border-radius: 12px; background: rgba(255,255,255,.05); }
.ws-layout .ws-suggest .quick-chip:hover { background: rgba(74,222,128,.12); border-color: rgba(74,222,128,.5); color: #bbf7d0; }

/* 3) Yozish maydoni: bitta yaxlit karta, yuborish tugmasi ichida; kredit — ixcham */
.ws-layout .credit-bar { margin: 0 16px 6px; padding: 2px 2px; background: transparent; border: 0; font-size: 12px; color: var(--text3); }
.ws-layout .credit-bar-text { font-weight: 500; color: var(--text2); }
.ws-layout .credit-bar-btn { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.ws-layout .chat-input-row { position: relative; display: block; padding: 6px 14px 14px; border-top: 0; }
.ws-layout .chat-input-row #editChatInput { width: 100%; box-sizing: border-box; min-height: 74px; max-height: 180px; resize: none;
  padding: 14px 58px 14px 16px; font-size: 14.5px; line-height: 1.5; border-radius: 16px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); }
.ws-layout .chat-input-row #editChatInput:focus { border-color: rgba(74,222,128,.6); box-shadow: 0 0 0 3px rgba(74,222,128,.12); outline: 0; }
.ws-layout .chat-input-row .btn-send { position: absolute; right: 24px; bottom: 24px; width: 38px; height: 38px; border-radius: 12px; padding: 0; display: grid; place-items: center; }

/* Orqa fon (aurora + to'r) qaytarildi: asosiy rang html'da, body shaffof — fon qatlami kontent orqasida ko'rinadi */
html:has(body.dash-page) { background: #070a12; }
body.dash-page { background: transparent !important; }

/* Adminlar (Telegram ID) */
.adm-owner { padding: 10px 12px; border-radius: 12px; background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.25); font-size: 13.5px; margin-bottom: 8px; }
.adm-how { font-size: 13px; color: var(--text2); margin-bottom: 10px; }
.adm-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.adm-id-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.03); }
.adm-id-row code { font-weight: 700; }
.adm-id-row span { flex: 1; color: var(--text3); font-size: 12.5px; }
.adm-add { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 8px; }
.adm-add input { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 10px 12px; color: var(--text); font: inherit; min-width: 0; }
.adm-hint { font-size: 12px; color: var(--text3); margin-top: 8px; }
@media (max-width: 700px) { .adm-add { grid-template-columns: 1fr; } }

.adm-invite { padding: 14px; border-radius: 14px; border: 1px solid rgba(74,222,128,.3); background: rgba(74,222,128,.06); margin-bottom: 14px; }
.adm-invite-title { font-weight: 700; margin-bottom: 10px; }
.adm-invite-row { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-invite-row input { flex: 1 1 260px; min-width: 0; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 10px 12px; color: var(--text); font: inherit; }
.adm-list-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); margin: 4px 0 8px; }
.adm-manual { margin-top: 12px; }
.adm-manual summary { cursor: pointer; font-size: 13px; color: var(--text2); padding: 6px 0; }
.adm-manual .adm-add { margin-top: 8px; }

/* Superadmin: botlar statistikasi */
.sa-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.sa-search { flex: 1; max-width: 360px; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; color: var(--text); font: inherit; }
.sa-th { cursor: pointer; user-select: none; white-space: nowrap; }
.sa-th::after { content: attr(data-dir); margin-left: 6px; color: var(--acc2); }
.sa-row-click { cursor: pointer; }
.sa-row-click:hover { background: rgba(255,255,255,.04); }
.sa-modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(2,6,16,.7); backdrop-filter: blur(4px); align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.sa-modal { position: relative; width: min(860px, 100%); background: var(--bg2, #0d1424); border: 1px solid var(--border2, rgba(255,255,255,.14)); border-radius: 20px; padding: 26px 28px; }
.sa-modal-x { position: absolute; right: 14px; top: 10px; background: none; border: 0; color: var(--text2); font-size: 28px; cursor: pointer; }
.sa-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.sa-modal h2 { margin: 0 0 4px; font-size: 22px; }
.sa-modal h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin: 18px 0 10px; }
.sa-modal .sa-stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin-bottom: 8px; }
.sa-chart { background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.sa-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .sa-two { grid-template-columns: 1fr; } }

/* ── Yuqoridagi aylanib turuvchi yo'lak (test rejimi) ── */
:root { --banner-h: 0px; }
html.has-banner { --banner-h: 34px; padding-top: var(--banner-h); }
.site-banner { position: fixed; top: 0; left: 0; right: 0; height: var(--banner-h); z-index: 150; overflow: hidden;
  background: linear-gradient(90deg, #f59e0b, #f97316 50%, #f59e0b); color: #1c1200; display: flex; align-items: center;
  font-size: 13.5px; font-weight: 700; letter-spacing: .01em; box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.site-banner-track { display: flex; flex-shrink: 0; white-space: nowrap; animation: sbmarq 38s linear infinite; will-change: transform; }
.site-banner:hover .site-banner-track { animation-play-state: paused; }
.site-banner-item { display: inline-flex; align-items: center; gap: 10px; padding-right: 90px; }
.site-banner-item i { width: 18px; height: 18px; border-radius: 50%; background: #1c1200; color: #fbbf24; font-style: normal; font-size: 12px; display: grid; place-items: center; flex-shrink: 0; }
.site-banner-x { position: absolute; right: 0; top: 0; bottom: 0; width: 40px; border: 0; cursor: pointer; font-size: 22px; color: #1c1200;
  background: linear-gradient(90deg, transparent, #f59e0b 45%); }
@keyframes sbmarq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .site-banner-track { animation-duration: 120s; } }

/* yo'lak bor paytda sahifa elementlarini siljitish */
html.has-banner .navbar { top: var(--banner-h); }
html.has-banner .lang-switch.floating { top: calc(12px + var(--banner-h)); }
html.has-banner body.dash-page { height: calc(100vh - var(--banner-h)); }
html.has-banner .create-layout { height: calc(100vh - 180px - var(--banner-h)); }
@media (max-width: 900px) {
  html.has-banner body.dash-page { height: auto; min-height: calc(100vh - var(--banner-h)); }
  html.has-banner .topbar { top: var(--banner-h); }
  html.has-banner .sidebar { top: var(--banner-h); }
  html.has-banner .create-layout > .chat-box { height: calc(100vh - 250px - var(--banner-h)); height: calc(100dvh - 250px - var(--banner-h)); }
}
.site-banner-link { color: #1c1200; text-decoration: underline; text-underline-offset: 3px; font-weight: 800; }

/* ── Telefon: klaviatura ochilganda yozish maydoni DOIM ko'rinsin ── */
@media (max-width: 900px) {
  /* yuqoridagi yo'lak chat sarlavhasi va yopish tugmasini yopib qo'ymasin */
  body.chat-focus .site-banner { display: none; }
  .chat-box.chat-fs { z-index: 500; display: flex; flex-direction: column; max-height: 100dvh; overflow: hidden; }
  .chat-box.chat-fs .chat-header { flex: 0 0 auto; }
  .chat-box.chat-fs .chat-messages { flex: 1 1 0; min-height: 0; overflow-y: auto; }
  /* klaviatura ochiq paytda ortiqcha panellar joy yemasin */
  .chat-box.chat-fs .credit-bar,
  .chat-box.chat-fs .managed-bar,
  .chat-box.chat-fs .ws-suggest,
  .chat-box.chat-fs .quick-chips { display: none !important; }
  .chat-box.chat-fs .chat-input-row { flex: 0 0 auto; position: relative; bottom: auto; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Telefon: klaviatura ochiq chat — balandlik doim ko'rinadigan maydon (boshqa !important qoidalar bosib ketmasin) ── */
@media (max-width: 900px) {
  body.chat-focus .chat-box.chat-fs,
  body.chat-focus #sec-create.fit-screen .chat-box.chat-fs,
  body.chat-focus .ws-layout .chat-box.chat-fs {
    position: fixed !important; left: 0 !important; right: 0 !important;
    top: var(--vvt, 0px) !important;
    height: var(--vvh, 100dvh) !important; max-height: var(--vvh, 100dvh) !important; min-height: 0 !important;
  }
  body.chat-focus .chat-box.chat-fs .chat-hero { padding: 10px 12px 4px; flex: 1 1 0; min-height: 0; overflow-y: auto; }
  body.chat-focus .chat-box.chat-fs .chat-input-row { flex: 0 0 auto; }
}

/* ── Telefon (dashboard): test yo'lagi oqimda turadi, sarlavha (topbar) uning ostiga siljib qolmasin ── */
@media (max-width: 900px) {
  html.has-banner:has(body.dash-page) { padding-top: 0; }
  html.has-banner:has(body.dash-page) .site-banner { position: relative; }
  html.has-banner:has(body.dash-page) .topbar { top: 0; }
  html.has-banner:has(body.dash-page) .sidebar { top: 0; }
}

/* Token holati (BotFather'da almashtirilgan bo'lsa) */
.bot-status.bad { background: rgba(239,68,68,0.15); color: #ef4444; }
.bot-token-warn { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.45;
  background: rgba(239,68,68,0.10); color: var(--text2, inherit); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.bot-token-btn { padding: 6px 12px; font-size: 12.5px; }
.bot-token-link { float: right; cursor: pointer; text-decoration: underline; }


/* 📷 Reklama rasmi */
.bc-toolbar .bc-photo-btn { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 0 11px; color: var(--acc2);
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.45); border-radius: 8px; font-size: 12.5px; font-weight: 700; }
.bc-toolbar .bc-photo-btn:hover { background: rgba(34,197,94,.2); }
.bc-photo { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; padding: 8px 10px; border: 1px solid var(--border2); border-radius: 12px; background: var(--surf); }
.bc-photo img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; flex: none; }
.bc-photo-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bc-photo-info b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-photo-info span { font-size: 12px; color: var(--text2); }
.bc-photo-x { border: 0; background: transparent; color: var(--text2); font-size: 16px; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.bc-photo-x:hover { background: var(--surf2); color: #fff; }
.bc-previmg { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px 10px 4px 4px; margin-bottom: 6px; }

/* 🔔 Shablon yangilanishi (kabinet) */
.bot-update { margin-top: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; gap: 10px;
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.45); color: var(--acc2); transition: background .15s; }
.bot-update:hover { background: rgba(34,197,94,.2); }
.bot-update .bu-ico { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(34,197,94,.18); position: relative; }
.bot-update .bu-ico::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%;
  background: #22C55E; box-shadow: 0 0 0 2px #0f172a; animation: buPulse 1.8s ease-in-out infinite; }
.bot-update .bu-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.bot-update .bu-txt b { font-size: 13px; color: #fff; font-weight: 700; }
.bot-update .bu-txt small { font-size: 11.5px; color: var(--text2); font-weight: 500; }
.bot-update .bu-go { flex: none; padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 700; background: var(--acc); color: #04210f; }
.bot-rollback { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.4); color: #f3d9a4; }
.bot-rollback:hover { background: rgba(245,158,11,.16); }
.bot-rollback .bu-ico { background: rgba(245,158,11,.18); }
.bot-rollback .bu-ico::after { display: none; }
.bot-rollback .bu-go { background: rgba(245,158,11,.9); color: #2b1a00; }
@keyframes buPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .6; } }
.upd-notes { margin: 0 0 10px 18px; color: var(--text2); line-height: 1.7; font-size: 13.5px; }
.upd-hint { color: var(--text3); font-size: 12.5px; margin-bottom: 14px; }
.bot-rollback { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.4); color: #f3d9a4; }
.upd-actions { display: flex; gap: 10px; align-items: center; }


/* ── Shablon kartochkalari v3: hover'da kengaymaydi, hech narsa sakramaydi. Batafsil — bosganda oyna ── */
.templates-grid { align-items: stretch; }
.template-slot { height: auto; position: static; }
.template-slot .template-card { position: relative; top: auto; left: auto; right: auto; height: 100%; min-height: 250px; overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.template-slot .template-card:hover, .template-slot .template-card:focus-visible { z-index: auto; transform: translateY(-3px);
  border-color: rgba(74,222,128,.6); box-shadow: 0 14px 30px -14px rgba(0,0,0,.6), 0 0 0 1px rgba(34,197,94,.2); outline: none; }
.template-slot .template-card:focus-within { z-index: auto; }
.template-slot .template-card:hover .tpl-hint, .template-slot .template-card.open .tpl-hint { opacity: 1; height: auto; margin-bottom: 14px; overflow: visible; }
.template-slot .tpl-sum { margin: 0 0 8px; padding: 0 2px; font-size: 12.5px; line-height: 1.5; color: var(--text2); text-align: center;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3 * 1.5em; }
.template-slot .tpl-hint { margin-bottom: 14px; color: var(--acc2); font-weight: 600; }
.template-slot .btn-primary { margin-top: auto; }

.tpl-modal-overlay { animation: tplFade .16s ease; }
.tpl-modal { position: relative; max-width: 440px; width: calc(100% - 8px); padding: 30px 28px 22px; text-align: center; outline: none;
  background: linear-gradient(180deg, #14213a 0%, #0e1729 100%); border: 1px solid rgba(74,222,128,.28);
  border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 60px -26px rgba(34,197,94,.55); animation: tplPop .2s ease; }
.tpl-modal-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.06); color: var(--text2); font-size: 14px; line-height: 1; }
.tpl-modal-x:hover { background: rgba(255,255,255,.14); color: #fff; }
.tpl-modal-top { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 14px; }
.tpl-modal-top h3 { margin: 0; font-size: 19px; line-height: 1.3; color: #fff; }
.tpl-modal-ico { width: 64px; height: 64px; margin: 0; border-radius: 18px; display: grid; place-items: center; }
.tpl-modal-ico .ico { width: 1.7em; height: 1.7em; }
.tpl-modal-tag { font-size: 11.5px; font-weight: 700; color: var(--acc2); padding: 3px 10px; border-radius: 999px;
  background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); }
.tpl-modal-body { padding: 0; max-height: 46vh; overflow-y: auto; }
.tpl-full { margin: 0; font-size: 14px; line-height: 1.7; color: #cbd5e1; white-space: pre-line; text-align: left; }
.tpl-modal-foot { display: flex; flex-direction: column; gap: 6px; padding: 20px 0 0; margin: 18px 0 0; border-top: 1px solid rgba(255,255,255,.07); }
.tpl-modal-foot .tpl-use { width: 100%; height: 46px; border-radius: 12px; font-size: 14.5px; justify-content: center; }
.tpl-modal-foot .tpl-use:focus-visible { outline: 2px solid rgba(74,222,128,.55); outline-offset: 2px; }
.tpl-later { border: 0; background: transparent; color: var(--text3); font-size: 13px; padding: 8px; cursor: pointer; border-radius: 8px; }
.tpl-later:hover { color: #fff; background: rgba(255,255,255,.05); }
@keyframes tplFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tplPop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .tpl-modal { padding: 26px 18px 16px; } .template-slot .template-card { min-height: 230px; } }

/* ⭐ Telegram Stars belgisi (emoji o'rniga rasm) */
.ico-star { width: 1em; height: 1em; vertical-align: -0.14em; }
.pay-star .ico-star { width: 1.5em; height: 1.5em; }


/* 📱 Faqat telefonda: «Botni qanday ishga tushiramiz?» qutisi chatdan YUQORIDA ko'rinadi (bilinmay qolmasin).
   Kompyuterda joyi o'zgarmaydi (u yerda o'ng ustunda turadi). */
@media (max-width: 900px) {
  #sec-create .create-layout > #tokenBox { order: -1; margin: 0 0 14px; }
}

/* ── Hosting sahifasi ── */
.host-price-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.host-price { padding: 14px 16px; border: 1px solid rgba(148,163,184,.18); border-radius: 12px; background: rgba(24,36,57,.72); }
.host-price b { display: block; font-family: var(--ffd); font-size: 20px; color: #86efac; }
.host-price span { font-size: 12px; color: var(--text2); }
.host-price.ghost { background: transparent; border-style: dashed; }
.host-seg { display: inline-flex; padding: 4px; margin-bottom: 14px; border: 1px solid rgba(148,163,184,.22); border-radius: 12px; background: rgba(15,23,42,.55); }
.host-seg button { padding: 10px 22px; border: 0; border-radius: 9px; background: transparent; color: var(--text2); font: 600 14px var(--ffd); cursor: pointer; transition: background .15s, color .15s; }
.host-seg button.sel { background: #22c55e; color: #05150b; }
.host-seg button em { font-style: normal; font-size: 11px; font-weight: 700; margin-left: 6px; padding: 2px 6px; border-radius: 5px; background: rgba(5,21,11,.18); }
.host-seg button:not(.sel) em { background: rgba(34,197,94,.14); color: #86efac; }
.host-quick { display: flex; gap: 8px; flex-shrink: 0; }
.host-remind-back { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(2,6,23,.62); backdrop-filter: blur(3px); }
.host-remind { width: min(100%, 380px); padding: 22px; border: 1px solid rgba(251,191,36,.35); border-radius: 16px; background: #131f35; box-shadow: 0 24px 70px rgba(2,6,23,.6); text-align: center; }
.host-remind .hr-ico { font-size: 30px; margin-bottom: 6px; }
.host-remind h3 { margin: 0 0 12px; font-family: var(--ffd); font-size: 17px; }
.host-remind ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.host-remind li { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 10px; background: rgba(251,191,36,.08); font-size: 13px; }
.host-remind li span { font-size: 12px; color: #fbbf24; }
.host-remind .hr-btns { display: flex; gap: 8px; }
.host-remind .hr-go { flex: 1; padding: 11px; border-radius: 10px; background: #22c55e; color: #05150b; font-weight: 700; font-size: 14px; text-decoration: none; }
.host-remind .hr-later { flex: 1; padding: 11px; border-radius: 10px; border: 1px solid rgba(148,163,184,.3); background: transparent; color: var(--text); font-size: 14px; cursor: pointer; }
.host-quick .hq img, .host-go img { height: 22px; width: auto; max-width: 70px; object-fit: contain; display: block; }
.host-go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 18px; border: 1px solid rgba(148,163,184,.3); border-radius: 10px; background: rgba(30,41,59,.7); color: var(--text); font: 600 13px var(--ffd); cursor: pointer; }
.host-go:not([disabled]):hover { border-color: #22c55e; background: rgba(34,197,94,.12); }
.host-bot.locked { opacity: .78; cursor: default; }
.host-locked { font-size: 12px; color: var(--text2); white-space: nowrap; }
.host-help summary { cursor: pointer; color: #86efac; font-size: 12.5px; }
details.host-help { margin: 0 0 14px; font-size: 12.5px; }
@media (max-width: 760px) {
  .billing-heading p { display: none; }
  .billing-heading { margin-bottom: 12px; }
  .billing-heading h1 { font-size: 20px; margin-bottom: 0; }
  .billing-content { padding-bottom: 20px; }
  .host-seg { display: flex; margin-bottom: 10px; } .host-seg button { flex: 1; padding: 9px 8px; font-size: 13px; }
  .host-price-row { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
  .host-price { padding: 9px 8px; text-align: center; } .host-price b { font-size: 15px; } .host-price span { font-size: 10.5px; }
  .host-head { margin-bottom: 6px; } .host-h { font-size: 13.5px; }
  .host-all { padding: 6px 10px; font-size: 11.5px; }
  .host-list { gap: 6px; margin-bottom: 10px; }
  .host-bot { padding: 9px 11px; gap: 8px; row-gap: 8px; }
  .host-bot-name { font-size: 13px; } .host-bot-time { font-size: 11.5px; margin-top: 1px; }
  .host-quick { gap: 6px; } .host-quick .hq { flex: 1; justify-content: center; padding: 7px 8px; gap: 6px; }
  .host-quick .hq img { height: 18px; } .host-quick .hq i { font-size: 11.5px; }
  .host-locked { white-space: normal; }
  .host-pay { padding: 12px; } .host-total { font-size: 13px; margin-bottom: 8px; } .host-total b { font-size: 16px; }
  .host-btns { gap: 8px; flex-wrap: nowrap; } .host-btns .host-go { flex: 1; padding: 8px; }
}
.host-quick .hq { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; font: 700 13px var(--ffd); cursor: pointer; border: 1px solid rgba(148,163,184,.3); background: rgba(30,41,59,.7); color: var(--text); transition: transform .12s, border-color .15s, background .15s; }
.host-quick .hq i { font-style: normal; font-weight: 500; font-size: 12px; color: var(--text2); }
.host-quick .hq b { font-size: 15px; transition: transform .15s; }
.host-quick .hq:hover { transform: translateY(-1px); border-color: #22c55e; background: rgba(34,197,94,.12); }
.host-quick .hq:hover b { transform: translateX(3px); }
.host-quick .hq.click { border-color: rgba(34,197,94,.45); }
.host-quick button { padding: 6px 10px; border: 1px solid rgba(148,163,184,.3); border-radius: 8px; background: transparent; color: var(--text); font-size: 12px; cursor: pointer; white-space: nowrap; }
.host-quick button:hover { border-color: #22c55e; color: #86efac; }
@media (max-width: 760px) { .host-bot { flex-wrap: wrap; } .host-quick { width: 100%; } .host-quick button { flex: 1; } }
.host-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.host-head .host-h { margin: 0; }
.host-all { padding: 7px 13px; border: 1px solid rgba(148,163,184,.3); border-radius: 8px; background: transparent; color: var(--text); font-size: 12.5px; cursor: pointer; }
.host-all:hover { border-color: #22c55e; }
.host-m small { font-size: 10.5px; opacity: .8; }
.host-help { max-width: 760px; color: var(--text2); font-size: 13px; line-height: 1.65; margin: 0 0 20px; }
.host-h { font-family: var(--ffd); font-size: 15px; margin: 0 0 10px; }
.host-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.host-bot { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid rgba(148,163,184,.18); border-radius: 12px; background: rgba(24,36,57,.6); cursor: pointer; transition: border-color .15s, background .15s; }
.host-bot.sel { border-color: rgba(74,222,128,.45); background: rgba(34,197,94,.07); }
.host-bot input { width: 18px; height: 18px; accent-color: #22c55e; flex-shrink: 0; }
.host-bot-main { flex: 1; min-width: 0; }
.host-bot-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-bot-user { font-weight: 400; color: var(--text2); font-size: 12.5px; margin-left: 4px; }
.host-bot-time { font-size: 12.5px; color: var(--text2); margin-top: 3px; }
.host-bot-time.urgent { color: #fbbf24; }
.host-pay { padding: 18px; border: 1px solid rgba(148,163,184,.18); border-radius: 12px; background: rgba(15,23,42,.5); }
.host-months { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.host-m { padding: 7px 14px; border: 1px solid rgba(148,163,184,.25); border-radius: 8px; background: transparent; color: var(--text); font-size: 13px; cursor: pointer; }
.host-m.sel { border-color: #22c55e; background: rgba(34,197,94,.14); color: #86efac; }
.host-total { font-size: 15px; margin-bottom: 14px; }
.host-total b { color: #86efac; font-family: var(--ffd); font-size: 20px; }
.host-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.host-go[disabled] { opacity: .45; cursor: not-allowed; }
.host-unsel { margin-top: 12px; font-size: 12px; color: var(--text2); }
.host-note { padding: 13px 16px; border: 1px solid rgba(251,191,36,.35); border-radius: 10px; background: rgba(251,191,36,.07); font-size: 13.5px; margin-bottom: 14px; }
.host-note.ok { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.08); }
.bot-host-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; background: rgba(251,191,36,.12); color: #fbbf24; text-decoration: none; }
.bot-host-badge.off { background: rgba(239,68,68,.12); color: #f87171; }
@media (max-width: 760px) { .host-price-row { grid-template-columns: 1fr 1fr; } .host-bot { padding: 12px; gap: 10px; } .host-btns .btn { flex: 1; } }

/* ── Tarix tugmasi va «Qaytarish» ── */
.btn-sm svg { width: 14px; height: 14px; flex-shrink: 0; }
.ws-top .ws-hist-btn { padding: 7px 13px; border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--text); background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.35); transition: background .15s, border-color .15s, transform .12s; }
.ws-top .ws-hist-btn svg { color: #4ade80; width: 15px; height: 15px; }
.ws-top .ws-hist-btn:hover { background: rgba(34,197,94,.16); border-color: #22c55e; transform: translateY(-1px); }
.wh-undo { padding: 7px 12px; border-radius: 9px; font-weight: 600; color: #fbbf24; background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.35); white-space: nowrap; }
.wh-undo:hover { background: rgba(251,191,36,.16); border-color: #fbbf24; }

/* ── Botlarim: shablon orqali yaratish tugmalari ── */
.sec-actions { display: flex; align-items: center; gap: 10px; }
.btn-tpl { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 10px; border: 1px solid rgba(34,197,94,.4); background: rgba(34,197,94,.08); color: var(--text); font: 600 13px var(--ffd); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .12s; }
.btn-tpl:hover { background: rgba(34,197,94,.16); border-color: #22c55e; transform: translateY(-1px); }
.btn-tpl .ico { width: 15px; height: 15px; color: #4ade80; }
.cta-banner-btns { display: flex; align-items: center; gap: 10px; z-index: 1; flex-wrap: wrap; }
@media (max-width: 760px) { .cta-banner-btns { width: 100%; } .cta-banner-btns > * { flex: 1; justify-content: center; } .sec-actions { gap: 8px; } }

/* ── Shartnoma PDF tugmasi (to'lov bo'limi) ── */
.billing-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.btn-pdf { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 9px; border: 1px solid rgba(148,163,184,.3); background: rgba(30,41,59,.6); color: var(--text); font: 600 12.5px var(--ffd); cursor: pointer; transition: border-color .15s, background .15s; }
.btn-pdf svg { color: #f87171; }
.btn-pdf:hover { border-color: #22c55e; background: rgba(34,197,94,.1); }
@media (max-width: 760px) { .billing-actions { width: 100%; } .billing-actions .btn-pdf { flex: 1; justify-content: center; } }

/* ── «Chatga qaytish» tugmasi (telefon) ── */
.token-box .back-to-chat { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 14px; padding: 11px 14px; border: 1px solid rgba(34,197,94,.35); border-radius: 14px; background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(34,197,94,.04)); color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, transform .12s; }
.token-box .back-to-chat:active { transform: scale(.985); }
.back-to-chat .btc-ico { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: rgba(34,197,94,.18); color: #4ade80; }
.back-to-chat .btc-ico svg { width: 18px; height: 18px; }
.back-to-chat .btc-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.back-to-chat .btc-txt b { font: 700 14px var(--ffd); }
.back-to-chat .btc-txt small { font-size: 12px; color: var(--text2); }
.back-to-chat .btc-chat { color: var(--text2); display: grid; place-items: center; }
.back-to-chat .btc-chat svg { width: 18px; height: 18px; }

/* ── Telefon: token qutisi ko'ringanda chat quyida kichrayib qolmasin — butun ekran balandligida ── */
@media (max-width: 900px) {
  #sec-create:not(.fit-screen) .create-layout > .chat-box { height: calc(100vh - 84px); height: calc(100dvh - 84px); min-height: 520px; max-height: none; scroll-margin-top: 76px; }
  #sec-create:not(.fit-screen) .create-layout > .chat-box .chat-messages { flex: 1 1 auto; min-height: 220px; }
  #sec-create:not(.fit-screen) .create-layout > .chat-box .chat-input-row { flex-shrink: 0; }
}

/* ── Admin paneli: qidiruv va to'lovlar nazorati ── */
.sa-sbar { position: relative; display: flex; align-items: center; flex: 1 1 280px; max-width: 460px; min-width: 220px; background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.sa-sbar:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(34,197,94,.14); }
.sa-sbar .sa-sico { display: grid; place-items: center; width: 38px; color: var(--text3); }
.sa-sbar .sa-sico svg { width: 17px; height: 17px; }
.sa-sbar input { flex: 1; min-width: 0; padding: 11px 6px 11px 0; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 14px; }
.sa-sbar input::-webkit-search-cancel-button { display: none; }
.sa-sbar .sa-sclear { width: 30px; height: 30px; margin-right: 4px; border: 0; border-radius: 8px; background: transparent; color: var(--text2); font-size: 20px; line-height: 1; cursor: pointer; }
.sa-sbar .sa-sclear:hover { background: var(--surf2); color: var(--text); }
.sa-sbar .sa-skbd { margin-right: 10px; padding: 1px 7px; border: 1px solid var(--border2); border-radius: 6px; color: var(--text3); font: 600 11px var(--ff); }
.sa-sbar:focus-within .sa-skbd, .sa-sbar input:not(:placeholder-shown) ~ .sa-skbd { display: none; }
mark { background: rgba(250,204,21,.28); color: inherit; border-radius: 3px; padding: 0 1px; }
.sa-gwrap { position: relative; margin: 0 0 18px; }
.sa-gwrap .sa-sbar { max-width: 640px; flex-basis: 100%; }
.sa-gdrop { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; width: min(640px, 100%); max-height: 70vh; overflow: auto; background: var(--surf); border: 1px solid var(--border2); border-radius: 12px; box-shadow: 0 18px 50px rgba(2,6,23,.55); padding: 6px; }
.sa-ghead { padding: 8px 10px 4px; font: 700 11px var(--ffd); letter-spacing: .08em; text-transform: uppercase; color: var(--text3); }
.sa-gitem { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.sa-gitem:hover { background: var(--surf2); }
.sa-gitem small { color: var(--text2); font-size: 12px; }
.sa-gempty { padding: 14px; color: var(--text3); font-size: 13px; }
.sa-toolbar-wrap { flex-wrap: wrap; }
.sa-fsel { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--text3); }
.sa-fsel select { padding: 9px 10px; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 13px; }
.sa-chips { display: flex; gap: 10px; flex-wrap: wrap; margin: -14px 0 22px; }
.sa-chip { padding: 6px 12px; border: 1px solid var(--border2); border-radius: 999px; font-size: 12.5px; color: var(--text2); background: var(--surf); }
.sa-chip b { color: var(--text); margin-right: 4px; }
.sa-row-warn td { background: rgba(250,204,21,.05); }
.sa-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.sa-pager button[disabled] { opacity: .4; cursor: not-allowed; }
@media (max-width: 760px) { .sa-sbar { max-width: none; flex-basis: 100%; } .sa-skbd { display: none; } }

/* ── Tariflar: AI kredit sotib olish bo'limi ── */
.credit-title { margin: 38px 0 6px; font: 700 20px var(--ffd); }
.credit-sub { margin: 0 0 18px; color: var(--text2); font-size: 13.5px; }
.credit-grid .plan-card { min-height: 0; }
.credit-grid .plan-card h3 { min-height: 0; }

/* ── Tariflar: hosting sotib olish oynasi ── */
.host-buy-body { padding: 16px 20px 20px; overflow-y: auto; }
.host-buy-body .host-seg { display: flex; margin-bottom: 14px; }
.host-buy-body .host-seg button { flex: 1; }
@media (max-width: 760px) { .host-buy-body { padding: 12px 14px 16px; } }

/* ── Telefon: hosting oynasi pastdan chiqadigan ixcham varaq; hosting/kredit kartalari kichikroq ── */
@media (max-width: 760px) {
  #hostBuyModal { align-items: flex-end; padding: 0; }
  #hostBuyModal .modal-box { max-width: none !important; width: 100%; max-height: 88vh; max-height: 88dvh; border-radius: 18px 18px 0 0; border-bottom: 0; }
  #hostBuyModal .modal-head { padding: 12px 14px 10px; }
  #hostBuyModal .modal-head h2 { font-size: 15px; }
  #hostBuyModal .modal-close { width: 28px; height: 28px; }
  #hostBuyModal .host-buy-body { padding: 10px 12px 14px; }
  #hostBuyModal .host-seg { padding: 3px; margin-bottom: 10px; border-radius: 10px; }
  #hostBuyModal .host-seg button { padding: 8px 6px; font-size: 13px; border-radius: 8px; }
  #hostBuyModal .host-head { margin-bottom: 6px; }
  #hostBuyModal .host-h { font-size: 13px; }
  #hostBuyModal .host-all { padding: 5px 9px; font-size: 11.5px; }
  #hostBuyModal .host-list { gap: 6px; margin-bottom: 10px; }
  #hostBuyModal .host-bot { padding: 8px 10px; gap: 8px; row-gap: 4px; border-radius: 10px; flex-wrap: wrap; }
  #hostBuyModal .host-bot input { width: 16px; height: 16px; }
  #hostBuyModal .host-bot-name { font-size: 13px; }
  #hostBuyModal .host-bot-user { font-size: 11.5px; }
  #hostBuyModal .host-bot-time { font-size: 11px; margin-top: 1px; }
  #hostBuyModal .sa-status-badge { padding: 2px 8px; font-size: 10.5px; gap: 4px; }
  #hostBuyModal .host-locked { font-size: 11px; width: 100%; padding-left: 24px; }
  #hostBuyModal .host-pay { padding: 10px; border-radius: 10px; }
  #hostBuyModal .host-total { font-size: 12.5px; margin-bottom: 8px; }
  #hostBuyModal .host-total b { font-size: 15px; }
  #hostBuyModal .host-btns { gap: 8px; flex-wrap: nowrap; }
  #hostBuyModal .host-go { flex: 1; padding: 8px; gap: 6px; font-size: 12px; }
  #hostBuyModal .host-go img { height: 17px; }
  .credit-title { font-size: 17px; margin-top: 26px; }
  .credit-sub { font-size: 12.5px; margin-bottom: 12px; }
  .credit-grid { gap: 10px; }
  .credit-grid .plan-card { padding: 14px 16px; }
  .credit-grid .plan-card-head { margin-bottom: 8px; }
  .credit-grid .plan-card h3 { font-size: 15px; margin-bottom: 4px; }
  .credit-grid .plan-desc { font-size: 12.5px; margin-bottom: 8px; }
  .credit-grid .plan-price strong { font-size: 26px; }
  .credit-grid .plan-divider { margin: 10px 0; }
  .credit-grid .plan-features { gap: 6px; margin-bottom: 12px; }
  .credit-grid .plan-features li { font-size: 12.5px; }
  .credit-grid .plan-select-btn { padding: 11px 14px; font-size: 13.5px; }
}

/* ── Tariflar: TELEFONDA 3 toifa yorliqlar bilan va ixcham kartalar; kompyuterda hammasi ketma-ket (avvalgidek) ── */
.plan-tabs { display: none; }
.plan-panel-title { margin: 34px 0 6px; font: 700 20px var(--ffd); }
.credit-sub { margin-top: 2px; }
@media (max-width: 760px) {
  .plan-panel-title { display: none; }
  .plan-tabs { display: flex; gap: 6px; padding: 4px; margin: 0 -2px 12px; border: 1px solid var(--border2); border-radius: 12px; background: rgba(15,23,42,.55); overflow-x: auto; scrollbar-width: none; }
  .plan-tabs::-webkit-scrollbar { display: none; }
  .plan-tab { position: relative; flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text2); font: 600 12.5px var(--ffd); white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
  .plan-tab.sel { background: #22c55e; color: #05150b; }
  .plan-tab em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.1); }
  .plan-tab.sel em { background: rgba(5,21,11,.18); }
  .plan-tab .dot { width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.2); }
  .plan-tab .dot[hidden] { display: none; }
  .plan-tab-panel { display: none; }
  .plan-tab-panel.active { display: block; }
  .plans-grid.compact { grid-template-columns: 1fr; gap: 10px; }
  .plans-grid.compact .plan-card { min-height: 0; padding: 14px 16px; }
  .plans-grid.compact .plan-card-head { min-height: 0; margin-bottom: 8px; }
  .plans-grid.compact .plan-card h3 { min-height: 0; margin-bottom: 4px; font-size: 16px; }
  .plans-grid.compact .plan-desc { display: none; }
  .plans-grid.compact .plan-price { margin-bottom: 10px; }
  .plans-grid.compact .plan-price strong { font-size: 26px; }
  .plans-grid.compact .plan-divider { margin-bottom: 10px; }
  .plans-grid.compact .plan-features { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; }
  .plans-grid.compact .plan-features li { font-size: 11.5px; }
  .plans-grid.compact .plan-select-btn { height: 38px; font-size: 13px; }
}

/* Bot yaratish: «Telegramda botni yaratish» tugmasi tepada, oldindan ko'rish pastda */
.token-box > .preview-card { margin-top: 18px; }
.token-box > .back-to-chat + .create-choice-title { margin-top: 8px; }
