/* v4 additions — Cleaner by Zip */

/* Expiry banner under the topbar */
.sub-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 8px 24px;
  font-size: 13px; font-weight: 550;
  border-bottom: 1px solid #f3d9a8;
  background: var(--warn-bg); color: #6b3d00;
  flex: 0 0 auto;
}
.sub-banner svg { flex: 0 0 18px; color: var(--warn); }
.sub-banner.end { background: var(--danger-bg); border-bottom-color: #f0c7c4; color: #8a1f1a; }
.sub-banner.end svg { color: var(--danger); }
.sub-banner .b-link { margin-left: auto; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; cursor: default; }

/* Checkboxes (галочки) */
.chk { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; position: relative; }
.chk-ui { display: block; box-sizing: border-box; }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.chk-ui {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--line-strong); background: #fff;
  position: relative; flex: 0 0 18px;
}
.chk input:checked + .chk-ui { background: var(--brand); border-color: var(--brand); }
.chk input:checked + .chk-ui::after {
  content: ""; position: absolute; left: 5px; top: 2px;
  width: 5px; height: 9px;
  border: 2px solid #fff; border-top: 0; border-left: 0;
  transform: rotate(45deg);
}
.chk.locked { opacity: 1; }
.chk.locked .chk-ui { background: var(--brand); border-color: var(--brand); box-shadow: none; }
.chk.locked .chk-ui::after {
  content: ""; position: absolute; left: 5px; top: 2px;
  width: 5px; height: 9px;
  border: 2px solid #fff; border-top: 0; border-left: 0;
  transform: rotate(45deg);
}
.chk-note { font-size: 11px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.chk.locked + .chk-note, .chk.locked .chk-note { color: var(--muted); }
.set-row .chk-note { margin-left: -2px; }

/* Admin tabs */
.admin-tabs {
  display: flex; gap: 0; flex: 0 0 auto;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  margin: 0;
}
.admin-tab {
  height: 40px; padding: 0 16px;
  display: flex; align-items: center;
  font-size: 13.5px; font-weight: 650; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.admin-tab.on { color: var(--brand-ink); border-bottom-color: var(--brand); }
.app.with-tabs .content { padding-top: 16px; }

/* User tariffs */
.tar4 { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.tar-now {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px;
}
.tar-now .card { padding: 16px 18px; }
.tar-plan .plan-name { font-size: 22px; font-weight: 720; letter-spacing: -.03em; line-height: 1.15; }
.tar-plan .plan-meta { margin-top: 6px; font-size: 13px; color: var(--muted); }
.tar-plan .plan-meta b { color: var(--text); font-weight: 650; }
.tar-feats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.feat {
  height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-ink);
  font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center;
}
.feat.off { background: #f3f4f6; color: var(--faint); text-decoration: line-through; }
.key-card { padding: 16px 18px; display: flex; align-items: flex-end; gap: 12px; }
.key-card .grow { flex: 1; }
.key-card label { display: block; font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.key-card .text-input { max-width: 320px; }
.tar-list { display: flex; flex-direction: column; gap: 8px; }
.tar-item {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 16px;
}
.tar-item .t-name { font-weight: 680; font-size: 14.5px; min-width: 110px; }
.tar-item .t-term { color: var(--muted); font-size: 13px; min-width: 90px; }
.tar-item .t-price { font-weight: 700; font-size: 14.5px; min-width: 90px; }
.tar-item .t-lim { color: var(--muted); font-size: 12.5px; flex: 1; }
.tar-item.current { border: 1.5px solid var(--brand); background: #f3fafa; box-shadow: 0 0 0 3px rgba(14,124,123,.1); }
.tar-item .you { font-size: 11px; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); height: 22px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; }
.note-card { padding: 16px 18px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.note-card b { color: var(--text); }

/* Admin tariffs */
.pay-mod {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px;
}
.pay-mod .pay-title { font-size: 15px; font-weight: 700; }
.pay-mod .hint { margin-top: 2px; }
.wallet-card { padding: 14px 16px; display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.wallet-card label { display: block; font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.wallet-card .text-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; width: 100%; padding: 0 8px; }
.wallet-card .wallet-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.wallet-card .ex { font-size: 11.5px; color: var(--faint); white-space: nowrap; padding-bottom: 0; }
.tar-admin { display: grid; grid-template-columns: 1fr 340px; gap: 12px; flex: 1; min-height: 0; }
.tar-admin .card { min-height: 0; display: flex; flex-direction: column; }
.tar-form { padding: 16px 16px 14px; }
.tar-form .fields { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tar-form .fld > label { display: block; font-size: 11.5px; font-weight: 650; color: var(--muted); margin-bottom: 4px; }
.tar-form .text-input { height: 34px; font-size: 13px; }
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.feat-opt { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.hidden-tag { font-size: 11px; font-weight: 650; color: var(--muted); background: #f3f4f6; height: 22px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; }
.manual-tag { font-size: 11px; font-weight: 650; color: #6b3d00; background: var(--warn-bg); height: 22px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; }
.free-tag { font-size: 11px; font-weight: 650; color: var(--ok); background: var(--ok-bg); height: 22px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; }

/* Compact admin user card extras */
.limits-panel .feat-grid { margin: 4px 0 8px; }
.limits-panel .key-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0 10px; }
.limits-panel .key-actions .btn { width: auto; }
.limits-panel.tight { padding: 12px 14px 12px; }
.limits-panel.tight .limits-who { margin: -2px 0 8px; }
.limits-panel.tight .limits-fields { gap: 8px; margin-bottom: 8px; }
.limits-panel.tight .acc-list { gap: 6px; margin-bottom: 8px; }
.limits-panel.tight .acc-item { padding: 6px 8px; }
.admin-layout.v4 { gap: 10px; }
.admin-top.compact .hint { display: none; }
.admin-top.compact .card-pad { padding: 12px 14px; }
.admin-top.compact .card-title { margin-bottom: 6px; }

/* Telegram payment */
.pay-box { margin-top: 6px; background: #fff; border: 1px solid #e6eaef; border-radius: 12px; padding: 8px 10px 8px; }
 .pay-box .pay-qr { width: 96px; height: 96px; display: block; margin: 0 auto 4px; border-radius: 8px; background: #fff; }
.pay-box .pay-sum { text-align: center; font-weight: 700; font-size: 14px; margin-bottom: 0; }
.pay-box .pay-net { text-align: center; font-size: 11.5px; color: #5b6470; margin-bottom: 4px; }
.pay-box .pay-link {
  display: block; text-align: center; color: #168acd; font-weight: 650; font-size: 13px;
  margin-bottom: 6px; text-decoration: underline; text-underline-offset: 2px;
}
.pay-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-top: 6px; }
.pay-row code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #f3f4f6; padding: 2px 6px; border-radius: 5px; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.pay-row .copy { color: #168acd; font-weight: 650; white-space: nowrap; }
.pay-hint { margin-top: 8px; font-size: 11px; color: #8a939e; text-align: center; }
.tg-tag.pay { background: #e8f6ee; color: #0f7a4a; }
.tg-btn.ok { color: #0f7a4a; font-weight: 700; }
.tg-btn.no { color: #c0352b; font-weight: 700; }
.tg-btn-row .tg-btn.ok + .tg-btn.no { }

/* Admin: three settings cards on tariffs */
.pay-mod .pay-title { line-height: 1.2; }
.pay-mod { align-items: flex-start; }
.pay-mod .toggle { margin-top: 2px; }
.bubble .pay-link { font-size: 13px; }
.bubble .pay-hint { text-align: left; }
.bubble .pay-row { margin-top: 6px; }

/* Telegram mockups may be taller than 800 when the chat is long */
body.tg-page { height: auto !important; min-height: 800px; overflow: visible !important; }
.tg-page { height: auto !important; min-height: 800px; overflow: visible !important; }
.tg-body { overflow: visible !important; flex: none; }

.admin-body { grid-template-columns: 1fr 320px; }

.feat-opt .chk, .feat-opt .chk-ui { flex: 0 0 18px; min-width: 18px; min-height: 18px; width: 18px; height: 18px; }
