/* Telegram bot layout — scoped to .ph-page only (no global bleed) */
html.tg-bot-page .ph-page .card{margin-bottom:1rem}
html.tg-bot-page .ph-page .status-row{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;margin-bottom:1rem}
html.tg-bot-page .ph-page .pill{padding:.25rem .65rem;border-radius:999px;font-size:.85rem;font-weight:600}
html.tg-bot-page .ph-page .pill.on{background:#dcfce7;color:#166534}
html.tg-bot-page .ph-page .pill.off{background:#fee2e2;color:#991b1b}
html.tg-bot-page .ph-page .muted{color:var(--ph-text-muted,#64748b);font-size:.875rem}
html.tg-bot-page .ph-page .mono{font-family:ui-monospace,monospace}
html.tg-bot-page .ph-page form.form{display:block!important;max-width:960px!important;width:100%!important}
html.tg-bot-page .ph-page .tabs{display:flex;flex-wrap:wrap;gap:.45rem;align-items:center;margin:0 0 .35rem}
html.tg-bot-page .ph-page .tabs button.tab{appearance:none;background:transparent;color:var(--ph-text-muted,#64748b);border:1px solid var(--ph-border,rgba(15,23,42,.12));border-radius:999px;padding:.42rem .9rem;font:inherit;font-size:.84rem;font-weight:650;cursor:pointer}
html.tg-bot-page .ph-page .tabs button.tab.on{background:var(--ph-primary-soft,#eef2ff);color:var(--ph-text,#0f172a);border-color:var(--ph-primary,#4f46e5)}
html.tg-bot-page[data-theme="dark"] .ph-page .tabs button.tab{color:#94a3b8;border-color:rgba(148,163,184,.22)}
html.tg-bot-page[data-theme="dark"] .ph-page .tabs button.tab.on{background:rgba(59,130,246,.18);color:#e2e8f0;border-color:#3b82f6}
html.tg-bot-page .ph-page .tab-status{margin-left:auto;display:flex;flex-wrap:wrap;gap:.55rem;align-items:center}
html.tg-bot-page .ph-page .pane{display:grid!important;grid-template-columns:1fr 1fr!important;gap:14px 18px!important;align-items:start!important}
html.tg-bot-page .ph-page .pane>label{display:flex!important;flex-direction:column!important;gap:.42rem!important;margin:0!important;min-width:0!important;font-size:11.5px!important;font-weight:600!important;color:var(--ph-text-muted,#64748b)!important}
html.tg-bot-page .ph-page .pane>label>small{font-size:.8rem!important;font-weight:400!important;color:var(--ph-text-muted,#64748b)!important}
html.tg-bot-page .ph-page .pane>label>input:not([type=checkbox]):not([type=radio]),
html.tg-bot-page .ph-page .pane>label>textarea{
  width:100%!important;max-width:100%!important;box-sizing:border-box!important;min-height:28px!important;padding:4px 8px!important;
  border:1px solid var(--ph-border-strong,rgba(15,23,42,.12))!important;border-radius:8px!important;
  background:var(--ph-surface,#fff)!important;color:var(--ph-text,#0f172a)!important;font-size:12px!important;
  transform:none!important;appearance:auto!important
}
html.tg-bot-page[data-theme="dark"] .ph-page .pane>label>input:not([type=checkbox]):not([type=radio]),
html.tg-bot-page[data-theme="dark"] .ph-page .pane>label>textarea{
  background:var(--ph-surface,#141922)!important;color:var(--ph-text,#eef2f7)!important;border-color:var(--ph-border-strong,rgba(255,255,255,.12))!important
}
html.tg-bot-page .ph-page .pane>label>textarea{min-height:64px!important;resize:vertical!important}
html.tg-bot-page .ph-page .pane>label:has(>textarea),
html.tg-bot-page .ph-page .pane>.actions{grid-column:1/-1!important}
html.tg-bot-page .ph-page .pane>label.check{
  grid-column:1/-1!important;flex-direction:row!important;align-items:center!important;
  gap:8px!important;width:auto!important;max-width:max-content!important
}
html.tg-bot-page .ph-page .pane>label.check>input[type=checkbox],
html.tg-bot-page .ph-page input[type=checkbox]{
  width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;
  max-width:16px!important;max-height:16px!important;margin:0!important;padding:0!important;
  flex:0 0 16px!important;transform:none!important;appearance:auto!important;-webkit-appearance:checkbox!important;
  accent-color:var(--ph-primary,#4f46e5)!important;background:transparent!important;border:none!important;box-shadow:none!important
}
html.tg-bot-page .ph-page .actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.15rem}
html.tg-bot-page .ph-page .actions .btn,html.tg-bot-page .ph-page .actions button.btn{width:auto!important;min-height:22px!important;height:22px!important;max-height:22px!important;padding:0 8px!important;font-size:11px!important;font-weight:600!important;line-height:1!important;border-radius:5px!important;display:inline-flex!important;align-items:center!important}
html.tg-bot-page .ph-page .help h3{margin:0 0 .75rem;font-size:1rem}
html.tg-bot-page .ph-page .help ol{margin:0;padding-left:1.25rem;line-height:1.6}
html.tg-bot-page .ph-page .err{color:#b91c1c}
html.tg-bot-page .ph-page .ok{color:#166534}
@media (max-width:720px){
  html.tg-bot-page .ph-page .pane{grid-template-columns:1fr!important}
  html.tg-bot-page .ph-page .tab-status{margin-left:0;width:100%}
}

/* tg-fix-stamp:1792934828 */

/* TG COMPACT — buttons + type (preview) */
html.tg-bot-page main.ph-main .ph-page .actions .btn,
html.tg-bot-page main.ph-main .ph-page .actions button.btn,
html.tg-bot-page main.ph-main .ph-page .pane .actions .btn,
html.tg-bot-page main.ph-main .ph-page .pane .btn,
html.tg-bot-page main.ph-main .ph-page form.form .actions .btn,
html.tg-bot-page main.ph-main .ph-page form.form .actions button.btn,
html.tg-bot-page main.ph-main .ph-page button.btn.btn-primary,
html.tg-bot-page main.ph-main .ph-page button.btn.btn-ghost,
html.tg-bot-page .ph-page .actions .btn,
html.tg-bot-page .ph-page .actions button.btn,
html.tg-bot-page .ph-page button.btn:not(.tab){
  box-sizing:border-box!important;
  min-height:22px!important;height:22px!important;max-height:22px!important;
  padding:0 8px!important;margin:0!important;
  font-size:11px!important;font-weight:600!important;line-height:1!important;
  letter-spacing:0!important;border-radius:5px!important;
  width:auto!important;min-width:0!important;max-width:max-content!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  box-shadow:none!important;transform:none!important;filter:none!important;
}
html.tg-bot-page main.ph-main .ph-page .actions .btn.btn-primary,
html.tg-bot-page main.ph-main .ph-page button.btn.btn-primary,
html.tg-bot-page .ph-page .actions .btn.btn-primary,
html.tg-bot-page .ph-page .actions .btn:not(.btn-ghost){
  background:#3b82f6!important;color:#fff!important;border:1px solid transparent!important;
}
html.tg-bot-page main.ph-main .ph-page .actions .btn.btn-ghost,
html.tg-bot-page main.ph-main .ph-page button.btn.btn-ghost,
html.tg-bot-page .ph-page .actions .btn.btn-ghost{
  background:transparent!important;color:#94a3b8!important;border:1px solid rgba(148,163,184,.3)!important;font-weight:500!important;
}
html.tg-bot-page main.ph-main .ph-page .actions{gap:6px!important;margin-top:2px!important;align-items:center!important}
html.tg-bot-page main.ph-main .ph-page .pane>label{
  font-size:11.5px!important;font-weight:600!important;gap:4px!important;color:#94a3b8!important;
}
html.tg-bot-page main.ph-main .ph-page .pane>label>small{
  font-size:10.5px!important;font-weight:400!important;line-height:1.35!important;
}
html.tg-bot-page main.ph-main .ph-page .pane>label>input:not([type=checkbox]):not([type=radio]),
html.tg-bot-page main.ph-main .ph-page .pane>label>textarea{
  min-height:28px!important;height:auto!important;padding:4px 8px!important;
  font-size:12px!important;font-weight:400!important;line-height:1.3!important;
  border-radius:6px!important;
}
html.tg-bot-page main.ph-main .ph-page .pane>label>textarea{min-height:64px!important}
html.tg-bot-page main.ph-main .ph-page .tabs button.tab{
  min-height:26px!important;height:auto!important;padding:3px 10px!important;
  font-size:11.5px!important;font-weight:600!important;
}
html.tg-bot-page main.ph-main .ph-page span.pill{
  font-size:10.5px!important;padding:1px 7px!important;font-weight:700!important;
}

