.torrent-workspace{--tp-panel:var(--surface,#15191f);--tp-line:var(--line,#2b3039);--tp-muted:var(--muted,#939caa);--tp-accent:#8ca7dc;max-width:1240px;margin:0 auto;padding:4px 0 28px;color:var(--text,#e5e7eb);font-family:inherit}
.torrent-workspace *{box-sizing:border-box}.torrent-workspace svg{width:20px;height:20px;flex:none}.torrent-workspace button,.torrent-workspace input,.torrent-workspace textarea{font:inherit}.torrent-workspace button{cursor:pointer}.torrent-workspace button:disabled{opacity:.45;cursor:wait}.torrent-workspace button:focus-visible,.torrent-workspace input:focus-visible,.torrent-workspace textarea:focus-visible{outline:2px solid var(--tp-accent);outline-offset:3px}
.tp-hero{display:flex;align-items:center;gap:17px;margin:10px 0 26px}.tp-hero__icon{width:58px;height:58px;display:grid;place-items:center;border:1px solid #91b0e733;border-radius:18px;background:linear-gradient(140deg,#8ca7dc22,#8ca7dc04);color:#aac2ee}.tp-hero__icon svg{width:29px;height:29px}.tp-eyebrow{font-size:9px;letter-spacing:1.6px;color:var(--tp-muted);font-weight:600}.tp-hero h1{font-size:25px;line-height:1.3;letter-spacing:-.7px;margin:4px 0 4px;font-weight:650}.tp-hero p{font-size:11px;color:var(--tp-muted);margin:0}.tp-connection{display:flex;gap:7px;align-items:center;margin-left:auto;align-self:center;font-size:10px;color:#c6ad77;border:1px solid #c6ad7730;background:#c6ad7708;padding:8px 11px;border-radius:20px;white-space:nowrap}.tp-connection i{width:5px;height:5px;border-radius:50%;background:currentColor}.tp-connection.is-ready{color:#83b9a4;border-color:#83b9a430;background:#83b9a408}
.tp-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:26px}.tp-metric{position:relative;border:1px solid var(--tp-line);border-radius:13px;padding:16px 18px;background:var(--tp-panel);overflow:hidden}.tp-metric>span{display:block;color:var(--tp-muted);font-size:10px;margin-bottom:13px}.tp-metric>strong{font-size:28px;line-height:1;font-variant-numeric:tabular-nums;font-weight:550;letter-spacing:-1px}.tp-metric>i{position:absolute;right:17px;bottom:17px;color:#687587}.tp-metric[data-metric=active]>strong{color:#e3a2a9}.tp-metric[data-metric=active]{background:linear-gradient(125deg,#d8818d0a,transparent),var(--tp-panel)}
.tp-tabs{display:flex;gap:22px;border-bottom:1px solid var(--tp-line);margin-bottom:23px}.tp-tabs button{padding:0 2px 13px;background:none;border:0;border-bottom:2px solid transparent;color:var(--tp-muted);font-size:12px;font-weight:550}.tp-tabs button[aria-pressed=true]{border-color:var(--tp-accent);color:var(--text)}.tp-toolbar{display:flex;gap:10px;margin-bottom:13px}.tp-search{display:flex;align-items:center;gap:10px;flex:1;min-width:0;border:1px solid var(--tp-line);border-radius:10px;background:var(--tp-panel);padding:7px 9px 7px 13px}.tp-search>svg{width:16px;height:16px;color:var(--tp-muted)}.tp-search input{width:100%;min-width:0;border:0;background:none;outline:0;color:inherit;font-size:11px;padding:4px 0}.tp-search button,.tp-refresh{border:1px solid var(--tp-line);background:#ffffff04;border-radius:7px;color:var(--text);padding:7px 13px;font-size:10px}.tp-refresh{width:43px;display:grid;place-items:center;padding:0}.tp-refresh svg{width:16px}.tp-filters{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:19px}.tp-filters button{background:none;color:var(--tp-muted);border:1px solid transparent;border-radius:7px;padding:6px 10px;font-size:10px}.tp-filters button[aria-pressed=true]{background:#90a7ce12;color:#c0d0ec;border-color:#90a7ce30}
.tp-reports{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.tp-report{border:1px solid var(--tp-line);background:var(--tp-panel);border-radius:13px;padding:17px;transition:border-color .18s,background .18s;min-width:0}.tp-report:hover{border-color:#687c9a}.tp-report header{display:flex;gap:10px;align-items:center;min-width:0}.tp-avatar{display:grid;place-items:center;width:33px;height:33px;border-radius:10px;background:#97aace10;color:#aab9d0;flex:none}.tp-avatar svg{width:16px}.tp-report__identity{min-width:0;flex:1}.tp-report__identity strong{font-size:12px;font-weight:550;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tp-report__identity code{display:block;overflow:hidden;text-overflow:ellipsis;font-size:8px;color:var(--tp-muted);margin-top:5px;white-space:nowrap}.tp-badge{border-radius:6px;padding:5px 7px;font-size:8px;white-space:nowrap;flex:none;border:1px solid transparent}.tp-badge--active{color:#e3a2a9;background:#d8818d0d;border-color:#d8818d20}.tp-badge--released{color:#87b6a1;background:#87b6a10a;border-color:#87b6a120}.tp-badge--observed{color:#c5b58e;background:#c5b58e0a;border-color:#c5b58e20}.tp-report__node{display:flex;gap:8px;align-items:center;font-size:11px;margin:20px 0 15px;color:#c1c9d6}.tp-report__node svg{width:14px;height:14px;color:#7e91ae}.tp-report__facts{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:13px;border-radius:8px;background:#ffffff03;border:1px solid #ffffff05}.tp-report__facts small{display:block;color:var(--tp-muted);font-size:9px;margin-bottom:7px}.tp-report__facts code,.tp-report__facts strong{font-size:11px;font-weight:450;overflow-wrap:anywhere}.tp-report__until{display:flex;align-items:center;gap:7px;color:var(--tp-muted);font-size:9px;margin:13px 0 16px;min-height:23px}.tp-report__until svg{width:13px;height:13px}.tp-report__until strong{font-weight:450;color:#c1c9d6;white-space:nowrap}.tp-report footer{display:flex;justify-content:space-between;gap:8px;align-items:center;padding-top:12px;border-top:1px solid var(--tp-line);font-size:8px;color:var(--tp-muted)}.tp-report footer i{font-style:normal;margin:0 4px}.tp-report footer button{background:none;border:0;font-size:9px;color:#a6bce0;padding:2px 0}.tp-muted{opacity:.7}.tp-empty{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;text-align:center;padding:65px 20px;border:1px dashed var(--tp-line);border-radius:14px;color:var(--tp-muted)}.tp-empty>svg{width:36px;height:36px;color:#7f94b5;margin-bottom:9px}.tp-empty h3{font-size:14px;font-weight:500;color:var(--text);margin:12px 0 8px}.tp-empty p{font-size:11px;line-height:1.7;max-width:350px;margin:0}.tp-more{display:block;margin:20px auto;background:#ffffff05;border:1px solid var(--tp-line);border-radius:8px;color:var(--text);padding:9px 22px;font-size:11px}.tp-setup{border-top:1px solid var(--tp-line);margin-top:24px;padding-top:16px;color:var(--tp-muted);font-size:10px}.tp-setup summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between}.tp-setup p{line-height:1.8;max-width:700px}.tp-setup code{color:#a4b7d5;overflow-wrap:anywhere}.tp-error{padding:13px;border:1px solid #d77f8640;color:#e5a7ad;background:#d77f8608;border-radius:8px;margin:0 0 16px;font-size:11px}.tp-error button{border:0;background:none;text-decoration:underline;color:inherit}.tp-section-heading h2{font-size:16px;margin:0 0 7px;font-weight:550}.tp-section-heading p{font-size:11px;color:var(--tp-muted);margin:0 0 21px;line-height:1.7}
.tp-templates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.tp-template{min-width:0;background:var(--tp-panel);border:1px solid var(--tp-line);border-radius:14px;padding:19px}.tp-template>header{display:flex;align-items:center;gap:10px;padding-bottom:19px;margin-bottom:18px;border-bottom:1px solid var(--tp-line)}.tp-template__icon{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;color:#a7bde3;background:#a7bde310}.tp-template[data-template=admin] .tp-template__icon{color:#c4b2d7;background:#c4b2d710}.tp-template__icon svg{width:19px}.tp-template h3{font-size:13px;font-weight:550;margin:0 0 5px}.tp-template header p{font-size:9px;color:var(--tp-muted);margin:0}.tp-switch{margin-left:auto;position:relative;cursor:pointer;flex:none}.tp-switch input{position:absolute;inset:0;opacity:0;cursor:pointer;z-index:1;width:100%;height:100%}.tp-switch>span{display:block;width:30px;height:18px;border-radius:20px;background:#3b414d;transition:background .2s}.tp-switch>span:after{content:'';position:absolute;width:12px;height:12px;top:3px;left:3px;background:#d1d8e3;border-radius:50%;transition:transform .2s}.tp-switch input:checked+span{background:#687fa6}.tp-switch input:checked+span:after{transform:translateX(12px)}.tp-switch input:focus-visible+span{outline:2px solid var(--tp-accent);outline-offset:3px}.tp-template__label{display:flex;justify-content:space-between;font-size:10px;margin-bottom:9px}.tp-template__label>span{font-size:8px;color:var(--tp-muted)}.tp-template textarea{display:block;width:100%;min-height:190px;resize:vertical;color:#cbd4e1;border:1px solid #313846;background:#0d111780;border-radius:9px;padding:13px;font-family:ui-monospace,monospace;font-size:11px;line-height:1.75;tab-size:2}.tp-variables{display:flex;flex-wrap:wrap;gap:5px;margin:11px 0 20px}.tp-variables button{border:1px solid #7d98c324;background:#7d98c30a;color:#9eb5da;padding:4px 6px;border-radius:5px;font-family:ui-monospace,monospace;font-size:8px}.tp-preview-head{display:flex;justify-content:space-between;gap:8px;color:var(--tp-muted);font-size:8px;letter-spacing:1px;margin-bottom:11px}.tp-preview-head small{letter-spacing:0;font-size:8px}.tp-telegram{position:relative;background:linear-gradient(145deg,#263447,#202b3a);border:1px solid #7c99c318;border-radius:10px 10px 3px 10px;padding:14px 15px 27px;min-height:175px}.tp-preview{white-space:pre-wrap;font-size:11px;line-height:1.8;overflow-wrap:anywhere;color:#dbe3ef}.tp-preview b{font-weight:650}.tp-preview code{font-size:10px;color:#a4c2ef}.tp-preview a{color:#a4c2ef}.tp-telegram__stamp{position:absolute;bottom:9px;right:12px;font-size:8px;color:#8ba5c7}.tp-note{display:flex;gap:9px;align-items:center;padding:15px 0;color:var(--tp-muted)}.tp-note svg{width:15px;height:15px}.tp-note p{font-size:10px;line-height:1.7;margin:0}.tp-save{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid var(--tp-line);padding-top:17px}.tp-save>span{font-size:10px;color:var(--tp-muted)}.tp-save>button{border:1px solid #9eb5da40;background:#9eb5da18;color:#c7d6ee;border-radius:8px;padding:10px 16px;font-size:11px}.tp-loader{width:24px;height:24px;border:2px solid #7487a433;border-top-color:#a1b7d9;border-radius:50%;animation:tp-spin .8s linear infinite}@keyframes tp-spin{to{transform:rotate(360deg)}}
@media(max-width:800px){.tp-hero{flex-wrap:wrap;gap:12px}.tp-hero__icon{width:45px;height:45px;border-radius:13px}.tp-hero h1{font-size:22px}.tp-connection{font-size:9px}.tp-metrics{gap:8px}.tp-metric{padding:13px}.tp-metric>span{font-size:9px;max-width:100px;line-height:1.5;min-height:26px}.tp-metric>strong{font-size:24px}.tp-metric>i{right:11px;bottom:12px}.tp-metric>i svg{width:16px}.tp-reports,.tp-templates{grid-template-columns:1fr}.tp-template textarea{min-height:170px}}
@media(max-width:500px){.torrent-workspace{padding:0 0 20px}.tp-hero{margin-top:4px;margin-bottom:18px}.tp-hero p{font-size:10px}.tp-eyebrow{font-size:8px}.tp-connection{margin-left:57px;padding:5px 8px;margin-top:-3px}.tp-metrics{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:20px}.tp-metric>span{min-height:0;margin-bottom:12px}.tp-metric>strong{font-size:26px}.tp-hero h1{font-size:23px}.tp-tabs{margin-bottom:18px}.tp-filters{gap:3px}.tp-filters button{font-size:9px;padding:6px 7px}.tp-report{padding:14px}.tp-report header{flex-wrap:wrap}.tp-report__identity{min-width:140px}.tp-badge{margin-left:43px}.tp-report__node{margin-top:15px}.tp-report__until{font-size:9px}.tp-report footer{flex-wrap:wrap;row-gap:9px}.tp-search{gap:7px;padding-left:10px}.tp-search input{font-size:10px}.tp-search button{padding:7px 9px}.tp-template{padding:15px}.tp-save{align-items:stretch;flex-direction:column}.tp-note{align-items:flex-start}.tp-section-heading h2{font-size:14px}.tp-empty{padding:40px 16px}.tp-setup summary{padding:5px 0}.tp-template__label{font-size:10px}}
.torrent-workspace .tp-switch{display:block;width:30px;height:18px;min-height:18px}
.torrent-workspace .tp-switch>input{position:absolute!important;inset:0!important;width:30px!important;height:18px!important;margin:0!important;opacity:0!important;appearance:none!important}
.torrent-workspace .tp-metrics{margin-top:4px;margin-bottom:12px}
.torrent-workspace .tp-setup{margin:0 0 18px;padding:0;border:1px solid var(--tp-line);border-radius:12px;background:var(--tp-panel);color:var(--text);overflow:hidden}
.torrent-workspace .tp-setup summary{display:grid;grid-template-columns:minmax(0,1fr) auto 16px;align-items:center;gap:12px;padding:13px 16px;list-style:none;cursor:pointer}
.torrent-workspace .tp-setup summary::-webkit-details-marker{display:none}
.torrent-workspace .tp-setup__heading{min-width:0;display:flex;flex-direction:column;gap:3px}
.torrent-workspace .tp-setup__heading strong{font-size:12px;font-weight:600}
.torrent-workspace .tp-setup__heading small{font-size:10px;color:var(--tp-muted)}
.torrent-workspace .tp-setup .tp-connection{margin:0;align-self:center;font-size:10px;padding:6px 9px}
.torrent-workspace .tp-setup__chevron{font-size:18px;line-height:1;color:var(--tp-muted);transition:transform .2s}
.torrent-workspace .tp-setup[open] .tp-setup__chevron{transform:rotate(180deg)}
.torrent-workspace .tp-setup__body{border-top:1px solid var(--tp-line);padding:8px 16px 12px;color:var(--tp-muted)}
.torrent-workspace .tp-setup__body p{font-size:11px;line-height:1.65;margin:8px 0}
.torrent-workspace .tp-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;border:0;margin:0 0 19px}
.torrent-workspace .tp-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:64px;width:100%;padding:10px 8px;border:1px solid var(--tp-line);border-radius:11px;background:var(--tp-panel);color:var(--tp-muted);text-align:center;transition:background .18s,border-color .18s,color .18s,box-shadow .18s}
.torrent-workspace .tp-tabs button:hover{border-color:#7c93b044;color:var(--text)}
.torrent-workspace .tp-tabs button[aria-pressed=true]{border-color:#8ca7dc75;background:linear-gradient(135deg,#8ca7dc20,#8ca7dc0b);box-shadow:inset 0 0 0 1px #8ca7dc15;color:var(--text)}
.torrent-workspace .tp-tabs button strong{font-size:13px;font-weight:620;line-height:1.2}
.torrent-workspace .tp-tabs button small{font-size:10px;font-weight:400;line-height:1.2;color:var(--tp-muted)}
.torrent-workspace .tp-autosave{min-height:18px;margin:15px 2px 0;color:var(--tp-muted);font-size:11px;line-height:1.5}
.torrent-workspace .tp-autosave[data-state=saved]{color:#83b9a4}
.torrent-workspace .tp-autosave[data-state=error]{color:#e3a2a9}
@media(max-width:500px){.torrent-workspace .tp-metrics{gap:9px;margin-top:0;margin-bottom:10px}.torrent-workspace .tp-metric{padding:14px;min-height:91px}.torrent-workspace .tp-metric>span{font-size:10px;line-height:1.35;margin-bottom:11px}.torrent-workspace .tp-metric>strong{font-size:27px}.torrent-workspace .tp-setup summary{gap:8px;padding:12px}.torrent-workspace .tp-setup__heading strong{font-size:11px}.torrent-workspace .tp-setup__heading small{font-size:9px}.torrent-workspace .tp-setup .tp-connection{font-size:9px;padding:5px 7px}.torrent-workspace .tp-tabs{gap:8px;margin-bottom:17px}.torrent-workspace .tp-tabs button{min-height:58px}.torrent-workspace .tp-tabs button strong{font-size:12px}.torrent-workspace .tp-tabs button small{font-size:9px}.torrent-workspace .tp-filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:5px;margin-bottom:15px}.torrent-workspace .tp-filters::-webkit-scrollbar{display:none}.torrent-workspace .tp-filters button{flex:none;font-size:10px;min-height:31px;padding:6px 9px}.torrent-workspace .tp-search input{font-size:12px}.torrent-workspace .tp-search button{font-size:11px}.torrent-workspace .tp-empty{padding:28px 16px}.torrent-workspace .tp-empty h3{margin-top:0;font-size:13px}.torrent-workspace .tp-empty p{font-size:11px}}
@media(max-width:500px){.torrent-workspace .tp-setup summary{grid-template-columns:minmax(0,1fr) 16px;grid-template-areas:'heading chevron' 'status status';row-gap:10px}.torrent-workspace .tp-setup__heading{grid-area:heading}.torrent-workspace .tp-setup__chevron{grid-area:chevron}.torrent-workspace .tp-setup .tp-connection{grid-area:status;justify-self:start}}
@media(prefers-reduced-motion:reduce){.torrent-workspace *{animation:none!important;transition:none!important}}

/* Shared Mini App controls and disclosure motion. */
.torrent-workspace .tp-setup{interpolate-size:allow-keywords}
.torrent-workspace .tp-setup__chevron{display:grid;place-items:center;width:17px;height:17px}
.torrent-workspace .tp-setup__chevron svg{width:17px;height:17px;color:var(--icon-color,var(--tp-muted))}
.torrent-workspace .tp-setup::details-content{block-size:0;opacity:0;overflow:clip;transition:block-size .28s ease,opacity .2s ease,content-visibility .28s allow-discrete}
.torrent-workspace .tp-setup[open]::details-content{block-size:auto;opacity:1}
.torrent-workspace .tp-search{background:var(--control-material,var(--tp-panel))}
.torrent-workspace .tp-search input[type=search]{border:0;box-shadow:none;outline:0}
.torrent-workspace .tp-search:focus-within{border-color:var(--accent,var(--tp-accent))}
.torrent-workspace .tp-report header{gap:8px}
.torrent-workspace .tp-template>header>div{min-width:0}
@media(max-width:500px){.torrent-workspace .tp-badge{margin-left:0}}
@media(prefers-reduced-motion:reduce){.torrent-workspace .tp-setup::details-content{transition:none}}
