@charset "UTF-8";
:root{--paper:#f5f6f8;--card:#ffffff;--ink:#202938;--muted:#596575;--line:#dce1e8;--blue:#3656c7;--blue-dark:#2843a3;--blue-light:#edf1ff;--orange:#8c5b12;--orange-light:#fff6e7;--green:#246848;--green-light:#eaf5ef;--red:#b32d3b;--red-light:#fff0f1;--shadow:0 12px 40px #1c2a4312;--radius:14px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-size:14px;line-height:1.5;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}
body{margin:0}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
button:disabled{cursor:wait;opacity:.5}
a{color:var(--blue);text-decoration:none}
a:hover{text-decoration:underline}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #87a7f1;outline-offset:3px}
button,input,select,textarea{outline-offset:3px}
input,select,textarea{min-width:0}
h1,h2,h3,p{margin-top:0}
h1{font-size:30px;line-height:1.18;letter-spacing:-1px;margin-bottom:9px}
h2{font-size:19px;letter-spacing:-.5px}
h3{font-size:14px;font-weight:650}
small{font-size:14px}
[hidden]{display:none!important}
.skip-link{position:absolute;left:15px;top:-60px;padding:10px 15px;z-index:100;background:white;border:1px solid var(--blue);border-radius:8px}
.skip-link:focus{top:10px}
.brand{display:flex;align-items:center;gap:11px;color:var(--ink);font-size:20px;font-weight:750;letter-spacing:-.7px;white-space:nowrap}
.brand:hover{text-decoration:none}
.brand small{display:block;font-size:12px;font-weight:500;letter-spacing:.1px;color:var(--muted)}
.brand-mark{display:flex;justify-content:center;align-items:center;background:var(--blue);width:39px;height:39px;border-radius:11px;letter-spacing:-5px;font-size:29px;line-height:1;color:white;padding-right:6px}
.brand-mark span{color:#ffffff}
.app{display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100dvh}
.sidebar{padding:31px 18px 20px;border-right:1px solid var(--line);display:flex;flex-direction:column;background:#ffffff;position:sticky;top:0;height:100dvh;z-index:25}
.sidebar .brand{padding:0 9px;margin-bottom:49px}
.nav-label{font-size:11px;font-weight:700;letter-spacing:1.4px;color:#596575;padding:0 12px;margin-bottom:14px}
.nav-item{display:flex;align-items:center;gap:12px;padding:11px 13px;margin:3px 0;border-radius:9px;color:#596575;font-size:13px;font-weight:550;transition:background .15s}
.nav-item:hover{background:#f0f2f5;text-decoration:none}
.nav-item.active{background:var(--blue-light);color:var(--blue);font-weight:700}
.nav-icon{width:19px;text-align:center;font-size:17px;font-weight:500}
.nav-item .nav-count{margin-left:auto;background:#fff;color:var(--blue);font-size:12px;min-width:23px;text-align:center;border-radius:5px;padding:1px 5px}
.nav-divider{border-top:1px solid var(--line);margin:22px 10px}
.sidebar-bottom{display:flex;align-items:center;gap:10px;border-top:1px solid var(--line);padding:20px 8px 0;margin-top:auto}
.owner-avatar{display:grid;place-items:center;width:33px;height:33px;background:#f0f2f5;border-radius:50%;font-size:14px;font-weight:700;color:#596575}
.sidebar-bottom strong{font-size:14px;max-width:110px;overflow:hidden;text-overflow:ellipsis;display:block}
.sidebar-bottom small{display:block;color:var(--muted);font-size:12px}
.sidebar-bottom button{margin-left:auto}
.workspace{min-width:0;display:flex;flex-direction:column}
.topbar{height:73px;padding:0 34px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:12px;background:#ffffff}
.topbar-location,.topbar-tools{display:flex;gap:13px;align-items:center;font-size:13px;color:var(--muted)}
.topbar-location strong{font-weight:550;color:#202938}
.workspace-dot{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px #24684810}
.breadcrumb-separator{color:#a3acb8}
.icon-button{border:0;background:transparent;color:var(--muted);height:40px;min-width:40px;display:inline-grid;place-items:center;border-radius:8px;font-size:19px}
.icon-button:hover{background:#f0f2f5;color:var(--ink)}
.mobile-only{display:none}
.safety-banner{margin:21px 34px 0;padding:12px 15px;border:1px solid #ead7b7;background:#fff6e7;border-radius:10px;color:#795219;display:flex;align-items:center;gap:10px;font-size:13px;line-height:1.65}
.safety-banner strong{font-weight:650}
.safety-icon{font-size:18px}
.safety-banner>a{margin-left:auto;white-space:nowrap;color:#795219;font-weight:650}
main{padding:29px 34px 30px;min-height:520px;flex:1}
main:focus{outline:none}
.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:25px}
.page-head p{font-size:14px;color:var(--muted);margin:0}
.head-actions{display:flex;align-items:center;gap:9px}
.eyebrow{font-size:11px;font-weight:700;letter-spacing:1.6px;color:var(--muted)}
.page-head .eyebrow{display:block;margin-bottom:10px}
.button{border:1px solid #cbd2dd;background:var(--card);border-radius:8px;font-size:13px;font-weight:650;min-height:40px;padding:8px 14px;display:inline-flex;justify-content:center;align-items:center;gap:8px;white-space:nowrap;color:var(--ink)}
.button:hover{background:#f0f2f5;text-decoration:none}
.button.primary{background:var(--blue);color:white;border-color:var(--blue);box-shadow:0 3px 6px #3656c716}
.button.primary:hover{background:var(--blue-dark)}
.button.danger{color:var(--red);background:var(--red-light);border-color:#f2c9ce}
.button.small{padding:5px 10px;min-height:36px;font-size:12px}
.button.quiet{background:transparent;border-color:transparent;color:var(--blue)}
.button.orange{background:var(--orange-light);color:#a9612f;border-color:#efd2b2}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:26px}
.metric{background:var(--card);padding:19px 20px 16px;border:1px solid var(--line);border-radius:var(--radius);min-height:119px}
.metric-label{font-size:13px;color:var(--muted);display:flex;align-items:center;justify-content:space-between}
.metric-symbol{color:#7b8798;font-size:15px}
.metric-value{font-size:30px;font-weight:650;line-height:1.3;letter-spacing:-1px;margin:8px 0 2px}
.metric-note{font-size:12px;color:var(--muted)}
.metric-note.good{color:var(--green)}
.metric-note.attention{color:#8c5b12}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(280px,1fr);gap:20px;align-items:start}
.column{display:grid;gap:20px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.card-head{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:18px 20px;border-bottom:1px solid var(--line)}
.card-head h2{margin:0;font-size:15px}
.card-head p{margin:4px 0 0;font-size:12px;color:var(--muted)}
.card-body{padding:20px}
.card-body.flush{padding:0}
.card-head>a{font-size:12px;font-weight:650}
.pill{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:5px;font-size:11px;font-weight:650;line-height:1.3;white-space:nowrap;border:1px solid transparent}
.pill.neutral{background:#f0f2f5;color:#596575}
.pill.good{background:var(--green-light);color:var(--green)}
.pill.warning{background:var(--orange-light);color:#8c5b12}
.pill.bad{background:var(--red-light);color:var(--red)}
.pill.info{background:var(--blue-light);color:var(--blue)}
.status-dot{width:5px;height:5px;border-radius:50%;background:currentColor}
.row-list{list-style:none;padding:0;margin:0}
.row-list>li{padding:16px 20px;border-bottom:1px solid var(--line)}
.row-list>li:last-child{border:0}
.queue-row{display:flex;align-items:center;gap:12px;cursor:pointer}
.queue-row:hover{background:#f8f9fb}
.channel-tile{flex-shrink:0;width:37px;height:37px;display:grid;place-items:center;background:#f0f2f5;border:1px solid #dce1e8;color:var(--blue);border-radius:10px;font-size:14px;font-weight:650}
.channel-tile.orange{background:#f0f2f5;color:#596575;border-color:#dce1e8}
.channel-tile.green{background:#f0f2f5;color:#596575;border-color:#dce1e8}
.row-main{min-width:0;flex:1}
.row-title{font-size:14px;font-weight:650;display:block;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row-meta{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px}
.row-end{text-align:right;display:grid;justify-items:end;gap:5px}
.row-end small{color:var(--muted);font-size:11px}
.empty{padding:35px 22px;text-align:center;color:var(--muted)}
.empty-icon{font-size:24px;display:block;color:#818c9d;margin-bottom:10px}
.empty strong{display:block;font-weight:600;color:#202938;font-size:14px;margin-bottom:6px}
.empty p{font-size:13px;max-width:330px;margin:0 auto 12px;line-height:1.7}
.timeline-row{display:flex;align-items:start;gap:12px}
.timeline-time{font-size:14px;font-weight:650;min-width:44px;color:var(--blue)}
.timeline-row .row-main{border-left:2px solid #dce1e8;padding-left:13px}
.timeline-row .row-title{font-size:13px}
.timeline-row .row-meta{font-size:11px}
.channel-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}
.channel-card{padding:22px;display:flex;flex-direction:column;gap:17px}
.channel-card-top{display:flex;align-items:center;justify-content:space-between}
.channel-card h2{font-size:17px;margin:0 0 5px}
.channel-card p{font-size:13px;color:var(--muted);margin:0;min-height:35px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.channel-info{display:grid;grid-template-columns:1fr 1fr;gap:13px;padding:14px 0;border-block:1px solid var(--line)}
.channel-info small{display:block;color:var(--muted);font-size:11px;margin-bottom:4px}
.channel-info strong{font-size:12px;font-weight:550}
.channel-card-actions{display:flex;justify-content:space-between;gap:8px}
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:18px}
.toolbar input{flex:1;min-width:200px}
.toolbar select{min-width:150px}
.toolbar .field-input{min-height:40px;font-size:13px;padding:7px 11px}
.table-wrap{overflow-x:auto}
.data-table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}
.data-table th{font-size:11px;letter-spacing:.6px;text-transform:uppercase;font-weight:650;color:#596575;background:#f8f9fb;padding:13px 18px;border-bottom:1px solid var(--line);white-space:nowrap}
.data-table td{padding:15px 18px;border-bottom:1px solid var(--line);vertical-align:middle}
.data-table tr:last-child td{border-bottom:none}
.data-table tbody tr.clickable{cursor:pointer}
.data-table tbody tr.clickable:hover{background:#f8f9fb}
.table-title{font-size:14px;font-weight:600;max-width:350px;white-space:normal;display:block;margin-bottom:4px}
.table-sub{font-size:11px;color:var(--muted);display:block}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px}
.muted{color:var(--muted)}
.subtle{color:var(--muted);font-size:13px}
.app-footer{border-top:1px solid var(--line);padding:17px 34px;display:flex;justify-content:space-between;color:#596575;font-size:11px;letter-spacing:.3px}
.app-footer>span:first-child{font-weight:650;letter-spacing:1px}
.loading{display:flex;justify-content:center;align-items:center;gap:12px;padding:80px 20px;color:var(--muted);font-size:14px}
.spinner{width:16px;height:16px;border:2px solid #dbe3f5;border-top-color:var(--blue);border-radius:50%;display:inline-block;animation:spin .75s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}
}
.error-card{padding:25px;border:1px solid #edc9ce;background:#fff9fa;border-radius:12px}
.error-card h2{font-size:15px;color:var(--red)}
.error-card p{font-size:14px;word-break:break-word}
.login-screen{min-height:100dvh;display:grid;grid-template-columns:1.15fr 1fr}
.login-story{padding:50px clamp(40px,6vw,100px);display:flex;flex-direction:column;justify-content:space-between;gap:70px;position:relative;overflow:hidden;background:#f5f6f8}
.login-story::after{content:"";position:absolute;width:340px;height:340px;right:-190px;top:25%;border:70px solid #e3e7ee;border-radius:50%;pointer-events:none}
.login-story h1{font-size:clamp(43px,4.8vw,72px);letter-spacing:-3px;font-weight:600;line-height:1.05;margin:25px 0}
.login-story h1 em{color:var(--blue);font-style:normal}
.login-story p{max-width:380px;font-size:13px;line-height:1.8;color:#596575}
.login-stages{display:flex;gap:13px;align-items:center;font-size:12px;color:#596575}
.login-stages i{width:25px;height:1px;background:#b8c1cf}
.login-panel{display:flex;align-items:center;justify-content:center;padding:40px;background:var(--card)}
.login-form{width:100%;max-width:330px}
.login-form .small-mark{background:var(--blue-light);color:var(--blue);display:grid;place-items:center;width:45px;height:45px;border-radius:13px;font-size:25px;margin-bottom:30px}
.login-form h2{font-size:28px;margin:13px 0 7px}
.login-form>.muted{font-size:14px;margin-bottom:31px}
.login-submit{width:100%;margin-top:10px;justify-content:space-between;min-height:43px}
.login-note{text-align:center;font-size:12px;line-height:1.8;color:#596575;margin:24px 0 0}
.field{display:flex;flex-direction:column;gap:7px;margin-bottom:17px;min-width:0}
.field>span,.field-label{font-size:13px;font-weight:600;color:#202938}
.field small{font-size:12px;font-weight:400;color:var(--muted);line-height:1.55}
.field input,.field select,.field textarea,.field-input{border:1px solid #bcc6d4;background:#ffffff;border-radius:7px;padding:10px 11px;color:var(--ink);min-height:44px;width:100%;box-shadow:inset 0 1px 2px #11111102}
.field input::placeholder,.field textarea::placeholder{color:#69778b}
.field textarea{resize:vertical;min-height:90px;line-height:1.6;font-size:14px}
.field textarea.code-editor{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;min-height:300px;tab-size:2}
.field input[type=checkbox]{width:18px;height:18px;min-height:0;accent-color:var(--blue);padding:0}
.check-field{display:flex;align-items:flex-start;gap:10px;padding:11px 0;cursor:pointer}
.check-field input{margin:3px 0 0;accent-color:var(--blue);width:18px;height:18px}
.check-field strong{display:block;font-size:13px;font-weight:550}
.check-field small{display:block;color:var(--muted);font-size:12px;line-height:1.6;margin-top:3px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}
.form-grid>.full{grid-column:1/-1}
.form-section{padding:22px 0;border-bottom:1px solid var(--line)}
.form-section:first-child{padding-top:0}
.form-section:last-child{border-bottom:0}
.form-section h3{margin:0 0 6px}
.form-section>p{font-size:13px;color:var(--muted);margin-bottom:19px;line-height:1.7}
.form-error{padding:11px 13px;background:var(--red-light);color:var(--red);border-radius:7px;font-size:13px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.form-note{background:#f6f7fa;border:1px solid #dce1e8;color:#596575;padding:12px 14px;border-radius:8px;font-size:13px;line-height:1.7;margin-bottom:17px}
.form-note.warning{background:var(--orange-light);color:#795219;border-color:#ead7b7}
.drawer{position:fixed;inset:0 0 0 auto;margin:0;border:none;border-left:1px solid var(--line);width:min(840px,100vw);height:100dvh;max-height:none;max-width:100vw;padding:0;background:var(--card);color:var(--ink);box-shadow:-15px 0 65px #15243918;overflow:hidden}
.drawer[open]{display:flex;flex-direction:column}
.drawer::backdrop{background:#17213665;backdrop-filter:blur(2px)}
.drawer-head{padding:24px 28px 18px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:flex-start;gap:20px;flex-shrink:0}
.drawer-head h2{font-size:22px;margin:5px 0}
.drawer-head p{font-size:13px;color:var(--muted);margin:5px 0 0}
.drawer-body{padding:24px 28px;overflow:auto;flex:1}
.drawer-foot{padding:16px 28px;border-top:1px solid var(--line);display:flex;gap:9px;justify-content:flex-end;align-items:center;background:#f8f9fb;flex-shrink:0;flex-wrap:wrap}
.drawer-foot .form-error{flex-basis:100%;margin:0 0 5px}
.tabs{display:flex;gap:21px;border-bottom:1px solid var(--line);overflow-x:auto;flex-shrink:0;padding:0 28px}
.tab{padding:14px 0 12px;background:none;border:0;border-bottom:2px solid transparent;color:var(--muted);font-size:13px;font-weight:600;white-space:nowrap}
.tab.active{border-bottom-color:var(--blue);color:var(--blue)}
.tab:disabled{cursor:default}
.tabs.in-card{padding:0 20px}
.segmented{display:inline-flex;border:1px solid var(--line);padding:3px;gap:3px;border-radius:8px;background:#f0f2f5}
.segmented button{border:0;border-radius:5px;background:transparent;font-size:12px;padding:6px 12px;color:var(--muted)}
.segmented button.active{background:white;color:var(--ink);box-shadow:0 1px 3px #0000000a}
.stage-list{display:grid;gap:0;margin:0;padding:0;list-style:none}
.stage-item{display:flex;gap:13px;position:relative;padding-bottom:20px}
.stage-item:last-child{padding-bottom:0}
.stage-item:not(:last-child)::before{content:"";position:absolute;left:12px;top:26px;width:1px;bottom:0;background:var(--line)}
.stage-number{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#f0f2f5;color:#596575;flex-shrink:0;font-size:12px}
.stage-item.complete .stage-number{background:var(--green-light);color:var(--green)}
.stage-item.current .stage-number{background:var(--blue-light);color:var(--blue);box-shadow:0 0 0 3px #edf1ff55}
.stage-item.failed .stage-number{background:var(--red-light);color:var(--red)}
.stage-item strong{font-size:13px;display:block;margin:3px 0}
.stage-item p{color:var(--muted);font-size:12px;margin:0}
.job-layout{display:grid;grid-template-columns:145px minmax(0,1fr);gap:20px;margin-bottom:23px}
.telegram-preview{background:#f0f2f5;padding:14px;border-radius:12px;min-height:200px}
.telegram-card{background:white;border-radius:10px;overflow:hidden;box-shadow:0 2px 4px #1724390a}
.telegram-image{display:block;max-width:100%;width:100%;aspect-ratio:1.3;object-fit:contain;background:#f4f5f7}
.telegram-copy{font-size:14px;line-height:1.7;white-space:pre-wrap;padding:14px;overflow-wrap:anywhere}
.telegram-copy b{font-weight:700}
.telegram-meta{display:flex;justify-content:flex-end;padding:0 13px 10px;font-size:11px;color:#596575}
.preview-missing{padding:35px 15px;background:#f8f9fb;border:1px dashed #b8c2d1;border-radius:10px;text-align:center;color:#596575;font-size:13px}
.preview-missing strong{display:block;color:#202938;margin:7px 0}
.evidence{border:1px solid var(--line);border-radius:9px;padding:13px;margin-bottom:11px}
.evidence-top{display:flex;gap:8px;align-items:center;justify-content:space-between}
.evidence a{font-size:13px;font-weight:600;overflow-wrap:anywhere}
.evidence p{font-size:12px;line-height:1.65;color:var(--muted);margin:8px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.evidence details{margin-top:10px;font-size:12px;color:#596575}
.evidence summary{cursor:pointer}
.event-row{padding:11px 0;border-bottom:1px solid var(--line);font-size:13px}
.event-row:last-child{border:0}
.event-row small{display:block;font-size:11px;color:var(--muted);margin-bottom:4px}
.event-row p{margin:0;overflow-wrap:anywhere}
.event-row code{font-size:12px}
.json-view{background:#f6f7fa;border:1px solid var(--line);border-radius:9px;padding:16px;overflow:auto;max-height:440px;font-size:12px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.settings-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,1fr);gap:20px;align-items:start}
.settings-section{padding:20px}
.settings-section h3{margin-bottom:5px}
.settings-section>p{font-size:13px;color:var(--muted);margin-bottom:19px}
.settings-section+.settings-section{border-top:1px solid var(--line)}
.settings-actions{display:flex;gap:10px;align-items:center;justify-content:flex-end;margin-top:20px}
.key-mask{letter-spacing:3px;font-size:14px;color:#596575}
.connection-row{display:flex;align-items:center;gap:12px}
.connection-row .row-main{min-width:0}
.route-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.route-block{border:1px solid var(--line);border-radius:9px;padding:14px;background:#fafbfc}
.route-block h3{font-size:14px;margin-bottom:12px}
.route-block .field{margin-bottom:7px}
.route-block .check-field{padding-bottom:0}
.compact-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 13px}
.toast-region{position:fixed;bottom:24px;right:24px;display:grid;gap:10px;z-index:100;width:min(380px,calc(100vw - 32px))}
.toast{background:#283244;color:white;border:1px solid #435169;border-radius:10px;padding:14px 17px;box-shadow:var(--shadow);font-size:14px;line-height:1.6;display:flex;gap:12px;align-items:center;animation:toast-in .2s ease-out}
.toast.error{background:#9b2f3b;border-color:#b85360}
.toast .icon-button{color:inherit;margin-left:auto;font-size:15px;flex-shrink:0}
.toast a{color:white;text-decoration:underline}
@keyframes toast-in{from{opacity:0;transform:translateY(8px)}
to{opacity:1;transform:none}
}
.split-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:23px 0 13px}
.split-heading h3{margin:0}
.warning-strip{display:flex;gap:10px;padding:13px 15px;font-size:13px;line-height:1.6;background:var(--orange-light);color:#795219;border:1px solid #ead7b7;border-radius:9px;margin-bottom:17px}
.inline-buttons{display:flex;gap:7px;flex-wrap:wrap}
.cost-bar{height:5px;background:#f0f2f5;border-radius:4px;overflow:hidden;margin-top:10px}
.cost-bar>span{display:block;height:100%;background:var(--blue);border-radius:4px}
.spend-total{font-size:26px;font-weight:650;letter-spacing:-.8px;margin:0 0 4px}
.source-host{font-weight:600;font-size:13px}
.summary-note{font-size:12px;line-height:1.8;color:var(--muted);margin:12px 0 0}
.file-input{max-width:100%;font-size:12px!important}
.json-details{margin-top:18px;font-size:13px}
.json-details summary{cursor:pointer;color:var(--blue);font-weight:550}
.form-section .compact-fields{margin-top:15px}
.read-only-label{font-size:11px;color:var(--muted);margin-left:6px}
.status-text{font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}
.clock-note{font-size:12px;color:var(--muted)}
.separator{height:1px;background:var(--line);margin:20px 0}
.filter-summary{margin-left:auto;font-size:12px;color:var(--muted)}
.help-text{font-size:12px;color:var(--muted);line-height:1.7;overflow-wrap:anywhere}
.page-section-label{font-size:12px;letter-spacing:.8px;color:var(--muted);text-transform:uppercase;margin:28px 0 13px}
.muted-link{font-size:13px;color:var(--muted)}
.wide{width:100%}


@media(min-width:1550px){main{padding:36px 48px}
.topbar{padding-inline:48px}
.safety-banner{margin-inline:48px}
.app-footer{padding-inline:48px}
.metrics{gap:18px}
.dashboard-grid{gap:25px}
.metric{padding:23px}
.page-head{margin-bottom:30px}
}


@media(max-width:1180px){.app{grid-template-columns:220px minmax(0,1fr)}
.sidebar{padding-inline:13px}
.brand{font-size:18px}
.dashboard-grid,.settings-grid{grid-template-columns:1fr}
.dashboard-grid>.column:last-child{grid-template-columns:1fr 1fr;align-items:start}
.channel-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
.metrics{gap:10px}
.metric{padding:16px}
.metric-label{font-size:12px}
.metric-value{font-size:26px}
.topbar{padding-inline:25px}
main{padding:25px}
.safety-banner{margin-inline:25px}
.safety-banner>a{display:none}
}


@media(max-width:800px){.app{grid-template-columns:1fr}
.sidebar{position:fixed;left:0;top:0;bottom:0;width:240px;transform:translateX(-100%);transition:transform .2s}
.sidebar.open{transform:translateX(0)}
.sidebar-backdrop{position:fixed;inset:0;background:#18243d55;z-index:24}
.mobile-only{display:inline-grid}
.topbar{height:63px;padding:0 18px}
.topbar-location{gap:9px}
.topbar-location>.workspace-dot,.topbar-location>span:not(.breadcrumb-separator){display:none}
.breadcrumb-separator{display:none}
.topbar-tools{gap:5px}
.safety-banner{margin:14px 18px 0;font-size:12px;align-items:flex-start}
.safety-icon{font-size:15px}
.safety-banner strong{display:block}
main{padding:24px 18px}
.page-head{align-items:flex-start;gap:15px}
.page-head h1{font-size:27px}
.page-head .eyebrow{font-size:10px}
.page-head p{font-size:13px;max-width:300px}
.head-actions{padding-top:4px}
.head-actions>.button{font-size:12px;padding:8px 10px}
.metrics{grid-template-columns:1fr 1fr;gap:10px;margin-bottom:20px}
.metric{min-height:106px;padding:15px}
.metric-value{font-size:26px}
.dashboard-grid>.column:last-child{grid-template-columns:1fr 1fr;gap:15px}
.card-head{padding:15px}
.card-body{padding:16px}
.row-list>li{padding:14px 15px}
.app-footer{padding:16px 18px;font-size:10px}
.login-screen{grid-template-columns:1fr}
.login-story{display:none}
.login-panel{min-height:100dvh;padding:30px}
.drawer-head{padding:21px 20px 15px}
.drawer-body{padding:20px}
.drawer-foot{padding:15px 20px}
.tabs{padding-inline:20px;gap:18px}
.settings-grid{gap:16px}
.channel-card{padding:18px}
.channel-card h2{font-size:15px}
.route-grid{grid-template-columns:1fr 1fr}
.data-table th,.data-table td{padding:13px}
.toast-region{right:16px;bottom:16px}
}


@media(max-width:520px){.dashboard-grid>.column:last-child{grid-template-columns:1fr}
.channel-cards{grid-template-columns:1fr}
.page-head{flex-wrap:wrap;margin-bottom:20px}
.head-actions{width:100%}
.head-actions .button.primary{margin-left:auto}
.metrics{gap:9px}
.metric-label{font-size:11px}
.metric-note{font-size:11px}
.metric-value{font-size:25px}
.form-grid,.route-grid{grid-template-columns:1fr}
.compact-fields{grid-template-columns:1fr 1fr}
.job-layout{grid-template-columns:1fr}
.stage-list{display:flex;overflow-x:auto;gap:8px;padding-bottom:10px}
.stage-item{padding:0!important;display:flex;flex-direction:column;gap:2px;min-width:68px}
.stage-item:not(:last-child)::before{display:none}
.stage-item strong{font-size:11px}
.stage-item p{display:none}
.telegram-preview{padding:10px}
.drawer-foot{gap:7px}
.drawer-foot .button{font-size:12px;padding:8px 10px}
.toolbar{gap:8px}
.toolbar select{min-width:calc(50% - 4px);flex:1}
.toolbar input{min-width:100%}
.filter-summary{display:none}
.topbar-tools .pill{font-size:10px}
.row-title{font-size:13px}
.row-meta{font-size:11px}
.app-footer>span:last-child{display:none}
.settings-section{padding:17px}
.channel-card-actions .button{flex:1}
.tabs{gap:17px}
.tab{font-size:12px}
.drawer-head h2{font-size:20px}
.login-form h2{font-size:25px}
}


@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}


.spaced-heading{margin-top:13px}
.job-status-row{margin-bottom:18px}


.secret-input{-webkit-text-security:disc;font-family:monospace!important;letter-spacing:2px}


.button.icon-button{border:0;background:transparent;box-shadow:none;padding:0;min-height:40px}
.button.icon-button:hover{background:#76849b14}
.toast .button.icon-button:hover{background:#ffffff14}


.backup-download{display:flex;align-items:center;gap:12px;margin-top:12px}



@media(max-width:800px){.worker-label{display:none}
.topbar-tools{gap:5px}
#worker-status{font-size:10px}
}

/* First-run owner setup shares the existing authentication layout. */
.setup-form{max-width:370px}
.setup-form .small-mark{margin-bottom:20px}
.setup-form h2{font-size:28px;line-height:1.2;margin-top:12px}
.setup-form>.muted{line-height:1.7;margin-bottom:24px}
.setup-form .login-note{margin-top:20px}
.setup-form input[name=code]{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:1px}
#auth-loading .loading{padding-inline:0;justify-content:flex-start}
#auth-loading .form-error{margin-top:15px}

@media(max-width:800px){.setup-form h2{font-size:27px}
.setup-form .small-mark{margin-bottom:18px}
.setup-form>.muted{margin-bottom:21px}
.setup-form .field{margin-bottom:16px}
}

.login-story>*{position:relative;z-index:1}


/* Neutral surfaces, a single action accent, and readable form controls. */
:root { --surface:#f0f2f5; --radius:12px; --shadow:0 16px 48px #20293814; }
:where(button,a,input,select,textarea,summary):focus-visible { outline:3px solid #8aa2f1; outline-offset:3px; }
button:disabled { cursor:not-allowed; }
.brand-mark span { color:#fff; }
.brand small { font-size:11px; margin-top:2px; }
.sidebar { background:var(--card); overflow-y:auto; padding-top:28px; }
.sidebar .brand { margin-bottom:38px; }
.nav-label { font-size:10px; letter-spacing:1.1px; }
.nav-item { min-height:44px; font-size:14px; }
.nav-item:hover { background:var(--surface); color:var(--ink); }
.nav-item.active { background:var(--blue-light); color:var(--blue); }
.owner-avatar { width:36px; height:36px; flex-shrink:0; border:1px solid var(--line); }
.sidebar-bottom strong { max-width:115px; }
.workspace-dot { background:#8d98a8; box-shadow:none; flex-shrink:0; }
.topbar { min-height:72px; height:auto; padding-block:14px; }
.topbar-location { font-size:12px; }
.topbar-tools { font-size:12px; }
.topbar-location strong { font-weight:600; }
.safety-banner { font-size:12px; line-height:1.65; }
.safety-banner>a { text-decoration:underline; text-underline-offset:3px; }
.safety-icon { flex-shrink:0; }
.page-head { gap:24px; }
.page-head p { line-height:1.65; max-width:760px; }
.head-actions { flex-wrap:wrap; flex-shrink:0; }
.button { font-weight:600; font-size:13px; line-height:1.35; transition:background .15s,border-color .15s; }
.button:hover { border-color:#aeb9c9; }
.button.primary { box-shadow:none; }
.button.primary:hover { border-color:var(--blue-dark); }
.button.danger,.button.orange { color:var(--ink); background:var(--card); border-color:#cbd2dd; }
.button.danger:hover,.button.orange:hover { background:var(--surface); border-color:#aeb9c9; }
.button.quiet:hover { background:var(--blue-light); border-color:transparent; }
.button.icon-button { min-width:40px; min-height:40px; }
.button.small { font-size:12px; }
.metrics { gap:16px; }
.metric { min-height:128px; padding:20px; }
.metric-label { font-size:12px; gap:8px; }
.metric-value { font-size:32px; letter-spacing:-.8px; line-height:1.25; margin:10px 0 5px; }
.metric-note { line-height:1.5; }
.dashboard-grid { grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr); gap:22px; }
.column { min-width:0; gap:22px; }
.card { min-width:0; }
.card-head { padding:19px 22px; }
.card-head h2 { font-size:17px; }
.card-head p { line-height:1.6; }
.card-head>a { flex-shrink:0; }
.card-body { padding:22px; }
.pill { font-size:11px; padding:5px 8px; border-radius:6px; }
.status-dot { flex-shrink:0; width:6px; height:6px; }
.row-list>li { padding:17px 22px; }
.channel-tile,.channel-tile.orange,.channel-tile.green { width:40px; height:40px; background:var(--surface); border-color:var(--line); color:var(--muted); }
.row-title { font-size:14px; font-weight:600; }
.row-meta { flex-wrap:wrap; gap:6px 8px; font-size:12px; }
.row-end { flex-shrink:0; }
.empty { padding:40px 24px; }
.empty p { max-width:430px; }
.empty strong { color:var(--ink); }
.timeline-time { color:var(--ink); }
.timeline-row .row-title { font-size:13px; }
.timeline-row .row-meta { font-size:12px; }
.channel-cards { gap:20px; align-items:start; }
.channel-card { gap:18px; }
.channel-card h2 { font-size:19px; }
.channel-card p { line-height:1.65; min-height:40px; }
.channel-info { gap:15px; padding-block:16px; }
.channel-info strong { font-weight:600; overflow-wrap:anywhere; }
.channel-card-actions { flex-wrap:wrap; }
.toolbar .field-input { min-height:42px; }
.table-wrap { scrollbar-width:thin; }
.data-table { font-size:13px; }
.data-table th { text-transform:none; letter-spacing:.3px; }
.data-table td { padding-block:17px; }
.table-title { font-size:13px; }
.table-sub { line-height:1.6; }
.app-footer { gap:20px; }
.login-screen { grid-template-columns:1fr 1fr; }
.login-story { background:var(--paper); border-right:1px solid var(--line); gap:64px; padding:46px clamp(38px,5vw,84px); }
.login-story::after { display:none; }
.login-story h1 { font-size:clamp(38px,4vw,58px); letter-spacing:-1.9px; font-weight:650; line-height:1.1; margin:22px 0; }
.login-story p { max-width:400px; font-size:15px; line-height:1.8; }
.login-stages { flex-wrap:wrap; gap:12px; }
.login-form { max-width:370px; }
.login-form>.muted { font-size:14px; line-height:1.65; }
.login-form h2 { line-height:1.25; }
.login-submit { min-height:46px; }
.login-note { font-size:12px; line-height:1.75; }
.setup-form { max-width:400px; }
.field { margin-bottom:19px; }
.field>span,.field-label { font-size:13px; }
.field small { font-size:12px; line-height:1.6; }
.field input,.field select,.field textarea,.field-input { border-radius:8px; min-height:44px; padding:10px 12px; box-shadow:none; }
.field input:hover,.field select:hover,.field textarea:hover,.field-input:hover { border-color:#92a0b5; }
.field textarea { min-height:105px; font-size:14px; line-height:1.65; }
.field :is(input,select,textarea):disabled,.field-input:disabled { background:var(--surface); color:var(--muted); cursor:not-allowed; }
.field input[type=file] { padding:8px; }
.field input[type=file]::file-selector-button { border:0; border-radius:5px; background:var(--surface); color:var(--ink); font:inherit; padding:5px 9px; margin-right:10px; cursor:pointer; }
.check-field { min-height:44px; gap:11px; padding-block:12px; }
.check-field input { flex-shrink:0; width:18px; height:18px; margin-top:2px; }
.check-field strong { font-size:13px; line-height:1.5; }
.check-field small { font-size:12px; line-height:1.65; margin-top:4px; }
.check-field:has(input:disabled) { cursor:not-allowed; }
.form-grid { gap:0 20px; }
.form-section { padding-block:27px; }
.form-section h3 { margin-bottom:8px; font-size:15px; }
.form-section>p { margin-bottom:21px; }
.form-note,.form-summary { background:#f6f7fa; border:1px solid var(--line); color:var(--muted); padding:13px 15px; border-radius:9px; font-size:13px; line-height:1.7; margin-bottom:20px; overflow-wrap:anywhere; }
.form-note.warning { background:var(--orange-light); color:#795219; border-color:#ead7b7; }
.form-summary { color:var(--ink); }
.form-summary strong { font-weight:600; }
.form-error { border:1px solid #efc6cb; font-size:13px; }
.list-editor { display:grid; gap:10px; margin-bottom:20px; min-width:0; }
.list-rows { display:grid; gap:9px; min-width:0; }
.list-row { display:flex; align-items:center; gap:9px; min-width:0; }
.list-row input { flex:1; min-width:0; width:0; }
.list-row .button { flex-shrink:0; }
.list-item { border:1px solid var(--line); background:#fafbfc; border-radius:9px; padding:15px; min-width:0; }
.list-item-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 14px; min-width:0; }
.list-item-fields>.full,.list-item-fields>.field:only-child { grid-column:1/-1; }
.list-item-fields .field { margin-bottom:13px; }
.list-actions { display:flex; justify-content:flex-end; align-items:center; gap:8px; flex-wrap:wrap; }
.list-editor>.list-actions { justify-content:flex-start; }
.list-editor>.button { justify-self:start; }
.list-editor>.empty { padding:22px 16px; border:1px dashed #bcc6d4; border-radius:9px; }
.choice-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:8px; margin-bottom:20px; }
.choice-grid .check-field,.schedule-hours .check-field { align-items:center; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:var(--card); min-height:44px; }
.choice-grid .check-field:has(input:checked),.schedule-hours .check-field:has(input:checked) { border-color:#a8b9f1; background:var(--blue-light); }
.choice-grid .check-field input,.schedule-hours .check-field input { margin:0; }
.choice-grid .check-field strong,.schedule-hours .check-field strong { font-size:13px; }
.schedule-hours { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; margin-bottom:20px; }
.schedule-hours .check-field { gap:7px; padding-inline:10px; }
.detail-list { display:grid; gap:0; margin:0; min-width:0; }
.detail-row { display:grid; grid-template-columns:minmax(135px,.7fr) minmax(0,1.4fr); gap:10px 18px; padding:12px 0; border-bottom:1px solid var(--line); font-size:13px; line-height:1.65; }
.detail-row:last-child { border-bottom:0; }
.detail-row>:first-child { color:var(--muted); font-weight:500; }
.detail-row>:last-child { margin:0; min-width:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.detail-row .detail-list { white-space:normal; }
.detail-row .detail-row { grid-template-columns:minmax(110px,.7fr) minmax(0,1fr); padding-block:8px; }
.model-stage { padding:17px 0 0; border-top:1px solid var(--line); margin-top:17px; }
.model-stage:first-child { border:0; padding-top:0; margin-top:0; }
.model-stage h4 { font-size:14px; font-weight:600; margin:0 0 15px; }
.history-entry { margin-bottom:12px; }
.drawer-body { overscroll-behavior:contain; min-height:0; min-width:0; }
.drawer-head h2 { font-size:24px; }
.drawer-head p { line-height:1.6; }
.drawer-foot { gap:10px; }
.tabs { gap:22px; scrollbar-width:thin; }
.tab { min-height:49px; font-size:13px; border-radius:0; }
.tab:hover { background:none; color:var(--ink); border-bottom-color:#a3adbc; }
.tab.active { color:var(--blue); border-bottom-color:var(--blue); }
.segmented button { min-height:36px; }
.stage-number { width:28px; height:28px; }
.stage-item:not(:last-child)::before { left:13px; top:28px; }
.job-layout { grid-template-columns:150px minmax(0,1fr); gap:23px; }
.telegram-preview { border:1px solid var(--line); }
.telegram-image { object-fit:contain; }
.telegram-copy { font-size:14px; padding:16px; }
.preview-missing { line-height:1.7; }
.evidence-top { gap:10px; }
.evidence summary { padding-block:5px; }
.source-host { overflow-wrap:anywhere; }
.settings-section>p { line-height:1.7; }
.settings-actions { flex-wrap:wrap; }
.route-block { padding:16px; }
.route-block h3 { font-size:14px; }
.toast-region { width:min(420px,calc(100vw - 32px)); }
.toast { font-size:13px; }
.backup-download { flex-wrap:wrap; }

@media(max-width:1240px) {
  .dashboard-grid,.settings-grid { grid-template-columns:1fr; }
  .dashboard-grid>.column:last-child { grid-template-columns:1fr 1fr; align-items:start; }
  .channel-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .page-head { align-items:flex-start; flex-wrap:wrap; gap:16px; }
}
@media(max-width:900px) {
  .app { grid-template-columns:1fr; }
  .sidebar { position:fixed; left:0; top:0; bottom:0; width:260px; transform:translateX(-100%); transition:transform .2s; }
  .sidebar.open { transform:translateX(0); }
  .sidebar-backdrop { position:fixed; inset:0; background:#17213666; z-index:24; }
  .mobile-only { display:inline-grid; }
  .topbar { min-height:68px; padding:10px 20px; }
  .topbar-location>.workspace-dot,.topbar-location>span:not(.breadcrumb-separator),.breadcrumb-separator { display:none; }
  .metrics { grid-template-columns:1fr 1fr; }
  .login-screen { grid-template-columns:1fr; }
  .login-story { display:none; }
  .login-panel { min-height:100dvh; padding:36px 24px; }
}
@media(max-width:600px) {
  .topbar { padding-inline:12px; gap:6px; }
  .topbar-location { gap:4px; font-size:13px; }
  .topbar-tools { gap:4px; }
  .worker-label { display:none; }
  #worker-status,#environment-status { font-size:10px; padding:5px 6px; }
  .topbar-tools .icon-button { min-width:36px; height:40px; }
  main { padding:24px 16px; }
  .safety-banner { margin:14px 16px 0; padding:12px 13px; font-size:12px; gap:9px; }
  .page-head { margin-bottom:22px; gap:16px; }
  .page-head p { font-size:13px; }
  .head-actions { width:100%; gap:8px; }
  .head-actions .button { font-size:13px; white-space:normal; }
  .metrics { gap:10px; }
  .metric { min-height:124px; padding:15px; }
  .metric-label { font-size:12px; align-items:flex-start; }
  .metric-note { font-size:11px; }
  .metric-value { font-size:28px; }
  .dashboard-grid>.column:last-child,.channel-cards { grid-template-columns:1fr; }
  .card-head { padding:17px; align-items:flex-start; }
  .card-head h2 { font-size:16px; }
  .card-head>a { padding-top:2px; }
  .card-body { padding:17px; }
  .row-list>li { padding:16px 17px; }
  .row-title { font-size:13px; }
  .row-meta { font-size:11px; }
  .row-end { max-width:130px; }
  .row-end .pill { white-space:normal; text-align:left; }
  .row-end small { font-size:10px; }
  .channel-tile,.channel-tile.orange,.channel-tile.green { width:35px; height:35px; font-size:13px; }
  .channel-card { padding:20px; }
  .form-grid,.route-grid,.list-item-fields,.price-row>.form-grid { grid-template-columns:1fr; }
  .field input,.field select,.field textarea,.field-input { font-size:16px; }
  .field textarea { line-height:1.6; }
  .list-item { padding:13px; }
  .list-row .button { min-height:44px; }
  .choice-grid { grid-template-columns:1fr 1fr; }
  .schedule-hours { grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
  .schedule-hours .check-field { padding-inline:8px; gap:6px; }
  .schedule-hours .check-field strong { font-size:12px; }
  .schedule-hours .check-field input { width:16px; height:16px; }
  .detail-row { grid-template-columns:1fr; gap:4px; padding-block:12px; }
  .detail-row .detail-row { grid-template-columns:1fr; padding-left:12px; border-left:2px solid var(--line); }
  .job-layout { grid-template-columns:1fr; }
  .stage-list { display:flex; overflow-x:auto; gap:10px; padding-bottom:12px; scrollbar-width:thin; }
  .stage-item { padding:0!important; flex-direction:column; gap:3px; min-width:82px; }
  .stage-item:not(:last-child)::before { display:none; }
  .stage-item strong { font-size:11px; }
  .stage-item p { display:block; font-size:10px; }
  .telegram-preview { padding:10px; }
  .telegram-copy { font-size:14px; padding:14px; }
  .drawer { border-left:0; }
  .drawer-head { padding:20px 18px 16px; gap:12px; }
  .drawer-head h2 { font-size:22px; }
  .drawer-body { padding:20px 18px; }
  .drawer-foot { padding:13px 18px calc(13px + env(safe-area-inset-bottom)); gap:8px; }
  .drawer-foot .button { min-height:44px; font-size:13px; padding:10px 12px; white-space:normal; }
  .tabs { padding-inline:18px; gap:21px; }
  .tab { font-size:13px; }
  .toolbar .field-input { font-size:16px; min-height:44px; }
  .filter-summary { display:block; width:100%; margin-left:0; }
  .data-table th,.data-table td { padding:14px; }
  .data-table td { min-width:120px; }
  .data-table td:has(.table-title) { min-width:210px; }
  .table-title { min-width:180px; }
  .settings-actions .button { flex:1; }
  .evidence-top { align-items:flex-start; flex-wrap:wrap; }
  .login-form h2,.setup-form h2 { font-size:27px; }
  .login-panel { padding:30px 22px; }
}
@media(max-width:360px) {
  #worker-status { display:none; }
  .compact-fields,.choice-grid { grid-template-columns:1fr; }
  .schedule-hours { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .row-end { max-width:100px; }
  .drawer-foot .button { flex:1; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}
/* Content from source titles and URLs must not determine mobile column width. */
.evidence-top>* { min-width:0; }
.evidence-top .pill { flex-shrink:0; }
.form-grid>*,.compact-fields>*,.route-grid>* { min-width:0; }
.toolbar select { max-width:100%; }
.evidence { min-width:0; }
@media(max-width:600px) {
  .toolbar select { min-width:0; flex:1 1 140px; }
}
@media(max-width:600px) {
  .topbar-location { min-width:0; }
  .topbar-location strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .topbar-location>.icon-button { flex-shrink:0; }
  .topbar-tools { flex-shrink:0; }
}
.tab:not(.active):hover { border-bottom-color:transparent; color:var(--ink); }
.tab:focus-visible { outline-offset:-5px; }
