:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface2: #161616;
  --accent: #d4af6a;
  --text: #f5f5f4;
  --text2: #b3b3ad;
  --muted: #6f6f6a;
  --line: rgba(255,255,255,.08);
  --green: #4ade80;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 "Inter", -apple-system, "SF Pro Text", Roboto, "Segoe UI", sans-serif;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
#app { display: flex; flex-direction: column; min-height: 100vh; }

header {
  display: flex; align-items: center;
  padding: 18px 20px 6px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; display: block; }
.brand-txt { font-weight: 600; letter-spacing: .22em; font-size: 13px; color: var(--text); }

main { flex: 1; padding: 14px 18px 100px; }

/* ---------- нижняя навигация ---------- */
.tabs {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: center; gap: 4px;
  background: rgba(10,10,10,.88); backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
}
.tabs button {
  flex: 1; max-width: 92px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: var(--muted);
  font: 500 10.5px inherit; letter-spacing: -.01em;
  padding: 7px 0 5px; border-radius: 10px; cursor: pointer;
  transition: all .15s;
}
.tabs button svg {
  width: 20px; height: 20px; fill: none;
  stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.tabs button.active { color: var(--text); }

/* ---------- профиль ---------- */
.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px; padding: 24px 22px; margin-bottom: 10px;
}
.hero .plan-label {
  color: var(--muted); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
}
.hero .plan-name { font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; margin-top: 2px; }
.hero .plan-name::after { content: ""; display: block; width: 28px; height: 2px; background: var(--accent); margin-top: 10px; border-radius: 2px; }
.hero .plan-meta { color: var(--text2); font-size: 13.5px; margin-top: 10px; }
.hero .credits { margin-top: 22px; }
.hero .credits .nums { display: flex; align-items: baseline; gap: 7px; }
.hero .credits .big { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero .credits .of { color: var(--muted); font-size: 13px; }
.bar { height: 4px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; margin: 12px 0 8px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.bar-sub { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }

/* ---------- карточки-списки ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 2px 20px; margin-bottom: 10px;
}
.reset-card {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: linear-gradient(135deg, rgba(212,175,106,.14), rgba(212,175,106,.04));
  border: 1px solid rgba(212,175,106,.35); border-radius: 16px;
  padding: 13px 16px; margin-bottom: 10px; color: inherit; text-align: left;
  font: inherit; cursor: pointer;
}
.reset-card:active { background: rgba(212,175,106,.2); }
.reset-card:disabled { opacity: .45; cursor: default; }
.reset-card .rc-ic { font-size: 20px; }
.reset-card .rc-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reset-card .rc-title { font-size: 14.5px; font-weight: 600; }
.reset-card .rc-sub { font-size: 12px; color: var(--text2); }
.reset-card .rc-price { font-size: 14px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.reset-card .rc-price i { font-style: normal; color: var(--text2); margin-left: 6px; font-weight: 400; }
.row { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; }
.row + .row { border-top: 1px solid var(--line); }
.row .k { color: var(--text2); font-size: 14px; }
.row .v { font-weight: 500; font-size: 14px; }
.row.rowlink { cursor: pointer; }
.row.rowlink .v { color: var(--text2); }
.row .v.mono { font-family: ui-monospace, "SF Mono", monospace; font-size: 12.5px; color: var(--text2); }

/* ---------- фильтры ---------- */
.seg { display: flex; gap: 6px; margin: 0 0 14px; }
.seg button {
  padding: 7px 14px; border-radius: 99px;
  border: 1px solid var(--line); background: none;
  color: var(--muted); font: 500 13px inherit; cursor: pointer;
  transition: all .15s;
}
.seg button.active { color: var(--bg); background: var(--text); border-color: var(--text); }

/* ---------- модели ---------- */
.model {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 7px; cursor: pointer;
  transition: border-color .15s;
}
.model:active { border-color: rgba(255,255,255,.2); }
.model.current { border-color: rgba(212,175,106,.5); }
.model.locked .name, .model.locked .desc { opacity: .4; }
.model .info { flex: 1; min-width: 0; }
.model .name { font-weight: 550; font-size: 14.5px; display: flex; align-items: center; gap: 7px; letter-spacing: -.01em; }
.model .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.model .desc { color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.45; }
.model .price { text-align: right; white-space: nowrap; }
.model .chip { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.model .per { display: block; color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.model .lock {
  display: inline-block; font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px; padding: 3px 9px;
}

/* ---------- планы ---------- */
.plan {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; margin-bottom: 10px;
}
.plan.current { border-color: rgba(212,175,106,.45); }
.plan .head { display: flex; align-items: baseline; justify-content: space-between; }
.plan .nm { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.plan .pr { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan .pr small { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.plan .feats { margin-top: 14px; }
.plan .feat {
  display: block; color: var(--text2); font-size: 13.5px; padding: 4px 0;
}
.plan .feat b { color: var(--text); font-weight: 550; font-variant-numeric: tabular-nums; }
.plan .buy {
  width: 100%; margin-top: 16px; padding: 12px; border-radius: 11px;
  border: none; background: var(--text); color: var(--bg);
  font: 600 14px inherit; letter-spacing: -.01em; cursor: pointer;
}
.plan.current .buy { background: var(--surface2); color: var(--text2); border: 1px solid var(--line); }
.plan .now {
  position: absolute; top: 20px; right: 20px;
  color: var(--accent); font-size: 10.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
}
.plan .head .pr { margin-right: 0; }
.plan.current .head .pr { margin-right: 64px; }

/* ---------- общее ---------- */
.section-title {
  color: var(--muted); font-size: 11px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  margin: 22px 4px 8px;
}
.section-title.first { margin-top: 4px; }
.card.pad { padding: 16px 18px; }
.btn {
  width: 100%; padding: 13px; border-radius: 12px; margin-top: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: 500 14px inherit; letter-spacing: -.01em; cursor: pointer;
}
.btn.sm { width: auto; flex: 1; padding: 10px 12px; margin-top: 0; font-size: 13px; background: var(--surface2); }
.btn.sm.rot { color: var(--accent); border-color: rgba(212,175,106,.3); }
.btn.sm2 { padding: 10px; margin-top: 10px; font-size: 13px; background: var(--surface2); }
.btnrow { display: flex; gap: 8px; margin-top: 12px; }
.empty { color: var(--muted); font-size: 13.5px; text-align: center; padding: 8px 0; }

/* ---------- статистика ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 18px 15px;
}
.stat .sv { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .sk, .stat .sk2 { color: var(--muted); font-size: 12px; margin-top: 1px; }
.mrow { padding: 9px 0; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mrow-top { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 500; }
.mrow-num { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.mbar { height: 3px; background: rgba(255,255,255,.07); border-radius: 99px; margin-top: 7px; overflow: hidden; }
.mbar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.act {
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  padding: 12px 15px; margin-bottom: 6px;
}
.act-top { display: flex; justify-content: space-between; align-items: baseline; }
.act-model { font-weight: 550; font-size: 13.5px; }
.act-ago { color: var(--muted); font-size: 11.5px; }
.act-sub { color: var(--muted); font-size: 12px; margin-top: 3px; display: flex; gap: 0; flex-wrap: wrap; }
.act-cost { margin-left: auto; color: var(--accent); font-weight: 550; }
.more {
  display: block; width: 100%; padding: 11px 0 9px; margin-top: 4px;
  background: none; border: none; border-top: 1px solid var(--line);
  color: var(--muted); font: 500 12.5px inherit; cursor: pointer;
}
.pager {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  color: var(--muted); font-size: 13px; padding: 14px 0 4px;
}
.pager button {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 16px; cursor: pointer;
}
.pager button:disabled { opacity: .3; }

/* ---------- API ---------- */
.keybox {
  background: var(--surface2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 12px; word-break: break-all; color: var(--text2);
}
.mono { font-family: ui-monospace, "SF Mono", monospace; }
.code {
  font-family: ui-monospace, "SF Mono", monospace; font-size: 11px; line-height: 1.6;
  color: var(--text2); white-space: pre-wrap; word-break: break-all;
}

/* ---------- провайдеры моделей ---------- */
.provrow {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 2px;
  scrollbar-width: none;
}
.provrow::-webkit-scrollbar { display: none; }
.provrow .prov {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 7px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font: 500 12px Inter, sans-serif; cursor: pointer;
  transition: all .15s;
}
.provrow .prov.active { background: var(--text); color: var(--bg); border-color: var(--text); }
@media (min-width: 520px) {
  .provrow { flex-wrap: wrap; overflow-x: visible; }
  #adm-nav { flex-wrap: wrap !important; overflow-x: visible !important; white-space: normal !important; }
}

select, select option {
  background: var(--card, #1c1c1e);
  color: var(--text, #fff);
}

/* иконки провайдеров — SVG через mask, красятся currentColor */
.pico i, .prov i {
  display: inline-block; background: currentColor;
  -webkit-mask: var(--pmask) center / contain no-repeat;
  mask: var(--pmask) center / contain no-repeat;
}
.prov i { width: 13px; height: 13px; }
.pv-openai    { --pmask: url(/static/icons/openai.svg); }
.pv-anthropic { --pmask: url(/static/icons/anthropic.svg); }
.pv-xai       { --pmask: url(/static/icons/xai.svg); }
.pv-gemini    { --pmask: url(/static/icons/gemini.svg); }
.pv-deepseek  { --pmask: url(/static/icons/deepseek.svg); }
.pv-qwen      { --pmask: url(/static/icons/qwen.svg); }
.pv-kimi      { --pmask: url(/static/icons/kimi.svg); }
.pv-minimax   { --pmask: url(/static/icons/minimax.svg); }
.pv-zhipu     { --pmask: url(/static/icons/zhipu.svg); }

.pico {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface2); border: 1px solid var(--line); color: var(--text2);
}
.pico i { width: 18px; height: 18px; }
.pico b { font-size: 13px; font-weight: 700; }
.pico.big { width: 44px; height: 44px; border-radius: 13px; }
.pico.big i { width: 24px; height: 24px; }
/* брендовые фоны */
.pico.pv-openai    { background: #f5f5f4; color: #0d0d0d; border-color: transparent; }
.pico.pv-anthropic { background: #d97757; color: #fff; border-color: transparent; }
.pico.pv-xai       { background: #0d0d0d; color: #fff; border-color: #3a3a3c; }
.pico.pv-gemini    { background: #4285f4; color: #fff; border-color: transparent; }
.pico.pv-deepseek  { background: #4d6bfe; color: #fff; border-color: transparent; }
.pico.pv-qwen      { background: #615ced; color: #fff; border-color: transparent; }
.pico.pv-kimi      { background: #10b981; color: #fff; border-color: transparent; }
.pico.pv-minimax   { background: #f23f5d; color: #fff; border-color: transparent; }
.pico.pv-zhipu     { background: #3b82f6; color: #fff; border-color: transparent; }

.footnote { color: var(--muted); font-size: 11.5px; line-height: 1.5; padding: 10px 4px 4px; }
.footnote.top { padding: 0 4px 12px; }

/* ---------- профиль: язык / кнопки ---------- */
.langseg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.langseg button {
  padding: 6px 13px; border: none; background: none; cursor: pointer;
  color: var(--muted); font: 600 12px Inter, sans-serif;
}
.langseg button.active { background: var(--text); color: var(--bg); }
.btnrow2 { display: flex; gap: 8px; margin-top: 10px; }
.btn.half {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 0;
}
.btn.half svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- поддержка / чат ---------- */
.btn.danger { color: #f87171; border-color: rgba(248,113,113,.25); }
.ticket {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  padding: 12px 15px; margin-bottom: 6px; cursor: pointer;
}
.ticket.unread { border-color: rgba(212,175,106,.5); }
.tk-ico {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface2); border: 1px solid var(--line); color: var(--accent);
}
.tk-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tk-body { flex: 1; min-width: 0; }
.tk-arr { color: var(--muted); font-size: 18px; flex-shrink: 0; }
.urow { cursor: pointer; }
.tk-last { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta {
  width: 100%; background: var(--surface2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font: 400 14px Inter, sans-serif; padding: 10px 12px;
  resize: none; outline: none; box-sizing: border-box;
}
.search {
  width: 100%; box-sizing: border-box; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font: 400 14px Inter, sans-serif; padding: 11px 14px; outline: none;
}
.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px;
}
.chat-back {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 18px; cursor: pointer;
}
.chat-title { flex: 1; min-width: 0; }
.chat-name { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; }
.chat-status { color: var(--muted); font-size: 12px; }
.chat-status.on { color: var(--green); }
.chat-close {
  padding: 8px 12px; border-radius: 10px; flex-shrink: 0;
  border: 1px solid rgba(248,113,113,.25); background: none; color: #f87171;
  font: 500 12.5px inherit; cursor: pointer;
}
.chat-box {
  min-height: 40vh; max-height: 56vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px; padding: 4px 0 10px;
}
.msg { max-width: 82%; align-self: flex-start; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg .bubble {
  display: inline-block; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 9px 13px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}
.msg.mine .bubble { background: #26221a; border-color: rgba(212,175,106,.25); }
.msg-t { color: var(--muted); font-size: 10.5px; margin-top: 3px; padding: 0 4px; }
.chat-input {
  display: flex; gap: 8px; align-items: flex-end;
  border-top: 1px solid var(--line); padding-top: 10px;
}
.chat-input .ta { flex: 1; }
.chat-input button {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  border: none; background: var(--text); color: var(--bg);
  font-size: 17px; cursor: pointer;
}

.loading, .error { text-align: center; color: var(--muted); padding: 64px 20px; font-size: 14px; }
.error { color: #f87171; }

/* ---------- скелетоны загрузки ---------- */
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skel {
  border-radius: 16px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--surface) 25%, #1b1b1b 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border: 1px solid var(--line);
}
.sk-hero { height: 170px; }
.sk-card { height: 72px; }

/* ---------- плавный вход экрана ---------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
main.enter > * { animation: viewIn .28s ease both; }
main.enter > *:nth-child(2) { animation-delay: .03s; }
main.enter > *:nth-child(3) { animation-delay: .06s; }
main.enter > *:nth-child(4) { animation-delay: .09s; }
main.enter > *:nth-child(5) { animation-delay: .12s; }

/* ---------- bottom sheet ---------- */
.sheet-ov {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.sheet-ov.open { opacity: 1; }
.sheet {
  width: 100%; max-width: 560px;
  background: #131313; border: 1px solid var(--line); border-bottom: none;
  border-radius: 22px 22px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(30px); transition: transform .22s ease;
  max-height: 80vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.sheet-ov.open .sheet { transform: none; }
.sheet-grip { width: 38px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.16); margin: 4px auto 16px; }
.ms-head { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.ms-name { font-weight: 600; font-size: 17px; letter-spacing: -.02em; }
.ms-prov { color: var(--muted); font-size: 12.5px; }
.ms-desc { color: var(--text2); font-size: 13.5px; line-height: 1.55; margin-bottom: 14px; }
.row .v.ok { color: var(--green); }
.row .v.no { color: var(--muted); }

/* ---------- чат: фото ---------- */
.chat-input #ch-attach {
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.chat-input #ch-attach svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.msg-img {
  display: block; max-width: 230px; max-height: 280px; border-radius: 14px;
  border: 1px solid var(--line); margin-bottom: 4px;
}
.msg.mine .msg-img { margin-left: auto; }

/* ---------- админ: управление юзером ---------- */
.adm-form .af-row { display: flex; gap: 8px; margin-top: 12px; }
.adm-form .af-row:first-child { margin-top: 0; }
.af-sel, .af-inp {
  background: var(--surface2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font: 400 13px Inter, sans-serif; padding: 9px 11px; outline: none;
  min-width: 0;
}
.af-sel { flex: 1.2; }
.af-inp { flex: 1; width: 70px; }
.af-inp.wide { flex: 2; width: auto; }
.af-btn {
  padding: 9px 15px; border-radius: 10px; flex-shrink: 0;
  border: none; background: var(--text); color: var(--bg);
  font: 600 13px Inter, sans-serif; cursor: pointer;
}
.af-btn:disabled { opacity: .5; }
.af-hint { color: var(--muted); font-size: 11px; margin-top: 6px; line-height: 1.4; }

/* ---------- выбор языка при первом входе ---------- */
.langpick {
  min-height: 62vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.lp-logo { width: 64px; height: 64px; border-radius: 19px; display: block; margin-bottom: 18px; }
.lp-brand { font-weight: 600; letter-spacing: .26em; font-size: 17px; }
.lp-sub { color: var(--muted); font-size: 13px; margin: 6px 0 30px; }
.lp-btn {
  width: 100%; max-width: 320px; padding: 15px; margin-top: 10px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: 500 15px Inter, sans-serif; cursor: pointer; transition: all .15s;
}
.lp-btn:active { background: var(--surface2); }

/* оплата */
.sheet-title { font-size: 15px; font-weight: 600; margin: 4px 2px 12px; }
.sheet-sub { font-size: 12px; color: var(--muted); margin: 0 2px 8px; }

/* выбор срока подписки */
.durrow { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.durrow .dur {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font: 500 12px Inter, sans-serif; cursor: pointer;
  transition: all .15s;
}
.durrow .dur.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.pay-opt { max-width: none; text-align: left; display: flex; flex-direction: column; gap: 3px; }
.pay-opt:disabled { opacity: .55; }
.pay-hint { color: var(--muted); font-size: 12px; font-weight: 400; }
.pay-note { color: var(--muted); font-size: 12.5px; margin-top: 12px; min-height: 16px; white-space: pre-line; }
.pay-actions { display: flex; gap: 8px; padding: 0 0 10px; }
.sel {
  background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font: inherit; font-size: 13px; padding: 7px 10px; outline: none;
}
.stat.tap { cursor: pointer; }
.act.tap { cursor: pointer; }
.stat .sv small { font-size: 14px; color: var(--muted); font-weight: 400; }

/* Провайдеры (админ) */
.prov-row .act-sub { margin-top: 4px; }
.chipbtn {
  background: var(--surface2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 10px; font-size: 14px; margin-left: 6px;
}
.chipbtn:disabled { opacity: .3; }
.maint-badge {
  font-size: 10px; color: #e6a23c; border: 1px solid rgba(230,162,60,.4);
  border-radius: 6px; padding: 1px 5px; vertical-align: 1px;
}
.model.maint { opacity: .55; }

/* ==================== тема «Глубина»: стекло + свечение ==================== */
body {
  background:
    radial-gradient(ellipse 420px 340px at 50% -140px, rgba(212,175,106,.10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
main { padding-bottom: 118px; }

.hero {
  position: relative; overflow: hidden;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.hero::before {
  content: ""; position: absolute; top: -70px; right: -70px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(212,175,106,.2), transparent 70%);
  pointer-events: none;
}
.hero .plan-name::after { background: linear-gradient(90deg, #d4af6a, #f0d9a8); width: 34px; }

.hero .ring {
  position: absolute; top: 22px; right: 22px; width: 58px; height: 58px;
  border-radius: 99px; display: flex; align-items: center; justify-content: center;
}
.hero .ring i {
  width: 46px; height: 46px; border-radius: 99px; background: #111;
  display: flex; align-items: center; justify-content: center;
  font: 600 11.5px Inter, sans-serif; font-style: normal; color: var(--text);
}

.card, .stat, .plan, .model, .act, .ticket {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.09);
  box-shadow: 0 6px 24px rgba(0,0,0,.3);
}
.card, .stat, .plan { border-radius: 18px; }
.plan.current, .model.current { border-color: rgba(212,175,106,.5); }

.bar { height: 5px; }
.bar i, .mbar i {
  background: linear-gradient(90deg, #d4af6a, #f0d9a8);
  box-shadow: 0 0 12px rgba(212,175,106,.5);
}

.btn { background: rgba(255,255,255,.04); border-radius: 14px; }
.btn.half:first-child, .plan .buy {
  background: linear-gradient(135deg, #e5c078, #c99a45);
  color: #171204; border-color: transparent; font-weight: 600;
  box-shadow: 0 6px 24px rgba(212,175,106,.18);
}
.plan.current .buy {
  background: var(--surface2); color: var(--text2);
  border: 1px solid var(--line); box-shadow: none;
}

.tabs {
  left: 16px; right: 16px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255,255,255,.09);
  border-top: 1px solid rgba(255,255,255,.09);
  border-radius: 24px;
  background: rgba(18,18,18,.72);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  padding: 8px 10px;
  box-shadow: 0 10px 34px rgba(0,0,0,.45);
}
.tabs button.active { color: var(--accent); }
.tabs button.active svg { filter: drop-shadow(0 0 8px rgba(212,175,106,.55)); }

.sheet {
  background: rgba(22,22,22,.9);
  backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px);
  border-color: rgba(255,255,255,.1);
}
.lp-btn { background: rgba(255,255,255,.04); }
.skel { border-color: rgba(255,255,255,.07); }

/* ---------- экран запуска ---------- */
#boot {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; transition: opacity .4s ease;
}
#boot.out { opacity: 0; pointer-events: none; }
.boot-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%);
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,106,.14), transparent 68%);
  animation: bootGlow 2.4s ease-in-out infinite;
}
@keyframes bootGlow {
  0%, 100% { transform: translate(-50%, -60%) scale(1); opacity: .8; }
  50% { transform: translate(-50%, -60%) scale(1.18); opacity: 1; }
}
.boot-logo {
  width: 76px; height: 76px; border-radius: 23px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 14px 44px rgba(212,175,106,.22);
  animation: bootPop .6s cubic-bezier(.2,.9,.3,1.2) both;
}
.boot-logo img { width: 100%; height: 100%; display: block; }
@keyframes bootPop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.boot-brand {
  font: 600 15px Inter, sans-serif; letter-spacing: .3em; color: var(--text);
  animation: bootFade .8s .15s ease both;
}
@keyframes bootFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.boot-dots { display: flex; gap: 7px; margin-top: 6px; animation: bootFade .8s .3s ease both; }
.boot-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: bootDot 1.2s ease-in-out infinite;
}
.boot-dots i:nth-child(2) { animation-delay: .18s; }
.boot-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes bootDot { 0%, 100% { opacity: .25; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
