:root {
  --bg: #f4f6f5;
  --card: #ffffff;
  --ink: #111816;
  --ink2: #5b6763;
  --line: #e3e8e6;
  --brand: #0f7a5a;
  --brand2: #14a37a;
  --brand-soft: #e5f4ee;
  --warn: #b7791f;
  --warn-soft: #fdf3e1;
  --bad: #c0392b;
  --bad-soft: #fbeaea;
  --bubble-in: #ffffff;
  --bubble-out: #dcf5e9;
  --r: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 22, .05), 0 4px 16px rgba(16, 24, 22, .05);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100dvh; touch-action: manipulation; overflow-x: hidden; overscroll-behavior: none; }
button, input, textarea, select { font: inherit; color: inherit; }
/* Экран үлкейіп-кішіреймейді: телефонда 16px-тен кіші өріске басқанда браузер өзі үлкейтеді — сондықтан өрістер 16px */
input, textarea, select, .input { font-size: 16px; }
img, video, svg, canvas { max-width: 100%; }
a { color: var(--brand); }
h1 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 6px; }
h2 { font-size: 20px; letter-spacing: -.01em; margin: 0 0 4px; }
h3 { font-size: 16px; margin: 0 0 8px; }
p { margin: 0 0 10px; line-height: 1.45; }
.muted { color: var(--ink2); }
.small { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }

/* кнопкалар */
.btn {
  appearance: none; border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 600; cursor: pointer;
  background: var(--brand); color: #fff; transition: transform .08s ease, opacity .15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.block { width: 100%; padding: 14px; font-size: 16px; }
.btn.ghost { background: var(--brand-soft); color: var(--brand); }
.btn.plain { background: transparent; color: var(--ink2); padding: 8px 10px; }
.btn.light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 14px;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* өрістер */
.input, textarea.input, select.input {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 14px; outline: none;
}
.input:focus { border-color: var(--brand2); box-shadow: 0 0 0 3px rgba(20, 163, 122, .15); }
textarea.input { resize: vertical; min-height: 70px; line-height: 1.4; }
label.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 6px 0; }
label.check input { width: 20px; height: 20px; accent-color: var(--brand); margin: 1px 0 0; flex: none; }

/* карточкалар */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }
.card.tint { background: var(--brand-soft); box-shadow: none; }
.card.warn { background: var(--warn-soft); box-shadow: none; }
.card.bad { background: var(--bad-soft); box-shadow: none; }
.badge { display: inline-block; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 600; background: #eef1f0; color: var(--ink2); }
.badge.green { background: var(--brand-soft); color: var(--brand); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }

/* бастау беті */
.welcome { max-width: 420px; margin: 0 auto; padding: 48px 20px 32px; min-height: 100dvh; display: flex; flex-direction: column; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 24px; letter-spacing: -.02em; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand2), var(--brand)); box-shadow: 0 6px 18px rgba(15, 122, 90, .35);
}
.logo-mark svg { width: 22px; height: 22px; }
.welcome .hero { margin: 40px 0 28px; }
.welcome .hero h1 { font-size: 30px; line-height: 1.15; }
.lang-switch { display: flex; gap: 6px; }
.lang-switch button { border: 0; background: transparent; color: var(--ink2); font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.lang-switch button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* онбординг */
.wizard { max-width: 640px; margin: 0 auto; padding: 18px 16px 120px; }
.wizard-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 22px; height: 5px; border-radius: 3px; background: #d6deda; }
.dots i.on { background: var(--brand2); }
.dots i.cur { background: var(--brand); width: 30px; }
.wizard-foot { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.wizard-foot .inner { max-width: 640px; margin: 0 auto; }
.tabs { display: flex; background: #e9eeec; border-radius: 12px; padding: 3px; gap: 3px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 10px; font-weight: 600; color: var(--ink2); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.qr-box { display: grid; place-items: center; padding: 18px; }
.qr-box canvas, .qr-box img { width: 220px; height: 220px; border-radius: 12px; background: #fff; padding: 10px; box-shadow: var(--shadow); }
.pair-code { font-size: 30px; font-weight: 800; letter-spacing: .12em; text-align: center; padding: 18px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); }
ol.steps { padding-left: 20px; margin: 0; line-height: 1.7; }
.progress { height: 10px; background: #e2e8e5; border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand2), var(--brand)); border-radius: 6px; transition: width .5s ease; }
.an-stages { list-style: none; padding: 0; margin: 16px 0 0; }
.an-stages li { display: flex; gap: 10px; align-items: center; padding: 7px 0; color: var(--ink2); }
.an-stages li.on { color: var(--ink); font-weight: 600; }
.an-stages li.ok { color: var(--brand); }
.an-stages li span.dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #cfd8d4; display: grid; place-items: center; font-size: 11px; flex: none; }
.an-stages li.ok span.dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.an-stages li.on span.dot { border-color: var(--brand2); animation: pulse 1s infinite alternate; }
@keyframes pulse { from { box-shadow: 0 0 0 0 rgba(20, 163, 122, .4); } to { box-shadow: 0 0 0 6px rgba(20, 163, 122, 0); } }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stats3 div { background: #fff; border-radius: 12px; padding: 12px; text-align: center; box-shadow: var(--shadow); }
.stats3 b { display: block; font-size: 22px; }

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.section-head .ok { color: var(--brand); font-weight: 600; font-size: 13px; }
.kv { white-space: pre-wrap; line-height: 1.45; }
.ptable { width: 100%; border-collapse: collapse; }
.ptable td { padding: 8px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.ptable td.price { white-space: nowrap; font-weight: 600; text-align: right; }

/* чат */
.bubbles { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: #eef2ef; border-radius: 14px; min-height: 120px; }
.bubble { max-width: 82%; padding: 9px 12px; border-radius: 14px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; box-shadow: 0 1px 1px rgba(0, 0, 0, .04); }
.bubble.in { background: var(--bubble-in); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.out { background: var(--bubble-out); align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble.owner { background: #e3ecff; }
.bubble.sys { align-self: center; background: transparent; box-shadow: none; color: var(--ink2); font-size: 12px; }
.bubble .meta { display: block; font-size: 11px; color: var(--ink2); margin-top: 3px; text-align: right; }
.bubble.draft { background: #fffbea; border: 1px dashed #e2c46b; align-self: flex-end; }
.composer { display: flex; gap: 8px; margin-top: 10px; }
.composer .input { border-radius: 22px; padding: 11px 16px; }
.composer .btn { border-radius: 22px; }

/* негізгі қосымша */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100dvh; }
.shell.with-sim { grid-template-columns: 220px 1fr 360px; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 4px; }
.side .logo { padding: 0 8px 18px; font-size: 20px; }
.navbtn { display: flex; gap: 10px; align-items: center; border: 0; background: transparent; padding: 11px 12px; border-radius: 12px; cursor: pointer; font-weight: 600; color: var(--ink2); text-align: left; position: relative; }
.navbtn svg { width: 20px; height: 20px; flex: none; }
.navbtn.on { background: var(--brand-soft); color: var(--brand); }
.navbtn .count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.main { padding: 22px 22px 100px; max-width: 900px; width: 100%; }
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.sim { background: #fbfcfb; border-left: 1px solid var(--line); padding: 16px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.sim h3 { display: flex; align-items: center; gap: 8px; }
.sim .card { padding: 12px; }
.mobile-nav { display: none; }

.segment { display: flex; background: #e9eeec; border-radius: 14px; padding: 4px; }
.segment button { flex: 1; border: 0; background: transparent; padding: 12px; border-radius: 11px; cursor: pointer; font-weight: 700; color: var(--ink2); }
.segment button.on { background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { background: #fff; border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 24px; letter-spacing: -.02em; margin-top: 4px; }
.tile span { color: var(--ink2); font-size: 13px; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); cursor: pointer; }
.list-item + .list-item { margin-top: 8px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #cfe9df, #a7d8c5); display: grid; place-items: center; font-weight: 700; color: var(--brand); flex: none; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; white-space: pre-wrap; }
.feed-item:first-child { border-top: 0; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd8d4; border-radius: 30px; transition: .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand2); }
.switch input:checked + span::after { transform: translateX(20px); }
.setting { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.setting:first-of-type { border-top: 0; }
.meter { height: 8px; border-radius: 4px; background: #e2e8e5; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand2); }
.meter.hot i { background: var(--warn); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; cursor: pointer; }
.plan.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 122, 90, .12); }
.plan b { font-size: 18px; display: block; margin: 4px 0; }
.plans.four { grid-template-columns: repeat(4, 1fr); }
.plan.enterprise { background: linear-gradient(135deg, #f0faf6, #fff); border-color: #bfe3d4; cursor: default; }
ul.features { margin: 0; padding-left: 0; list-style: none; }
ul.features li { padding: 6px 0 6px 26px; position: relative; line-height: 1.4; }
ul.features li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 14px; height: 8px; border-left: 2.5px solid var(--brand2); border-bottom: 2.5px solid var(--brand2); transform: rotate(-45deg); }
.script { white-space: pre-wrap; line-height: 1.5; background: #f7f9f8; border-radius: 12px; padding: 12px; margin: 8px 0; }
.ai-note { font-size: 12px; color: var(--warn); background: var(--warn-soft); padding: 6px 10px; border-radius: 8px; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #18211e; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 50; box-shadow: var(--shadow); }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.dark { border-color: rgba(0,0,0,.15); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.sim-fab { display: none; }

@media (max-width: 1180px) {
  .shell.with-sim { grid-template-columns: 220px 1fr; }
  .shell.with-sim .sim { position: fixed; right: 0; top: 0; width: min(380px, 100vw); z-index: 30; box-shadow: -10px 0 30px rgba(0,0,0,.1); transform: translateX(105%); transition: transform .25s; }
  .shell.with-sim .sim.open { transform: none; }
  .sim-fab { display: flex; position: fixed; right: 16px; bottom: 86px; z-index: 31; border-radius: 999px; box-shadow: 0 8px 24px rgba(15,122,90,.35); }
}
@media (max-width: 760px) {
  .shell, .shell.with-sim { display: block; }
  .side { display: none; }
  .main { padding: 16px 14px 110px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .plans, .plans.four { grid-template-columns: 1fr 1fr; }
  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 20;
  }
  .mobile-nav { overflow-x: auto; scrollbar-width: none; }
  .mobile-nav button { flex: 1 0 64px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--ink2); padding: 4px 0; cursor: pointer; position: relative; }
  .mobile-nav button svg { width: 22px; height: 22px; }
  .mobile-nav button.on { color: var(--brand); }
  .mobile-nav .count { position: absolute; top: 0; right: 22%; background: var(--bad); color: #fff; border-radius: 999px; font-size: 10px; padding: 0 5px; }
  .sim-fab { bottom: 84px; padding: 14px; }
  .sim-fab .fab-label { display: none; }
}

/* агенттер */
.agent {
  display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--r); padding: 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.agent.on { border-color: var(--brand); background: var(--brand-soft); }
.agent.free { cursor: default; }
.agent .tick {
  flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center;
  font-size: 13px; color: #fff; font-weight: 700;
}
.agent.on .tick { background: var(--brand); border-color: var(--brand); }
.agent-ic {
  flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
}
.agent-ic.sm { width: 30px; height: 30px; border-radius: 9px; }
.agent-ic.sm svg { width: 16px; height: 16px; }
.price-tag { text-align: right; white-space: nowrap; }
.price-tag b { display: block; }
.field > label { display: block; margin-bottom: 6px; }
.btn.soon { position: relative; }
.soon-tag {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #eef1f0; color: var(--ink2);
  font-size: 12px; font-weight: 600; vertical-align: middle;
}
.warn-text { color: var(--warn); }
.spend-row + .spend-row { margin-top: 10px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* кесте */
.cal-grid { padding: 10px; overflow-x: auto; }
.cal-wrap { display: grid; grid-template-columns: 46px repeat(7, minmax(92px, 1fr)); gap: 0; min-width: 700px; }
.cal-dh { height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: var(--ink2); }
.cal-dh b { font-size: 16px; color: var(--ink); }
.cal-dh.today b { background: var(--brand); color: #fff; border-radius: 999px; padding: 1px 8px; }
.cal-hours > div { font-size: 11px; color: var(--ink2); text-align: right; padding-right: 6px; transform: translateY(-6px); }
.cal-col { position: relative; border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 44px); }
.cal-col.today { background-color: #f7fbf9; }
.cal-ev {
  position: absolute; left: 3px; right: 3px; border: 0; border-radius: 8px; padding: 3px 6px; text-align: left; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 12px; overflow: hidden; line-height: 1.25;
}
.cal-ev.chat { background: #2f6fde; }
.cal-ev.done { opacity: .45; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); }
.cal-list { display: none; }
.cal-li { display: flex; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; align-items: center; }
.cal-li:first-of-type { border-top: 0; }
@media (max-width: 760px) { .cal-grid { display: none; } .cal-list { display: block; } }
.sheet-bg { position: fixed; inset: 0; background: rgba(10, 20, 16, .35); display: grid; place-items: end center; z-index: 50; }
.sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); position: relative; }
@media (min-width: 761px) { .sheet-bg { place-items: center; } .sheet { border-radius: 20px; } }
.sheet-x { position: absolute; right: 8px; top: 8px; }

/* әкімші панелі */
.client-row { display: block; width: 100%; text-align: left; border: 0; cursor: pointer; font: inherit; color: inherit; }
.client-row:hover { box-shadow: 0 0 0 1.5px var(--brand); }
.sheet.wide { max-width: 760px; max-height: 92dvh; overflow-y: auto; }
.row > .field { flex: 1; min-width: 0; }

/* ---------- Әкімші: клиент карточкасы (cc) ---------- */
.sheet.wide { max-width: 980px; padding: 0 0 calc(18px + env(safe-area-inset-bottom)); background: var(--bg); }
.sheet.wide .sheet-x { z-index: 2; color: #cfe7dc; }
.cc { --forest: #0d3b2e; --forest2: #145240; --mint: #9fe3c6; --gold: #e2b24a; padding: 0; }
.cc > * + * { margin-top: 0; }
.cc .num, .cc-fuel-num, .cc-t-price b, .cc-t-stub b { font-variant-numeric: tabular-nums; }

.cc-hero { background: var(--forest); color: #fff; padding: 26px 24px 22px; display: grid; grid-template-columns: 1fr minmax(260px, 340px); gap: 22px; align-items: end; border-radius: 20px 20px 0 0; }
.cc-id { display: flex; gap: 16px; align-items: center; min-width: 0; }
.cc-mono { flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 24px; font-weight: 800; letter-spacing: -.02em;
  color: var(--forest); background: var(--mint); }
.cc-hero h2 { font-size: 26px; line-height: 1.1; letter-spacing: -.02em; margin: 0; overflow-wrap: anywhere; }
.cc-sub { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: #b9d6ca; }
.cc-sub a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); }
.cc-sub a:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.cc-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cc-flag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: #cfe7dc; }
.cc-flag.on { background: rgba(159,227,198,.16); color: var(--mint); }
.cc-flag.on::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-right: 6px; vertical-align: 1px; }
.cc-flag.off { color: #f3c9a1; }
.cc-flag.gold { background: rgba(226,178,74,.18); color: var(--gold); }

.cc-fuel { background: var(--forest2); border-radius: 16px; padding: 14px 16px 12px; }
.cc-fuel-label { font-size: 13px; color: #b9d6ca; }
.cc-fuel-num { margin-top: 2px; white-space: nowrap; }
.cc-fuel-num b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.cc-fuel-num span { font-size: 16px; color: #b9d6ca; }
.cc-cells { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; margin-top: 10px; }
.cc-cells i { height: 14px; border-radius: 3px; background: rgba(255,255,255,.10); }
.cc-ok .cc-cells i.lit { background: var(--mint); }
.cc-warn .cc-cells i.lit { background: #f0c05a; }
.cc-bad .cc-cells i.lit { background: #f08a7e; }
.cc-fuel-foot { margin-top: 8px; font-size: 12px; color: #b9d6ca; }

.cc-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 16px 18px 4px; }
.cc-ticket { position: relative; background: #fff; border-radius: 14px; padding: 14px 16px 12px; box-shadow: 0 1px 0 var(--line);
  border: 1px solid var(--line); overflow: hidden; }
.cc-ticket.cc-on { border-color: #bfe3d3; }
.cc-ticket.cc-ended { border-color: #f0d6ad; }
.cc-ticket.cc-none { background: #fafbfb; }
.cc-t-top { display: flex; align-items: center; gap: 6px; min-height: 30px; }
.cc-t-top b { flex: 1; font-size: 15px; }
.cc-t-price { font-size: 13px; color: var(--ink2); }
.cc-t-price b { font-size: 18px; color: var(--ink); }
.cc-t-meta { font-size: 12px; color: var(--ink2); margin-top: 2px; }
/* билеттің жыртылатын жері: пунктир + екі жақтағы ойық */
.cc-t-stub { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin: 12px -16px 0; padding: 10px 16px 0; border-top: 1.5px dashed var(--line); position: relative; }
.cc-t-stub::before, .cc-t-stub::after { content: ''; position: absolute; top: -8px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.cc-t-stub::before { left: -8px; } .cc-t-stub::after { right: -8px; }
.cc-on .cc-t-stub b { color: var(--brand); }
.cc-t-bar { height: 4px; border-radius: 4px; background: #e8efec; margin-top: 8px; overflow: hidden; }
.cc-t-bar i { display: block; height: 100%; background: var(--brand2); border-radius: 4px; }

.cc-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; padding: 12px 18px 0; align-items: start; }
.cc-col > .card + .card { margin-top: 12px; }
.cc-manage, .cc-history { margin: 12px 18px 0; background: #fff; border-radius: 16px; padding: 16px 18px; border: 1px solid var(--line); }
.cc-manage h3, .cc-history h3 { margin-bottom: 6px; }
.cc-manage > .card { box-shadow: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0 4px; margin: 0; }
.cc-act { border-top: 1px solid var(--line); padding: 4px 0; }
.cc-act summary { cursor: pointer; padding: 10px 0; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.cc-act summary::-webkit-details-marker { display: none; }
.cc-act summary::before { content: '+'; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; flex: none; }
.cc-act[open] summary::before { content: '−'; }
.cc-act summary:focus-visible { outline: 2px solid var(--brand2); outline-offset: 2px; border-radius: 6px; }
.cc-act > div, .cc-act > textarea { padding-bottom: 10px; }
.cc-priv { display: flex; gap: 12px; align-items: flex-start; border-top: 1px solid var(--line); padding: 14px 0; cursor: pointer; }
.cc-priv input { width: 20px; height: 20px; accent-color: #b8860b; margin: 2px 0 0; flex: none; }
.cc-priv span { display: grid; gap: 2px; } .cc-priv small { color: var(--ink2); font-size: 13px; }

.cc-timeline { list-style: none; margin: 4px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); }
.cc-timeline li { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 6px 0; font-size: 13px; }
.cc-timeline li::before { content: ''; position: absolute; left: -22px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--ink2); }
.cc-timeline li.cc-t-plus::before { border-color: var(--brand2); background: var(--brand-soft); }
.cc-timeline li.cc-t-minus::before { border-color: var(--bad); }
.cc-timeline time { color: var(--ink2); font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .cc-hero { grid-template-columns: 1fr; padding: 22px 18px 18px; border-radius: 20px 20px 0 0; }
  .cc-grid { grid-template-columns: 1fr; padding: 12px 12px 0; }
  .cc-packs { padding: 14px 12px 0; grid-template-columns: 1fr 1fr; }
  .cc-manage, .cc-history { margin: 12px 12px 0; }
  .cc-timeline li { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 420px) { .cc-packs { grid-template-columns: 1fr; } .cc-fuel-num b { font-size: 30px; } }
.cc-hero { padding-right: 56px; }
.cc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cc-stat { background: #fff; padding: 10px 12px; display: grid; align-content: start; gap: 1px; min-width: 0; }
.cc-stat b { font-size: 22px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cc-stat span { font-size: 13px; color: var(--ink); }
.cc-stat small { font-size: 12px; color: var(--ink2); overflow-wrap: anywhere; }
.cc-stat.warn b { color: var(--warn); }
@media (max-width: 760px) { .cc-hero { padding-right: 18px; padding-top: 44px; } }
.cc-stats { gap: 0; background: #fff; }
.cc-stat { box-shadow: 1px 1px 0 var(--line); }
.cc-stats { border: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cc-stat { box-shadow: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cc-t-dates { align-items: flex-end; }
.cc-t-dates > div { display: grid; gap: 1px; }
.cc-t-dates small { font-size: 11px; color: var(--ink2); }
.cc-t-dates b { font-size: 14px; }
.cc-t-bar i.soon { background: var(--warn); }
.cc-t-left { font-size: 12px; color: var(--ink2); margin-top: 4px; text-align: right; }
.cc-pa { border-top: 4px solid var(--brand2); }
.cc-pa-know { border-left: 3px solid var(--brand-soft); padding-left: 10px; }
.cc-ext { padding: 4px 18px 6px; }
.cc-ext > .tiles, .cc-ext > .card { margin-top: 12px; }
.sheet.wide:has(.cc-ext) .sheet-x { color: var(--ink2); }

/* Карточка: қойындылар және «Қуат неге жұмсалды» */
.cc-tabs { display: flex; gap: 6px; padding: 16px 18px 0; overflow-x: auto; scrollbar-width: none; }
.cc-tabs button { flex: none; border: 1px solid var(--line); background: #fff; color: var(--ink2); border-radius: 999px; padding: 9px 16px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.cc-tabs button.on { background: var(--forest, #0d3b2e); border-color: transparent; color: #fff; }
.cc-tabs button:focus-visible { outline: 2px solid var(--brand2); outline-offset: 2px; }
.cc-tab-badge { background: var(--warn); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.cc-panel { padding: 12px 18px 0; }
.cc-panel > .cc-manage, .cc-panel > .cc-history { margin: 0; }
.cc-spend { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: grid; gap: 18px; }
.cc-spend-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.cc-spend-total { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.cc-spend-list { display: grid; gap: 14px; }
.cc-spend-row { display: grid; gap: 5px; }
.cc-bar { height: 10px; border-radius: 6px; background: #edf2f0; overflow: hidden; }
.cc-bar i { display: block; height: 100%; border-radius: 6px; background: var(--brand2); }
.cc-days { height: 90px; display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; align-items: end; border-bottom: 1px solid var(--line); }
.cc-days i { display: block; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; }
.cc-days i.zero { background: #e3e9e6; }
.cc-quote { display: grid; gap: 4px; background: var(--brand-soft); border-radius: 12px; padding: 10px 12px; }
.cc-quote:empty { display: none; }
.cc-quote-sum { border-top: 1px solid #bfe3d3; padding-top: 6px; margin-top: 2px; }
@media (max-width: 760px) { .cc-tabs { padding: 14px 12px 0; } .cc-panel { padding: 12px 12px 0; } .cc-spend-total { font-size: 28px; } }
.cc-manage > .cc-act:first-child { border-top: 0; }
@media (max-width: 760px) {
  .cc-packs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
  .cc-ticket { flex: 0 0 236px; scroll-snap-align: start; }
}
.cc-last { margin: 8px 0 0; font-size: 13px; color: #b9d6ca; }
.cc-last b { color: #fff; font-weight: 600; }
.cc-t-used { font-size: 12px; color: var(--ink2); margin-top: 4px; }
.cc-t-used.none { color: #a9b3b0; }

/* Көмекшімен хаты — клиент карточкасында */
.cc-chat { margin: 12px 18px 0; background: #fff; border-radius: 16px; padding: 14px 16px; border: 1px solid var(--line); display: grid; gap: 10px; }
.cc-chat-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; padding: 4px 2px; background: #F4F2EE; border-radius: 12px; padding: 12px; }
.cc-chat-day { align-self: center; font-size: 12px; color: var(--ink2); background: #fff; border-radius: 999px; padding: 2px 10px; margin: 6px 0 2px; }
.cc-msg { max-width: 82%; border-radius: 14px; padding: 8px 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.cc-msg-out { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cc-msg-in { align-self: flex-end; background: #DCF3D6; border-bottom-right-radius: 4px; }
.cc-msg-held { align-self: flex-start; background: transparent; border: 1px dashed #C9C4BA; color: var(--ink2); border-bottom-left-radius: 4px; }
.cc-msg-meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--ink2); margin-bottom: 2px; }
.cc-msg-meta time { margin-left: auto; font-variant-numeric: tabular-nums; }
.cc-msg-why { font-size: 12px; margin-top: 4px; color: #9A5B00; }
.cc-chat-pause { font-size: 13px; background: #FFF4DB; border: 1px solid #F1D79A; border-radius: 10px; padding: 8px 12px; }
/* Монтаждар: бастапқы видео ↔ ИИ монтажы қатар */
.cc-mont { display: flex; flex-direction: column; gap: 14px; }
.cc-mont-job { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--card); display: flex; flex-direction: column; gap: 8px; }
.cc-mont-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .cc-mont-pair { grid-template-columns: 1fr; } }
.cc-mont-media { margin: 4px 0 8px; }
.cc-mont-media video, .cc-mont-media img { width: 100%; max-height: 420px; background: #000; border-radius: 8px; object-fit: contain; display: block; }
.cc-mont-gone { padding: 18px 8px; border: 1px dashed var(--line); border-radius: 8px; text-align: center; }
.cc-mont-st { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.cc-mont-st.cc-mont-failed { background: var(--bad-soft); color: var(--bad); }
.cc-mont-st.cc-mont-queued { background: var(--warn-soft); color: var(--warn); }
.cc-mont-err { color: var(--bad); }
.cc-mont-qa { background: var(--warn-soft); border-radius: 8px; padding: 6px 10px; }
.cc-mont-qa ul { margin: 4px 0 0 18px; padding: 0; }
@media (max-width: 640px) { .cc-chat { margin: 10px 10px 0; } .cc-msg { max-width: 94%; } }
/* Тіркелу: бизнес туралы 3 сұрақ, экранда біреуден */
.about-step h1 { font-size: 22px; line-height: 1.3; margin: 6px 0 10px; }
.about-input { width: 100%; font-size: 17px; line-height: 1.45; min-height: 96px; resize: vertical; margin-top: 8px; }
/* Әкімші: клиенттер екі тізімге бөлінген */
.cl-head { margin: 22px 0 6px; }
.cl-head h2 { font-size: 18px; margin: 0; }
.cl-head p { margin: 2px 0 0; }

/* ---------- агент-кейіпкерлер (жеңіл: тек transform/opacity) ---------- */
.mascot { display: inline-block; line-height: 0; }
.mascot svg { overflow: visible; display: block; }
.mascot .m-body, .mascot .m-eyes, .mascot .m-prop, .mascot .m-arm, .mascot .m-z { transform-box: fill-box; transform-origin: center; }
.m-work .m-body { animation: m-bob 2.4s ease-in-out infinite; }
.m-work .m-eyes, .m-wave .m-eyes, .m-idle .m-eyes { animation: m-blink 4.5s infinite; }
.m-work .m-prop { animation: m-wiggle 1.6s ease-in-out infinite; }
.m-wave .m-arm { transform-origin: 0% 100%; animation: m-wave 1.2s ease-in-out infinite; }
.m-wave .m-body { animation: m-bob 3s ease-in-out infinite; }
.m-sleep .m-body { animation: m-breathe 4s ease-in-out infinite; }
.m-sleep .m-z { animation: m-z 3s ease-in-out infinite; }
.m-sleep svg { filter: saturate(.55); }
@keyframes m-bob { 50% { transform: translateY(-3px); } }
@keyframes m-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes m-wiggle { 50% { transform: rotate(6deg); } }
@keyframes m-wave { 50% { transform: rotate(-22deg); } }
@keyframes m-breathe { 50% { transform: scale(1.03); } }
@keyframes m-z { 0% { opacity: 0; transform: translateY(4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .mascot * { animation: none !important; } }

.greeter { display: flex; align-items: flex-end; gap: 10px; margin: 28px 0 6px; }
.greeter.sm { margin: 0 0 14px; }
.greeter .bubble { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 15px; line-height: 1.4; box-shadow: var(--shadow); }
.welcome .hero { margin-top: 18px; }

.agent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.agent-tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px 12px;
  background: #fff; border: 2px solid var(--line); border-radius: 18px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.agent-tile.on { border-color: var(--brand); background: var(--brand-soft); }
.agent-tile.free { cursor: default; }
.agent-tile:focus-visible { outline: 3px solid var(--brand2); outline-offset: 2px; }
.agent-tile .tick { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #cfd8d4; display: grid; place-items: center; font-size: 13px; color: #fff; }
.agent-tile.on .tick { background: var(--brand); border-color: var(--brand); }
.agent-tile .tile-tag { position: absolute; top: 8px; right: 8px; font-size: 11px; }
.agent-tile .tile-desc { line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agent-tile .tile-price { margin-top: auto; padding-top: 4px; }
.agent-tile > b { font-size: 16px; line-height: 1.2; }
/* 4 агент — тең 2×2 тор (кең экранда да 2 баған, біркелкі тұрсын) */
.agent-grid { align-items: stretch; }
@media (min-width: 720px) { .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Жеке көмекші — жоғарыда бір жолға сиятын жұқа жолақ (басылмайды, әрқашан бар) */
.agent-strip { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; margin: 4px 0 10px; border-radius: 16px;
  background: var(--brand-soft); border: 1.5px solid #cfe9df; min-height: 56px; }
.agent-strip .mascot { flex: none; }
.strip-text { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; overflow: hidden; }
.strip-text b { font-size: 15px; flex: none; }
.strip-text .muted { overflow: hidden; text-overflow: ellipsis; }
.strip-price { flex: none; font-size: 13px; font-weight: 700; white-space: nowrap; }
.strip-price.free { color: var(--brand); background: #fff; padding: 4px 10px; border-radius: 99px; }

.team-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.team-member { flex: 0 0 auto; width: 96px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.team-member .ok { color: var(--brand); }

/* 2ГИС агенті */
.gis-setup .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.gis-grid { display: grid; grid-template-columns: 1fr; gap: 0 10px; }
@media (min-width: 560px) { .gis-grid { grid-template-columns: 1fr 1fr; } }
.gis-setup h4 { font-size: 15px; }

/* Қуат толтыру ұсыныстары */
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.offer { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 6px 10px; border: 1.5px solid var(--line);
  border-radius: 14px; background: var(--card, #fff); font: inherit; color: inherit; cursor: pointer; text-align: center; }
.offer:disabled { cursor: default; opacity: .75; }
.offer.best { border-color: var(--brand, #0f7a5a); box-shadow: 0 0 0 1px var(--brand, #0f7a5a) inset; }
.offer-pay { font-size: 17px; }
.offer-gift { font-size: 12px; font-weight: 600; color: var(--brand, #0f7a5a); min-height: 16px; }
.offer-tag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px; background: var(--brand, #0f7a5a); color: #fff; }
.green-text { color: var(--brand, #0f7a5a); }
.offer-power { font-size: 14px; }
.offer .muted.small { line-height: 1.1; }

/* Тіркелу: ИИ қуатын таңдау (радио-карталар) */
.power-list { display: flex; flex-direction: column; gap: 10px; }
.power-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 14px; border: 2px solid var(--line); border-radius: 16px;
  background: #fff; font: inherit; color: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.power-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.power-opt .radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfd8d4; }
.power-opt.on .radio { border: 7px solid var(--brand); }
.power-pay { font-size: 19px; }
.power-best { margin-left: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--brand); color: #fff; vertical-align: 3px; }
.power-gift { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; color: var(--brand); font-size: 15px; line-height: 1.1; }
.power-gift small { font-weight: 600; font-size: 11px; }
.foot-row { display: flex; gap: 10px; align-items: center; }
.foot-row .btn.block { flex: 1; }

/* Төлем — чек сияқты */
.receipt { display: flex; flex-direction: column; gap: 0; padding: 6px 16px 10px; }
.receipt-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.receipt-line .mascot { flex: none; }
.receipt-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 4px; font-size: 18px; }
.receipt-total b { font-size: 22px; }
.receipt-edit { justify-content: space-between; margin-top: 2px; }
.why-pay { margin: 12px 0 0; padding-left: 18px; color: var(--ink2); font-size: 14px; line-height: 1.5; }
