/* Экран «Digital / Telegram». Базовые классы .bot-tabs/.bot-tab/.bot-tab-content/.bot-status-card
   переиспользуются из hr-bot-admin.css; здесь — только специфика telegram-экрана. */

.tg-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.tg-head__actions{display:flex;gap:10px}
.tg-btn{border:0;background:#1f73e0;color:#fff;font-weight:800;border-radius:12px;padding:10px 16px;cursor:pointer;transition:filter .15s ease}
.tg-btn:hover{filter:brightness(1.06)}
.tg-btn.ghost{background:#eef3fb;color:#3a4a60}

.tg-card{background:#fff;border:1px solid #e7eef7;border-radius:18px;overflow:hidden;margin-top:14px}

.tg-status{margin:0 0 18px}
.tg-status__right{display:flex;flex-direction:column;align-items:flex-end;gap:4px;text-align:right}
.tg-status__right b{font-size:16px}
.tg-status__right small{color:#7a899b}
.tg-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px;vertical-align:middle}
.tg-dot.green{background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.15)}
.tg-dot.red{background:#ef4444;box-shadow:0 0 0 4px rgba(239,68,68,.15)}
.tg-dot.grey{background:#9aa7b6;box-shadow:0 0 0 4px rgba(154,167,182,.15)}

.tg-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.tg-metric{background:#f7faff;border:1px solid #e7eef7;border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:4px}
.tg-metric__val{font-size:22px;font-weight:800;letter-spacing:-.03em;color:#1d2b3a}
.tg-metric__lbl{font-size:12.5px;color:#6a7b8e;line-height:1.35}

.tg-settings-preview{margin-top:18px}
.tg-settings-preview h4{margin:0 0 10px;font-size:15px;color:#3a4a60;letter-spacing:-.02em}

.tg-empty,.tg-loading,.tg-error{padding:18px;border-radius:14px}
.tg-empty{background:#f7faff;border:1px dashed #c9d8ea;color:#46586c}
.tg-empty__hint{margin-top:8px;font-size:13px;color:#7a899b}
.tg-empty code{background:#eef3fb;padding:2px 6px;border-radius:6px}
.tg-loading{color:#6a7b8e}
.tg-error{background:#fff1f1;border:1px solid #ffd4d4;color:#b42318;margin-bottom:14px}

.tg-dot.orange{background:#f59e0b;box-shadow:0 0 0 4px rgba(245,158,11,.15)}

/* блоки (аккаунт, группы) */
.tg-block{margin-top:18px;padding-top:16px;border-top:1px solid #e7eef7}
.tg-block h4{margin:0 0 12px;font-size:15px;color:#3a4a60;letter-spacing:-.02em}
.tg-block h5{margin:0 0 8px;font-size:12.5px;color:#6a7b8e;font-weight:700;text-transform:uppercase;letter-spacing:.03em}
.tg-acc{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.tg-acc>div{display:flex;flex-direction:column;gap:3px;background:#f7faff;border:1px solid #e7eef7;border-radius:12px;padding:12px 14px}
.tg-acc span{font-size:12px;color:#6a7b8e}
.tg-acc b{font-size:15px;color:#1d2b3a;display:flex;align-items:center}
.tg-groups{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.tg-grp{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:6px 0;font-size:14px;color:#1d2b3a}
.tg-grp label{display:flex;align-items:center;gap:9px;cursor:pointer;flex:1;min-width:0}
.tg-grp span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-grp input{width:18px;height:18px;accent-color:#1f73e0;cursor:pointer;flex:none}
.tg-grp-del{border:0;background:transparent;cursor:pointer;font-size:15px;opacity:.55;padding:2px 6px}
.tg-grp-del:hover{opacity:1}
.tg-blocked-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 0;font-size:14px}
.tg-grp-add{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px}
.tg-grp-add input{flex:1;min-width:220px;padding:9px 11px;border:1px solid #cbd5e1;border-radius:10px;font-size:14px}
.tg-grp-add input:focus{outline:none;border-color:#1f73e0;box-shadow:0 0 0 3px rgba(31,115,224,.12)}
.tg-auth{margin-top:10px}
.tg-auth .tg-form__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:10px}
.tg-err-inline{color:#b42318;font-size:13px;margin:6px 0}
.tg-actions{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:8px}
.tg-actions .tg-btn[disabled]{opacity:.5;cursor:not-allowed}

/* форма управления настройками бота */
.tg-form{margin-top:18px;padding-top:16px;border-top:1px solid #e7eef7}
.tg-form h4{margin:0 0 12px;font-size:15px;color:#3a4a60;letter-spacing:-.02em}
.tg-form__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.tg-form label{display:flex;flex-direction:column;gap:6px;font-size:12.5px;color:#6a7b8e}
.tg-form input,.tg-form select{padding:9px 11px;border:1px solid #cbd5e1;border-radius:10px;font-size:14px;color:#1d2b3a;background:#fff}
.tg-form input:focus,.tg-form select:focus{outline:none;border-color:#1f73e0;box-shadow:0 0 0 3px rgba(31,115,224,.12)}
.tg-form__foot{display:flex;align-items:center;gap:14px;margin-top:16px}
.tg-form__note{font-size:13px;color:#16a34a}

@media(max-width:900px){
  .tg-metrics{grid-template-columns:1fr 1fr}
  .tg-form__grid{grid-template-columns:1fr 1fr}
  .tg-head{display:block}
  .tg-head__actions{margin-top:12px}
}

/* ===== «Общая статистика» Инвайтер: карточки + бублик (реальные данные /summary) ===== */
.tgs-plate .tgs-head h4{margin:0 0 14px;font-size:16px;font-weight:700;color:#1f2a44}
.tgs-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.tgs-card{display:flex;align-items:center;gap:12px;border:1px solid #e7ebf2;border-radius:14px;padding:14px;background:#fff}
.tgs-ic{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;flex:none}
.tgs-ic svg{width:19px;height:19px}
.tgs-meta{min-width:0}
.tgs-l{color:#8b93a6;font-size:12px;line-height:1.3}
.tgs-n{font-size:22px;font-weight:800;color:#1f2a44;margin-top:2px;font-family:'Bricolage Grotesque',Manrope,sans-serif}
.tgs-ic.tone-blue{background:#e8f0fe;color:#2f6fed}
.tgs-ic.tone-green{background:#e4f5ec;color:#16a34a}
.tgs-ic.tone-red{background:#fdeaea;color:#e24b4a}
.tgs-ic.tone-purple{background:#ece7fb;color:#7c5cdb}
.tgs-ic.tone-amber{background:#fdeccf;color:#e8920c}
.tgs-ic.tone-indigo{background:#e7e9fb;color:#5b6ee0}
.tgs-ic.tone-teal{background:#ddf1eb;color:#13a085}
.tgs-donutcard{border:1px solid #e7ebf2;border-radius:14px;padding:18px;background:#fff}
.tgs-dh{font-weight:700;color:#1f2a44;margin-bottom:14px;font-size:15px}
.tgs-donutrow{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
.tgs-donut{position:relative;width:160px;height:160px;flex:none}
.tgs-donut svg{width:160px;height:160px}
.tgs-donut-c{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.tgs-donut-c b{font-size:24px;font-weight:800;color:#1f2a44;font-family:'Bricolage Grotesque',Manrope,sans-serif}
.tgs-donut-c small{color:#8b93a6;font-size:11px}
.tgs-legend{flex:1;min-width:200px;display:flex;flex-direction:column;gap:9px}
.tgs-leg{display:flex;align-items:center;gap:9px;font-size:13px;color:#1f2a44}
.tgs-ld{width:9px;height:9px;border-radius:50%;flex:none}
.tgs-leg b{margin-left:auto;font-weight:800}
.tgs-leg i{font-style:normal;color:#8b93a6;width:52px;text-align:right;font-size:12px}
@media(max-width:1000px){.tgs-cards{grid-template-columns:repeat(2,1fr)}}

/* ===== полный макет статистики Инвайтера (карточки+спарклайн+график+нижние) ===== */
.tgs-cards--sm{margin-bottom:16px}
.tgs-card.big{flex-direction:column;align-items:stretch;gap:10px}
.tgs-ctop{display:flex;align-items:flex-start;gap:12px}
.tgs-d{font-size:12px;font-weight:700;margin-top:6px}
.tgs-d small{color:#8b93a6;font-weight:600}
.tgs-d.up{color:#16a34a}.tgs-d.down{color:#e24b4a}
.tgs-spark{width:100%;height:38px;display:block}
.tgs-viz{display:grid;grid-template-columns:1.35fr 1fr;gap:14px;margin-bottom:16px}
.tgs-vcard{border:1px solid #e7ebf2;border-radius:14px;padding:18px;background:#fff;min-width:0}
.tgs-chartwrap{height:230px}
.tgs-line{width:100%;height:230px;display:block}
.tgs-chart-empty{height:230px;display:flex;align-items:center;justify-content:center;text-align:center;color:#8b93a6;font-size:13px;background:#f8fafd;border-radius:12px;padding:0 24px}
.tgs-bottom{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.tgs-bcard{display:flex;align-items:center;gap:13px;border:1px solid #e7ebf2;border-radius:14px;padding:16px;background:#fff}
.tgs-bn{font-size:22px;font-weight:800;color:#1f2a44;margin-top:2px;font-family:'Bricolage Grotesque',Manrope,sans-serif}
.tgs-bn small{font-size:12px;font-weight:600;color:#8b93a6}
@media(max-width:1000px){.tgs-viz{grid-template-columns:1fr}.tgs-bottom{grid-template-columns:1fr}}
