:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --text: #15202b;
  --muted: #5d6b78;
  --line: #e2e7eb;
  --primary: #0b7a8f;
  --primary-dark: #075f70;
  --primary-soft: #e3f3f6;
  --green: #18884a;
  --green-soft: #e3f4ea;
  --gold: #b07d12;
  --gold-soft: #fbf1db;
  --red: #c23a3a;
  --red-soft: #fbe6e6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 4px 16px rgba(16, 32, 48, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1418;
    --surface: #161e24;
    --text: #e7edf1;
    --muted: #93a2ae;
    --line: #26323b;
    --primary: #2bb3c9;
    --primary-dark: #4cc5d8;
    --primary-soft: #133038;
    --green: #3cc17a;
    --green-soft: #12301f;
    --gold: #e0b14a;
    --gold-soft: #33290f;
    --red: #ef6b6b;
    --red-soft: #3a1717;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2, .h2 { font-size: 1.4rem; }
.h3, h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
img, audio { max-width: 100%; }
audio { width: 100%; height: 40px; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 24px; padding-bottom: 48px; }
.narrow { max-width: 760px; margin: 0 auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.1rem; color: var(--muted); }
.inline { display: inline; }
.grow { flex: 1; }
section { margin-bottom: 40px; }

/* ---------- Header ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.15rem; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--primary); }
.logo-mark { display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 6px; background: var(--primary); border-radius: 8px; }
.logo-mark i { width: 3px; background: #fff; border-radius: 2px; }
.logo-mark i:nth-child(1) { height: 8px; } .logo-mark i:nth-child(2) { height: 16px; }
.logo-mark i:nth-child(3) { height: 11px; } .logo-mark i:nth-child(4) { height: 18px; }
.logo-mark i:nth-child(5) { height: 7px; }
.nav { display: flex; align-items: center; gap: 4px 14px; margin-left: auto; flex-wrap: wrap; }
.nav > a { color: var(--text); padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav > a:hover { text-decoration: none; color: var(--primary); }
.nav > a.active { border-color: var(--primary); color: var(--primary); }
.nav > a.btn { color: #fff; border: 0; padding: 7px 14px; }
.pill { background: var(--green-soft); color: var(--green); border-radius: 99px; padding: 1px 8px; font-size: .8rem; font-weight: 600; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 6px 2px; }
.link-btn:hover { color: var(--red); }
.langs { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: .8rem; }
.langs a { padding: 4px 8px; color: var(--muted); }
.langs a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.langs a:hover { text-decoration: none; }
.nav-toggle, .nav-burger { display: none; }

@media (max-width: 860px) {
  .nav-burger { display: block; margin-left: auto; width: 40px; height: 40px; cursor: pointer; position: relative; }
  .nav-burger span, .nav-burger span::before, .nav-burger span::after {
    position: absolute; left: 9px; width: 22px; height: 2px; background: var(--text); content: ""; border-radius: 2px;
  }
  .nav-burger span { top: 19px; } .nav-burger span::before { top: -7px; left: 0; } .nav-burger span::after { top: 7px; left: 0; }
  .topbar-inner { flex-wrap: wrap; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 0 0 12px; }
  .nav > a, .nav > form { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav > a.active { border-bottom-color: var(--line); }
  .nav > a.btn { text-align: center; margin: 10px 0; }
  .nav .langs { margin-top: 10px; align-self: flex-start; }
  .nav-toggle:checked ~ .nav { display: flex; }
}

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: #fff; border: 1px solid transparent; border-radius: 10px;
  padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 6px 12px; font-size: .875rem; border-radius: 8px; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--line); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: var(--red); filter: brightness(.92); }
.danger-text { color: var(--red); }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; }
input[type=file] { font-size: .9rem; max-width: 100%; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
label.check input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.form-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; flex-direction: row; }
.form-inline label { min-width: 120px; }
.form-inline.tight { flex-wrap: nowrap; }
.form-inline.tight input { width: 90px; min-height: 34px; padding: 4px 8px; }
fieldset { border: 1px solid var(--line); margin: 0; display: flex; flex-direction: column; gap: 14px; }
legend { font-weight: 700; font-size: 1.1rem; padding: 0 6px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .row-3 { grid-template-columns: 1fr; } }

/* ---------- Cards, layout ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 760px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; }
.more { white-space: nowrap; font-weight: 600; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.note { background: var(--primary-soft); border-radius: 10px; padding: 12px 14px; font-size: .925rem; margin: 0 0 12px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-weight: 500; }
.flash-ok { background: var(--green-soft); color: var(--green); }
.flash-err { background: var(--red-soft); color: var(--red); }
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; padding: 24px 0 16px; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
.eyebrow { color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-art { background: linear-gradient(135deg, var(--primary), var(--green)); border-radius: 24px; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; padding: 24px; }
.hero-wave { display: flex; align-items: center; gap: 4px; height: 60%; width: 100%; }
.hero-wave i { flex: 1; height: var(--h); background: rgba(255, 255, 255, .85); border-radius: 4px; animation: bounce 1.6s ease-in-out var(--d) infinite alternate; }
@keyframes bounce { from { transform: scaleY(.45); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .hero-wave i { animation: none; } }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero-art { aspect-ratio: 3/1; } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step p { color: var(--muted); margin: 0; }
.step-ico { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.famous-band { background: var(--gold-soft); margin-left: -16px; margin-right: -16px; padding: 28px 16px; border-radius: 20px; }

/* ---------- Voice card ---------- */
.voice-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.is-famous { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow); }
.vc-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.vc-title { min-width: 0; }
.vc-name { font-weight: 700; color: var(--text); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--primary); font-size: 1.1rem; }
.avatar.female { background: #b24a83; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }
.badge-famous { color: var(--gold); font-weight: 600; }
.badge-famous.big { display: inline-block; margin-top: 6px; background: var(--gold-soft); padding: 2px 10px; border-radius: 99px; }
.vc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: .8rem; color: var(--muted); }
.price { white-space: nowrap; color: var(--muted); font-size: .9rem; }
.price b { color: var(--text); font-size: 1.1rem; }

.player { display: flex; align-items: center; gap: 12px; }
.play-btn { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--primary); cursor: pointer; display: grid; place-items: center; }
.play-btn:hover { background: var(--primary-dark); }
.ico-play { width: 0; height: 0; border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 3px; }
.playing .ico-play { width: 12px; height: 14px; border: 0; margin: 0; border-left: 4px solid #fff; border-right: 4px solid #fff; }
.wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 36px; cursor: pointer; }
.wave i { flex: 1; background: var(--line); border-radius: 2px; min-width: 2px; }
.wave i.on { background: var(--primary); }
.player-lg .play-btn { width: 54px; height: 54px; }
.player-lg .wave { height: 56px; }

/* ---------- Voice page ---------- */
.voice-page { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .voice-page { grid-template-columns: 1fr; } }
.voice-main { display: flex; flex-direction: column; gap: 18px; }
.voice-main h1 { margin: 0 0 4px; }
.desc { white-space: pre-line; margin: 0; }
.ai-soon { background: var(--primary-soft); border-radius: 10px; padding: 12px 14px; margin: 0; font-size: .925rem; }
.order-box { position: sticky; top: 84px; }
.price-big { font-size: .95rem; color: var(--muted); margin-bottom: 12px; }
.price-big b { font-size: 2rem; color: var(--text); }
.total-row { display: flex; justify-content: space-between; font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.filters input[type=search] { flex: 2 1 220px; width: auto; }
.filters select { flex: 1 1 150px; width: auto; }

/* ---------- Auth ---------- */
.auth-card { max-width: 440px; margin: 16px auto; }

/* ---------- New voice ---------- */
.kind-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .kind-choice { grid-template-columns: 1fr; } }
.kind { flex-direction: row !important; align-items: center; gap: 10px !important; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; }
.kind:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.kind-famous:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.kind input { accent-color: var(--primary); width: 18px; height: 18px; flex: none; }
.famous-fields { display: flex; flex-direction: column; gap: 14px; border-left: 3px solid var(--gold); padding-left: 14px; }
.famous-fields[hidden] { display: none; }
.read-text { margin: 0; background: var(--bg); border-left: 4px solid var(--primary); border-radius: 8px; padding: 14px 16px; font-size: 1.05rem; line-height: 1.7; }
.recorder { display: flex; flex-direction: column; gap: 12px; }
.rec-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5a5a; }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--red); }
.upload-alt { color: var(--muted); font-weight: 400 !important; }

/* ---------- Dashboard ---------- */
.dash-top { display: grid; grid-template-columns: 280px 1fr; gap: 16px; margin-bottom: 32px; }
@media (max-width: 760px) { .dash-top { grid-template-columns: 1fr; } }
.balance { font-size: 2.4rem; font-weight: 800; color: var(--green); }
.balance-card p { margin: 8px 0 0; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .925rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--bg); }
tr:last-child td { border-bottom: 0; }
td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pos { color: var(--green); } .neg { color: var(--red); }
tr.blocked td { opacity: .6; }
.status { display: inline-block; border-radius: 99px; padding: 1px 10px; font-size: .8rem; font-weight: 600; background: var(--bg); color: var(--muted); white-space: nowrap; }
.status-approved, .status-delivered, .status-paid { background: var(--green-soft); color: var(--green); }
.status-pending { background: var(--gold-soft); color: var(--gold); }
.status-rejected, .status-cancelled { background: var(--red-soft); color: var(--red); }
.order { margin-bottom: 12px; padding: 0; }
.order summary { cursor: pointer; padding: 14px 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.order > :not(summary) { margin-left: 18px; margin-right: 18px; }
.order > :last-child { margin-bottom: 18px; }
.order .form { margin-bottom: 10px; }
.script pre { white-space: pre-wrap; font: inherit; background: var(--bg); padding: 12px; border-radius: 8px; max-height: 260px; overflow: auto; }

/* ---------- Admin ---------- */
.subnav, .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.subnav a, .chip { padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }
.subnav a.on, .chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.subnav a:hover, .chip:hover { text-decoration: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.stat:hover { text-decoration: none; }
.stat b { font-size: 1.8rem; color: var(--text); }
.stat.attention { border-color: var(--gold); }
.stat.attention b { color: var(--gold); }
.mod-card { margin-bottom: 16px; display: flex; flex-direction: column; gap: 14px; }
.mod-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mod-actions { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.consent-quote { margin-top: 6px; font-style: italic; }
.mod-card p { margin: 0; }
code { background: var(--bg); padding: 2px 6px; border-radius: 6px; font-size: .875rem; word-break: break-all; }

.rules li { margin-bottom: 12px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 20px 0; font-size: .875rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.tags { align-items: flex-start; }
@media (max-width: 640px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- AI ---------- */
.voice-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ai-box { border-color: var(--primary); display: flex; flex-direction: column; gap: 12px; }
.ai-box p { margin: 0; }
.ai-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ai-head h2 { margin: 0; }
.tts-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.api-hint { border-top: 1px solid var(--line); padding-top: 12px; }
.tag-ai { background: var(--primary-soft); color: var(--primary); border-color: transparent; font-weight: 600; }
.ai-check { align-items: flex-start !important; background: var(--primary-soft); padding: 12px; border-radius: 10px; }
.ai-check input { margin-top: 3px; }
.tts-result { display: flex; flex-direction: column; gap: 16px; }
.tts-result h1, .tts-result p { margin: 0; }
.new-key { border-color: var(--green); margin-bottom: 16px; }
.copy-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.copy-row code { flex: 1; padding: 10px; font-size: .9rem; }
.docs h2 { margin-top: 32px; }
.code { background: #0f1a20; color: #d7e6ec; padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: .85rem; line-height: 1.5; margin: 0 0 12px; }
.steps-list li { margin-bottom: 6px; }
.voice-col > section { margin-bottom: 0; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 36px; border: 0; background: none; cursor: pointer; font-size: 1.1rem; opacity: .45; border-radius: 8px; }
.pw-eye:hover, .pw-eye.on { opacity: 1; background: var(--primary-soft); }
.pw-match { font-weight: 600; min-height: 1.2em; }

/* ---------- Bolalar ovozi ---------- */
.kind-child:has(input:checked) { border-color: #7c5cd6; background: #efe9ff; }
.child-fields { display: flex; flex-direction: column; gap: 14px; border-left: 3px solid #7c5cd6; padding-left: 14px; }
.note-child { background: #efe9ff; color: #3d2a7a; }
.note-child ul { margin: 8px 0 0; padding-left: 20px; }
.note-child li { margin-bottom: 4px; }
.tag-child { background: #efe9ff; color: #5b3fc4; border-color: transparent; font-weight: 600; }
.minor-ok { font-size: .9rem; background: #efe9ff; padding: 10px; border-radius: 10px; align-items: flex-start !important; }
@media (prefers-color-scheme: dark) {
  .kind-child:has(input:checked), .note-child, .tag-child, .minor-ok { background: #2a2145; color: #d9ceff; }
}

/* ---------- Buyurtma: tekshirish va nizo ---------- */
.note-warn { background: var(--gold-soft); color: var(--text); }
.review-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
details.sub { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
details.sub > summary { cursor: pointer; font-weight: 600; }
details.sub .form { margin-top: 10px; }
.status-completed { background: var(--green-soft); color: var(--green); }
.status-disputed { background: var(--gold-soft); color: var(--gold); }
.status-refunded { background: var(--red-soft); color: var(--red); }
.status-delivered { background: var(--primary-soft); color: var(--primary); }
.resolve-options { display: flex; flex-direction: column; gap: 8px; }
.resolve-options .pct { width: 80px; min-height: 34px; padding: 4px 8px; }
.dispute-card { border-color: var(--gold); }

.voice-id { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--bg); border-radius: 10px; padding: 8px 12px; }
.voice-id code { font-size: 1rem; font-weight: 700; }

/* ---------- Namunalar ---------- */
.show-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.show-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.show-stage { aspect-ratio: 16 / 9; background: #000; }
.show-stage video, .show-stage iframe { width: 100%; height: 100%; display: block; border: 0; background: #000; }
.show-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.show-body h3, .show-body p { margin: 0; }
.show-hint { color: var(--primary); font-weight: 600; }
.show-variants { display: flex; flex-wrap: wrap; gap: 8px; }
.show-var { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 99px; padding: 6px 12px; font: inherit; font-size: .9rem; cursor: pointer; }
.show-var:hover { border-color: var(--primary); }
.show-var.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.show-var.kind-child.on { background: #7c5cd6; border-color: #7c5cd6; }
.show-kind { font-size: .72rem; opacity: .75; }
.show-order { align-self: flex-start; }
.show-home { margin-bottom: 40px; }
.mod-btns { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
@media (max-width: 400px) { .show-grid { grid-template-columns: 1fr; } }

.nav { gap: 4px 12px; }
.nav > a { font-size: .95rem; }
.show-order { white-space: normal; text-align: left; justify-content: flex-start; }

/* ---------- Retro: afsonaviy ovozlar va retro uslubi ---------- */
.kind-legend:has(input:checked) { border-color: #8a6a2f; background: #f6eedd; }
.kind-retro:has(input:checked) { border-color: #b5562a; background: #fbe9df; }
.legend-fields { display: flex; flex-direction: column; gap: 14px; border-left: 3px solid #8a6a2f; padding-left: 14px; }
.note-legend { background: #f6eedd; color: #4a3812; }
.note-legend ul { margin: 8px 0 0; padding-left: 20px; }
.note-legend li { margin-bottom: 4px; }
.note-retro { background: #fbe9df; color: #6b2e12; }
.badge-legend { color: #8a6a2f; font-weight: 600; }
.badge-legend.big { display: inline-block; margin-top: 6px; background: #f6eedd; padding: 2px 10px; border-radius: 99px; }
.badge-retro { color: #b5562a; font-weight: 600; }
.badge-retro.big { display: inline-block; margin-top: 6px; background: #fbe9df; padding: 2px 10px; border-radius: 99px; }
.is-legend { border-color: #8a6a2f; box-shadow: 0 0 0 1px #8a6a2f, var(--shadow); }
.is-legend .avatar { background: #8a6a2f; }
.is-retro { border-color: #d98a5c; }
.is-retro .avatar { background: #b5562a; }
.is-legend .recorder[data-field=sample] .rec-controls { display: none; }
.retro-hero { background: linear-gradient(135deg, #3b2a14, #8a6a2f); color: #fbf3e3; border-radius: 20px; padding: 28px; margin-bottom: 28px; }
.retro-hero h1 { color: #fff3da; }
.retro-hero p { color: #f0e0bd; margin: 0; max-width: 760px; }
.retro-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
@media (prefers-color-scheme: dark) {
  .kind-legend:has(input:checked), .note-legend, .badge-legend.big { background: #33280f; color: #f0dfb5; }
  .kind-retro:has(input:checked), .note-retro, .badge-retro.big { background: #3a2015; color: #f6cdb5; }
}
.tag-legend { background: #f6eedd; color: #8a6a2f; border-color: transparent; font-weight: 600; }
.tag-retro { background: #fbe9df; color: #b5562a; border-color: transparent; font-weight: 600; }

/* ---------- Merosxo'r bilan bog'lanish ---------- */
.lead-card { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; border-color: #8a6a2f; }
.lead-intro h3 { margin-top: 0; }
.lead-intro .btn-tg { margin: 4px 0 12px; }
@media (max-width: 760px) { .lead-card { grid-template-columns: 1fr; } }
.btn-tg { background: #229ed9; }
.btn-tg:hover { background: #1c88bb; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .row-2 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status-lead-new { background: var(--gold-soft); color: var(--gold); }
.status-lead-contacted { background: var(--primary-soft); color: var(--primary); }
.status-lead-agreed { background: var(--green-soft); color: var(--green); }
.status-lead-rejected { background: var(--red-soft); color: var(--red); }
.setup-notes .note { margin-bottom: 8px; }
.setup-notes { margin-top: 16px; }

.tg-actions { display: inline-flex; gap: 8px; margin-left: 8px; vertical-align: middle; flex-wrap: wrap; }
.tg-link-card { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.tg-link-card p { margin: 0; }

/* ---------- Bepul sinov ---------- */
.try-box { margin-bottom: 40px; border-color: var(--primary); display: flex; flex-direction: column; gap: 10px; }
.try-box p { margin: 0; }
.try-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.try-head h2 { margin: 0; }
.try-voices { display: flex; flex-wrap: wrap; gap: 8px; }
.try-voice { flex-direction: row !important; align-items: center; gap: 6px !important; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; cursor: pointer; font-weight: 400 !important; }
.try-voice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.try-voice input { accent-color: var(--primary); }
.try-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Foydalanish sohalari ---------- */
.uses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.use-card { display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.use-card:hover { text-decoration: none; border-color: var(--primary); }
.use-ico { font-size: 1.6rem; }
.uc-hero { padding: 8px 0 24px; max-width: 820px; }
.uc-points { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 6px; }
.faq-item { margin-bottom: 10px; padding: 14px 18px; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin: 10px 0 0; color: var(--muted); }
.footer-uses { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .875rem; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }

/* ---------- AI yordamchi ---------- */
.chat-fab { position: fixed; right: 16px; bottom: 16px; z-index: 50; border: 0; border-radius: 99px; padding: 12px 18px;
  background: var(--primary); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.chat-fab:hover { background: var(--primary-dark); }
.chat-panel { position: fixed; right: 16px; bottom: 16px; z-index: 51; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.22);
  display: flex; flex-direction: column; overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--primary); color: #fff; }
.chat-head-btns button { background: none; border: 0; color: #fff; font-size: 1.05rem; cursor: pointer; padding: 2px 6px; }
.chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; font-size: .92rem; line-height: 1.45; }
.chat-assistant { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 4px; }
.chat-user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-user a { color: #fff; }
.chat-typing { color: var(--muted); font-style: italic; }
.chat-error { background: var(--red-soft); color: var(--red); }
.chat-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.chat-sugg[hidden] { display: none; }
.chat-chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px; padding: 5px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.chat-chip:hover { border-color: var(--primary); color: var(--primary); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-form textarea { flex: 1; min-height: 40px; max-height: 120px; resize: none; padding: 8px 10px; font-size: .92rem; }
.chat-note { margin: 0; padding: 0 12px 10px; font-size: .72rem; color: var(--muted); }
@media print { .chat-fab, .chat-panel { display: none; } }

/* ---------- AI yordamchi: alohida fon va shrift ---------- */
.chat-panel, .chat-fab { font-family: 'Lora', Georgia, 'Times New Roman', serif; }
.chat-fab { background: linear-gradient(135deg, #0b7a8f, #18884a); font-size: 1rem; letter-spacing: .01em; }
.chat-fab:hover { background: linear-gradient(135deg, #075f70, #127039); }
.chat-panel { background: linear-gradient(180deg, #e3f1f3 0%, #eef6f1 100%); border-color: #b9dbe1; }
.chat-head { background: linear-gradient(135deg, #0b7a8f, #18884a); }
.chat-title { font-style: italic; font-weight: 600; font-size: 1.08rem; letter-spacing: .01em; }
.chat-msg { font-size: .97rem; line-height: 1.55; }
.chat-assistant { background: #ffffff; border: 1px solid #d6e7ea; box-shadow: 0 1px 2px rgba(16, 32, 48, .06); }
.chat-user { background: #0b7a8f; }
.chat-form { background: rgba(255, 255, 255, .7); border-top-color: #cfe3e7; }
.chat-form textarea { font-family: inherit; font-size: .97rem; }
.chat-chip { font-family: inherit; background: #ffffff; }
.chat-note { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: rgba(255, 255, 255, .7); padding-top: 2px; }
@media (prefers-color-scheme: dark) {
  .chat-panel { background: linear-gradient(180deg, #12282d 0%, #13241c 100%); border-color: #234047; }
  .chat-assistant { background: #1b2b31; border-color: #2a4047; color: var(--text); }
  .chat-form, .chat-note { background: rgba(0, 0, 0, .2); border-top-color: #234047; }
  .chat-chip { background: #1b2b31; }
}

/* ---------- Video yaratish ---------- */
.video-hero { text-align: center; padding: 28px 0 8px; }
.video-hero .lead { max-width: 720px; margin: 0 auto 18px; }
.video-hero .actions { justify-content: center; }
.tiers { margin-bottom: 24px; }
.tier { display: flex; flex-direction: column; gap: 6px; }
.tier .btn { margin-top: auto; }
.tier-icon { font-size: 2rem; }
.tier-standard { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft), var(--shadow); }
.tier-list { padding-left: 18px; margin: 4px 0 8px; }
.video-extra { margin-bottom: 28px; }
.video-extra ul { padding-left: 18px; }
.tier-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 700px) { .tier-choice { grid-template-columns: 1fr; } }
.tier-opt { flex-direction: row !important; align-items: flex-start; gap: 10px !important; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; }
.tier-opt span { display: flex; flex-direction: column; gap: 3px; font-weight: 400; }
.tier-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.video-estimate .price-big { margin: 0; }
.scene-grid { display: grid; grid-template-columns: 180px 1fr; gap: 16px; }
@media (max-width: 640px) { .scene-grid { grid-template-columns: 1fr; } }
.scene-img { display: flex; flex-direction: column; gap: 8px; }
.scene-img img { width: 100%; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; max-height: 220px; }
.scene-ph { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 110px; border: 2px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: .9rem; padding: 8px; }
.scene-text { display: flex; flex-direction: column; gap: 10px; }
.scene-new { opacity: .85; border-style: dashed; }
.scene { margin-bottom: 0; }
.bill { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.bill td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.bill td:last-child { text-align: right; white-space: nowrap; }
.bill-total td { border-bottom: 0; font-size: 1.1rem; padding-top: 10px; }
.video-result video { width: 100%; max-height: 72vh; background: #000; border-radius: 10px; display: block; margin: 0 auto 12px; }
.video-result video.video-9x16 { max-width: 420px; }
.video-result video.video-1x1 { max-width: 560px; }
.video-wait { text-align: center; padding: 32px 20px; }
.spinner { width: 42px; height: 42px; border: 4px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; margin: 0 auto 12px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scene-list { padding-left: 20px; }
.scene-list li { margin-bottom: 6px; }
.status-v-done { background: var(--green-soft); color: var(--green); }
.status-v-failed { background: var(--red-soft); color: var(--red); }
.status-v-queued, .status-v-rendering { background: var(--gold-soft); color: var(--gold); }
.status-v-draft, .status-v-script_ready { background: var(--primary-soft); color: var(--primary); }
.video-steps { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 26px; padding: 0; margin: 0 0 10px; color: var(--muted); }
.video-steps b { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: .8rem; margin-right: 6px; }
.video-create { max-width: 1000px; margin: 0 auto 28px; }
.big-label { font-size: 1.05rem; font-weight: 600 !important; }
.big-label textarea { font-size: 1rem; }
.mode-choice { margin-bottom: 14px; }
.tpl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.tpl { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: .88rem; }
.tpl:hover, .tpl.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.dur-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 16px; font-weight: 500; }
.seg input:checked + span { background: var(--primary); color: #fff; }
label.tier { cursor: pointer; position: relative; font-weight: 400; }
label.tier > input { position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; accent-color: var(--primary); }
label.tier:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow); background: linear-gradient(180deg, var(--primary-soft), var(--surface) 40%); }
.tier-standard { box-shadow: var(--shadow); border-color: var(--line); }
.tier-name { font-size: 1.15rem; }
.tier-badge { position: absolute; top: -11px; left: 16px; background: var(--primary); color: #fff; font-size: .75rem; font-weight: 600; padding: 2px 10px; border-radius: 99px; }
.tier-sample { width: 100%; max-height: 220px; border-radius: 8px; background: #000; }
.tier .price-big { margin: auto 0 0; }
.advanced summary { cursor: pointer; font-weight: 600; }
.advanced[open] summary { margin-bottom: 14px; }
.advanced .scene { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.center { text-align: center; }
.preview .scene-preview { padding-left: 22px; }
.scene-preview li { margin-bottom: 10px; }
.scene-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: 10px; }
.confirm-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-color: var(--primary); }
.confirm-box .price-big { margin: 2px 0; }
.inline-form { display: inline; }
.video-rate { margin-top: 6px; gap: 4px !important; align-items: center !important; }
.video-rate input { width: 70px !important; }
