/* /botdashboard/assets/telegram.css : Telegram moderation page (2026-10-13). Header/account styles come from site-header.css. */
:root { --bg: #0b0d12; --bg-elev: #141824; --bg-card: #1a1f2e; --line: #2a3145; --text: #e8ecf4; --muted: #9aa3b8; --accent: #0088ff;
  --tg: #27a7e7; --ok: #3ddc97; --bad: #f04747; --warn: #e0a800; --shadow: 0 18px 50px rgba(0,0,0,.35); --radius: 16px; --input-bg: #10131c; --input-border: #2a3145; }
body.light { --bg: #f4f6fb; --bg-elev: #fff; --bg-card: #fff; --line: #d5dbe8; --text: #1b2230; --muted: #5b6578; --accent: #0066d6; --shadow: 0 12px 30px rgba(20,30,60,.08); --input-bg: #fff; --input-border: #cfd6e4; }
* { box-sizing: border-box; }
html { scroll-padding-top: 84px; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; color: var(--text); line-height: 1.55; min-height: 100vh;
  background: radial-gradient(1100px 560px at 8% -10%, rgba(39,167,231,.16), transparent 50%), radial-gradient(900px 500px at 100% 0%, rgba(0,136,255,.10), transparent 45%), var(--bg); }
body.light { background: var(--bg); }
.wrap { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-family: Orbitron, Inter, sans-serif; font-size: 1.55rem; letter-spacing: .02em; }
/* account stack: Telegram colours */
.cc-stack-av.tg, .cc-acct.tg .cc-acct-av { background: var(--tg); box-shadow: 0 0 0 2px var(--tg); }
.cc-stack-av.tg[data-state="out"], .cc-acct.tg[data-state="out"] .cc-acct-av { box-shadow: 0 0 0 2px color-mix(in srgb, var(--tg) 55%, transparent); }
.cc-stack-av.tg + .cc-stack-av { margin-left: -10px; }
.cc-stack-av.dc { z-index: 1; } .cc-stack-av.tw { z-index: 2; }
.cc-acct.tg .cc-acct-pl { color: #7fd0f5; } .cc-acct.tg[data-state="out"] .cc-acct-btn { background: var(--tg); border-color: var(--tg); color: #fff; }
/* login */
.tg-login { max-width: 560px; margin: 48px auto; text-align: center; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 24px; box-shadow: var(--shadow); }
.tg-login p { color: var(--muted); }
.tg-login .tg-widget { min-height: 48px; display: flex; justify-content: center; margin: 20px 0 6px; }
/* layout */
.tg-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; margin: 22px 0 40px; align-items: start; }
.tg-side { position: sticky; top: 76px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.tg-side label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); margin-bottom: 6px; }
.tg-tabs { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tg-tabs button { width: 100%; text-align: left; font: inherit; font-size: .93rem; font-weight: 600; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.tg-tabs button:hover:not([disabled]) { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.tg-tabs button[aria-selected="true"] { color: #fff; background: var(--tg); }
.tg-tabs button[disabled] { opacity: .45; cursor: not-allowed; }
.tg-tabs button:focus-visible, .tg-btn:focus-visible, .tg-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tg-tier { margin-top: 12px; font-size: .8rem; color: var(--muted); }
.tg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
/* cards + controls */
.tg-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.tg-card.flat { box-shadow: none; padding: 14px; background: color-mix(in srgb, var(--text) 3%, transparent); }
.tg-card h2 { font-size: 1.05rem; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tg-card h3 { font-size: .95rem; margin: 6px 0 10px; }
.tg-form { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; display: grid; gap: 10px; }
.tg-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.tg-toolbar.between { justify-content: space-between; }
.tg-toolbar > .tg-input[type="search"], .tg-toolbar > input[type="text"] { flex: 1 1 220px; }
.tg-input { font: inherit; font-size: .92rem; color: var(--text); background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 10px; padding: 8px 11px; min-width: 0; max-width: 100%; }
.tg-input.sm { padding: 5px 8px; font-size: .85rem; }
textarea.tg-input { width: 100%; resize: vertical; }
.tg-field { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); font-weight: 600; }
.tg-field.grow { flex: 1 1 220px; }
.tg-inline { display: flex; gap: 6px; } .tg-inline .tg-input { flex: 1; }
.tg-check { display: flex; align-items: center; gap: 8px; font-size: .9rem; padding: 3px 0; cursor: pointer; }
.tg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 12px; }
.tg-fs { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 6px; }
.tg-fs legend { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); padding: 0 6px; }
.tg-fs .tg-field { flex-direction: row; align-items: center; justify-content: space-between; }
.tg-fs .tg-field .tg-input { width: 110px; }
.tg-btn { font: inherit; font-size: .88rem; font-weight: 700; border-radius: 10px; padding: 8px 14px; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: #fff; white-space: nowrap; }
.tg-btn:hover:not([disabled]) { filter: brightness(1.08); }
.tg-btn[disabled] { opacity: .5; cursor: not-allowed; }
.tg-btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.tg-btn.danger { background: transparent; color: #ff6b6b; border-color: color-mix(in srgb, #ff6b6b 50%, transparent); }
.tg-btn.sm { padding: 4px 10px; font-size: .8rem; border-radius: 8px; }
.tg-muted { color: var(--muted); } .small { font-size: .78rem; } .tg-strong { font-weight: 700; } .tg-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.tg-badge { display: inline-block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); margin: 1px 2px 1px 0; white-space: nowrap; }
.tg-badge.bad { color: #ff7b7b; border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.tg-badge.warn { color: #f2c94c; border-color: color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.tg-badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.tg-badge.staff { color: #7fd0f5; border-color: color-mix(in srgb, var(--tg) 55%, transparent); background: color-mix(in srgb, var(--tg) 12%, transparent); }
.tg-banner { border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--line); font-size: .92rem; }
.tg-banner p + p { margin-top: 6px; } .tg-banner p { margin: 0; }
.tg-banner.bad { border-color: color-mix(in srgb, var(--bad) 60%, transparent); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.tg-banner.warn { border-color: color-mix(in srgb, var(--warn) 60%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.tg-banner.info { border-color: color-mix(in srgb, var(--tg) 50%, transparent); background: color-mix(in srgb, var(--tg) 10%, transparent); }
.tg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tg-stat { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.tg-stat-n { font-size: 1.5rem; font-weight: 800; } .tg-stat-l { font-size: .8rem; color: var(--muted); font-weight: 600; }
.tg-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: .92rem; }
.tg-dl dt { color: var(--muted); } .tg-dl dd { margin: 0; overflow-wrap: anywhere; }
.tg-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.tg-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tg-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--text) 3%, transparent); white-space: nowrap; }
.tg-table td { padding: 9px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); vertical-align: top; overflow-wrap: anywhere; }
.tg-table tr:last-child td { border-bottom: 0; }
.tg-table td.tg-act { white-space: nowrap; text-align: right; }
.tg-table td.tg-empty { text-align: center; color: var(--muted); padding: 22px; }
.tg-table tr.is-expired td { opacity: .55; } .tg-table tr.is-removed td { text-decoration: line-through; opacity: .5; }
.tg-word { letter-spacing: .06em; } .tg-word.revealed { color: #ff9b9b; }
.tg-excerpt { white-space: pre-wrap; }
.tg-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.tg-warns { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tg-warn { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.tg-warn.is-expired { opacity: .55; } .tg-warn.is-removed { opacity: .5; text-decoration: line-through; }
.tg-reason { flex: 1 1 200px; }
dialog.tg-dialog { width: min(760px, calc(100% - 24px)); max-height: calc(100vh - 40px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); color: var(--text); padding: 0; box-shadow: var(--shadow); }
dialog.tg-dialog::backdrop { background: rgba(0,0,0,.55); }
.tg-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg-elev); z-index: 1; }
.tg-dialog-head h2 { font-size: 1.05rem; overflow-wrap: anywhere; }
.tg-dialog-body { padding: 16px 18px; display: grid; gap: 12px; }
.tg-toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 100; max-width: min(380px, calc(100% - 32px)); }
.tg-toast { background: var(--bg-elev); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow); font-size: .9rem; transition: opacity .3s; }
.tg-toast.success { border-left-color: var(--ok); } .tg-toast.error { border-left-color: var(--bad); } .tg-toast.out { opacity: 0; }
footer.tg-foot { color: var(--muted); font-size: .85rem; padding: 20px 0 30px; border-top: 1px solid var(--line); }
@media (max-width: 767.98px) {
  .tg-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 0; }
  .tg-side { top: 56px; z-index: 30; margin: 0 -16px; border-radius: 0 0 14px 14px; border-width: 0 0 1px; padding: 10px 12px; box-shadow: none; background: color-mix(in srgb, var(--bg-card) 94%, transparent); backdrop-filter: blur(12px); }
  .tg-side label, .tg-tier { display: none; }
  .tg-side select { width: 100%; }
  .tg-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; margin-top: 10px; gap: 6px; scroll-snap-type: x proximity; }
  .tg-tabs::-webkit-scrollbar { display: none; }
  .tg-tabs li { flex-shrink: 0; scroll-snap-align: center; }
  .tg-tabs button { white-space: nowrap; border-color: var(--line); border-radius: 999px; padding: 6px 12px; font-size: .86rem; }
  html { scroll-padding-top: 170px; }
  .tg-card { padding: 16px; }
  /* tables become stacked rows on phones */
  .tg-table-wrap { border: 0; overflow: visible; }
  .tg-table thead { display: none; }
  .tg-table, .tg-table tbody, .tg-table tr, .tg-table td { display: block; width: 100%; }
  .tg-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; background: color-mix(in srgb, var(--text) 2%, transparent); }
  .tg-table td { border: 0; padding: 4px 0; display: flex; gap: 10px; }
  .tg-table td[data-label]:not([data-label=""])::before { content: attr(data-label); flex: 0 0 92px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; padding-top: 2px; }
  .tg-table td.tg-act { justify-content: flex-end; }
  .tg-table td.tg-badges { flex-wrap: wrap; }
  .tg-toolbar > * { flex: 1 1 100%; }
  .tg-toolbar > .tg-btn { flex: 0 0 auto; }
  .tg-fs .tg-field .tg-input { width: 96px; }
}
@media (prefers-reduced-motion: reduce) { .tg-toast { transition: none; } }
/* standby / shadow mode */
.tg-standby { border-width: 2px; border-left-width: 6px; font-size: .95rem; }
.tg-standby strong { color: #f2c94c; } body.light .tg-standby strong { color: #8a6500; }
.tg-standby-card { border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.tg-enforce { font-size: 1rem; gap: 10px; } .tg-enforce input { width: 20px; height: 20px; }
.tg-badge.shadow { color: var(--muted); border-style: dashed; background: color-mix(in srgb, var(--text) 5%, transparent); }
.tg-table tr.is-shadow td { color: var(--muted); font-style: italic; background: repeating-linear-gradient(135deg, transparent 0 8px, color-mix(in srgb, var(--text) 3%, transparent) 8px 16px); }
.tg-table tr.is-shadow td .tg-badge { font-style: normal; }

[hidden] { display: none !important; }

.tg-foot a { color: var(--accent); text-decoration: none; } .tg-foot a:hover { text-decoration: underline; }
.tg-hidden-note { font-style: italic; }
/* member lookup (section 10) */
.tg-search-card { border-color: color-mix(in srgb, var(--tg) 45%, var(--line)); }
.tg-search-row { display: flex; align-items: center; gap: 10px; background: var(--input-bg); border: 2px solid color-mix(in srgb, var(--tg) 55%, var(--input-border)); border-radius: 14px; padding: 4px 6px 4px 14px; margin-bottom: 10px; }
.tg-search-row:focus-within { border-color: var(--tg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tg) 18%, transparent); }
.tg-search-ic { font-size: 1.3rem; color: var(--tg); line-height: 1; }
.tg-search-row .tg-search-q { flex: 1; border: 0; background: transparent; font-size: 1.05rem; padding: 10px 4px; outline: none; }
.tg-search .tg-toolbar { margin-bottom: 0; }
#tgOvList:not(:empty) { margin-top: 12px; }
.tg-table tr.tg-click { cursor: pointer; } .tg-table tr.tg-click:hover td { background: color-mix(in srgb, var(--tg) 6%, transparent); }
.tg-empty-note { padding: 14px 4px; }
.tg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tg-chip { font-size: .8rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tg-chip b { color: var(--text); } .tg-chip.bad { border-color: color-mix(in srgb, var(--bad) 55%, transparent); } .tg-chip.warn { border-color: color-mix(in srgb, var(--warn) 55%, transparent); } .tg-chip.shadow { border-style: dashed; font-style: italic; }
.tg-subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tg-subtabs button { font: inherit; font-size: .88rem; font-weight: 600; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.tg-subtabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--tg); }
.tg-subpane { display: grid; gap: 10px; }
dialog.tg-dialog { width: min(920px, calc(100% - 24px)); }
/* spec-driven auto-mod (section 8) */
.tg-am-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tg-am-nav a { font-size: .78rem; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.tg-am-nav a:hover { color: var(--text); border-color: var(--tg); }
.tg-am-group { border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px 8px; margin: 0 0 12px; scroll-margin-top: 90px; }
.tg-am-group legend { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); padding: 0 6px; }
.tg-am-group > p { margin: 0 0 4px; }
.tg-am-row { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(0, 1.4fr) 34px; gap: 10px 14px; align-items: center; padding: 9px 0; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.tg-am-group legend + .tg-am-row, .tg-am-group legend + p + .tg-am-row { border-top: 0; }
.tg-am-row.is-dirty { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%); }
.tg-am-row.is-ro { opacity: .8; }
.tg-am-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .9rem; }
.tg-am-note { flex-basis: 100%; }
.tg-am-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.tg-am-ctl textarea, .tg-am-ctl input[type="text"] { width: 100%; }
.tg-am-ctl input[type="checkbox"] { width: 20px; height: 20px; }
.tg-am-row.t-str .tg-am-ctl, .tg-am-row.t-domains .tg-am-ctl, .tg-am-row.t-thresholds .tg-am-ctl { flex-direction: column; align-items: stretch; }
.tg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.tg-reset { padding: 3px 8px; }
.tg-ph { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tg-chip-btn { font: inherit; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .76rem; color: #7fd0f5; background: color-mix(in srgb, var(--tg) 10%, transparent); border: 1px solid color-mix(in srgb, var(--tg) 40%, transparent); border-radius: 6px; padding: 1px 6px; cursor: pointer; }
.tg-chip-btn[disabled] { opacity: .5; cursor: default; }
.tg-len { margin-left: auto; }
[aria-invalid="true"] { border-color: var(--bad) !important; }
.tg-am-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 6px -18px -18px; background: color-mix(in srgb, var(--bg-card) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); z-index: 5; }
.tg-grow { flex: 1; }
@media (max-width: 767.98px) {
  .tg-am-row { grid-template-columns: minmax(0, 1fr) 34px; }
  .tg-am-row .tg-am-ctl { grid-column: 1 / 2; grid-row: 2; }
  .tg-am-row .tg-reset { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .tg-am-bar { margin: 6px -16px -16px; }
  .tg-search-row .tg-search-q { font-size: 1rem; }
}
/* appeals (section 12) */
.tg-link { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.tg-link:hover { text-decoration: underline; }
.tg-table tr.is-accepted td, .tg-table tr.is-denied td { opacity: .8; }
.tg-app-out { display: block; margin-top: 4px; }
/* sections 13-14 */
.tg-note { display: block; margin-top: 4px; font-size: .82rem; }
.tg-len.over { color: var(--bad); font-weight: 700; }
.tg-adj { flex-basis: 100%; color: #f2c94c; } body.light .tg-adj { color: #8a6500; }
.tg-timeline { list-style: none; margin: 0; padding: 0 0 0 6px; border-left: 2px solid var(--line); display: grid; gap: 8px; }
.tg-tl { position: relative; padding-left: 16px; font-size: .9rem; }
.tg-tl-dot { position: absolute; left: -12px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); border: 2px solid var(--bg-elev); }
.tg-tl.join .tg-tl-dot { background: var(--ok); }
/* section 15 */
.tg-sortgrp { display: inline-flex; gap: 0; }
.tg-sortgrp select { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tg-sortgrp .tg-dir { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; min-width: 84px; }
.tg-jump-l { display: inline-flex; align-items: center; gap: 6px; }
.tg-jump { width: 84px; }
@media (max-width: 767.98px) { .tg-sortgrp { flex: 1 1 100%; } .tg-sortgrp select { flex: 1; } .tg-pager { justify-content: center; } }
