/* v107 tgcab: мини-кабинет и служебный раздел админов в Mini App. Только body.tg .tc… — в кабинете сайта не действует. */
body.tg .tc{max-width:520px;margin:0 auto;padding:12px 12px calc(20px + env(safe-area-inset-bottom));box-sizing:border-box;overflow-x:hidden}
body.tg .tc *{box-sizing:border-box}
body.tg .tc h2{font-size:15px;margin:18px 2px 8px;font-weight:600}
body.tg .tc-head{margin:2px 2px 10px}
body.tg .tc-hi{font-size:19px;font-weight:600}
body.tg .tc-sub{font-size:13px;margin:4px 2px}
body.tg .tc-sec{margin-top:6px}
body.tg .tc-sec-h{display:flex;align-items:center;justify-content:space-between;gap:8px}
body.tg .tc-sec-h h2{margin-bottom:8px}
body.tg .tc-row{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
body.tg .tc-pill{display:inline-block;font-size:12px;line-height:1.3;padding:3px 8px;border-radius:99px;
  background:var(--tg-bg-color,#fff);color:var(--tg-text-color,#111);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
body.tg .tc-pill.tc-new{background:var(--tg-button-color,#2481cc);color:var(--tg-button-text-color,#fff)}
body.tg .tc-pill.tc-warn,body.tg .tc-alert{color:#b45309}
body.tg .tc-pill.tc-mid{color:#2563eb}
body.tg .tc-alert{font-size:13px;margin-top:6px}
body.tg .tc-plan{display:flex;flex-direction:column;gap:8px}
body.tg .tc-bar{height:6px;border-radius:6px;background:var(--tg-bg-color,#fff);overflow:hidden;margin:2px 0 4px}
body.tg .tc-bar i{display:block;height:100%;background:#16a34a;border-radius:6px}
body.tg .tc-bar i.tc-mid{background:#f59e0b}
body.tg .tc-bar i.tc-bad{background:#dc2626}
body.tg .tc-place span{font-size:13px}
body.tg .tc-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin-top:10px}
body.tg .tc-link{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--tg-text-color,#111);font-weight:500}
body.tg .tc-link span{font-size:20px}
body.tg .tc-gal{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--tg-text-color,#111);margin-bottom:8px;padding:8px}
body.tg .tc-cover{flex:0 0 64px;height:64px;border-radius:8px;overflow:hidden;background:var(--tg-bg-color,#e5e7eb)}
body.tg .tc-cover img{width:100%;height:100%;object-fit:cover;display:block}
body.tg .tc-gi{min-width:0;flex:1}
body.tg .tc-gt{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.tg .tc-gm{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.tg .tc-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
body.tg .tc-notice{margin-bottom:8px;display:flex;flex-direction:column;gap:6px;font-size:14px}
body.tg .tc-warnbox{box-shadow:inset 3px 0 0 #f59e0b}
body.tg .tc-ntext{overflow-wrap:anywhere}
body.tg .tc-nact{display:flex;gap:12px;align-items:center;justify-content:flex-end}
body.tg .tc-mini{border:0;background:none;color:var(--tg-link-color,#2481cc);font:inherit;font-size:13px;padding:4px 0;cursor:pointer}
body.tg .tc-prefs{display:flex;flex-direction:column;gap:10px}
body.tg .tc-sw{display:flex;align-items:center;gap:10px}
body.tg .tc-sw input{width:20px;height:20px;accent-color:var(--tg-button-color,#2481cc)}
body.tg .tc-time{display:flex;align-items:center;justify-content:space-between;gap:10px}
body.tg .tc-time input{font:inherit;padding:6px 8px;border-radius:8px;border:1px solid var(--tg-hint-color,#ccc);
  background:var(--tg-bg-color,#fff);color:var(--tg-text-color,#111)}
body.tg .tc-renew,body.tg .tc-gap{margin-top:12px}
body.tg .tc-empty{margin-top:30vh;text-align:center}
body.tg .tc-tabs{display:flex;gap:6px;position:sticky;top:0;padding:4px 0 8px;background:var(--tg-bg-color,#fff);z-index:2}
body.tg .tc-tab{flex:1;border:0;border-radius:10px;padding:9px 4px;font:inherit;font-size:14px;cursor:pointer;
  background:var(--tg-secondary-bg-color,#f1f1f4);color:var(--tg-text-color,#111)}
body.tg .tc-tab.on{background:var(--tg-button-color,#2481cc);color:var(--tg-button-text-color,#fff)}
body.tg .tc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.tg .tc-kpi{display:flex;flex-direction:column;gap:2px}
body.tg .tc-kpi b{font-size:22px}
body.tg .tc-badt{color:#dc2626}
body.tg .tc-list{display:flex;flex-direction:column;gap:8px;font-size:14px}
body.tg .tc-mod,body.tg .tc-payc{margin-bottom:10px;display:flex;flex-direction:column;gap:8px;font-size:14px}
body.tg .tc-modimg{position:relative;aspect-ratio:4/3;border-radius:8px;overflow:hidden;background:#e5e7eb;cursor:pointer}
body.tg .tc-modimg img{width:100%;height:100%;object-fit:cover;display:block}
body.tg .tc-modimg span{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-weight:600;text-shadow:0 1px 3px rgba(0,0,0,.6)}
body.tg .tc-modimg.open span{display:none}
body.tg .tc-modi{display:flex;flex-direction:column;gap:3px;overflow-wrap:anywhere}
body.tg .tc-modi .tc-pill{align-self:flex-start}
body.tg .tc-acts{display:flex;gap:6px;flex-wrap:wrap}
body.tg .tc-act{flex:1 1 90px;border:0;border-radius:10px;padding:10px 6px;font:inherit;font-size:14px;cursor:pointer;
  background:var(--tg-bg-color,#fff);color:var(--tg-text-color,#111)}
body.tg .tc-act.tc-ok{background:var(--tg-button-color,#2481cc);color:var(--tg-button-text-color,#fff)}
body.tg .tc-act.tc-no{color:#dc2626}
body.tg .tc-act:disabled{opacity:.5}
body.tg .tc-toast{position:fixed;left:12px;right:12px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:9;
  background:rgba(17,17,17,.88);color:#fff;border-radius:10px;padding:10px 12px;font-size:14px;text-align:center;
  opacity:0;transform:translateY(8px);transition:.2s;pointer-events:none}
body.tg .tc-toast.on{opacity:1;transform:none}
