
:root{--ink:#19263b;--muted:#8490a3;--primary:#5265dc;--line:#e8ecf3;--background:#f7f8fc;--card:#fff}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:var(--ink);background:var(--background);font-family:Inter,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-size:14px;-webkit-font-smoothing:antialiased}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}a{color:inherit;text-decoration:none}button{border:0;background:none;color:inherit}button:focus-visible,a:focus-visible{outline:3px solid #9ca9ff;outline-offset:4px}h1,h2,h3,p{margin:0}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:224px;background:#fff;border-right:1px solid var(--line);padding:35px 19px;display:flex;flex-direction:column;z-index:10}.brand{display:flex;align-items:center;gap:11px;padding:0 10px;font-size:19px;font-weight:700;letter-spacing:-.5px}.brand-icon{width:38px;height:40px;background:var(--primary);color:#fff;border-radius:12px;display:grid;place-items:center;box-shadow:0 5px 10px #5265dc20}.brand small{display:block;font-size:10px;letter-spacing:2.5px;color:#929bae;font-weight:400;margin-top:4px}.nav-caption{font-size:10px;letter-spacing:2px;color:#a1a9b9;padding:51px 15px 16px}.sidebar nav{display:grid;gap:8px}.nav-item{display:flex;align-items:center;gap:12px;text-align:left;padding:13px 15px;border-radius:9px;width:100%;color:#7c879a;font-size:13px}.nav-item.active{background:#eff1ff;color:var(--primary);font-weight:600}.nav-item:hover{background:#f2f4fc}.nav-dot{height:5px;width:5px;background:var(--primary);border-radius:50%;margin-left:auto}.sidebar-bottom{margin-top:auto;border-top:1px solid var(--line);padding:23px 10px 0;display:flex;gap:11px;align-items:center;font-size:12px;color:#758198}.sidebar-bottom small{display:block;font-size:10px;margin-top:5px;color:#a0a9b9}.tiny-dot{width:6px;height:6px;border-radius:50%;background:#7bb7a4;margin-left:auto}.workspace{margin-left:224px}.topbar{height:76px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 43px;background:#ffffffb3}.breadcrumb{display:flex;align-items:center;gap:16px;font-size:12px;color:#919bac}.breadcrumb strong{font-weight:500;color:#4a586d}.topbar-right{display:flex;align-items:center;gap:20px}.telegram-word{display:flex;align-items:center;gap:7px;font-size:12px;color:#7d8ba1}.connection-pill{display:flex;align-items:center;gap:7px;font-size:10px;border-radius:20px;padding:7px 10px;background:#fbf4e7;color:#ab853b}.connection-pill i,.preview-heading i,.dialog-status i{display:inline-block;width:5px;height:5px;border-radius:50%;background:currentColor}.connection-pill.connected{background:#eaf7f1;color:#488e78}main{max-width:1270px;margin:0 auto;padding:43px 43px 20px}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:29px;scroll-margin-top:30px}.eyebrow{font-size:9px;letter-spacing:2.2px;font-weight:600;color:#8896b1;margin-bottom:12px}h1{font-size:29px;letter-spacing:-.8px;font-weight:650;line-height:1.4}h1 span{color:var(--primary)}.page-heading p{margin-top:11px;font-size:12px;color:#8994a6}.help-button{display:flex;align-items:center;gap:7px;color:#8793a6;font-size:12px;padding:10px 0 10px 10px}.editor-grid{display:grid;grid-template-columns:minmax(0,1.36fr) minmax(310px,1fr);gap:24px;align-items:stretch}.card{border:1px solid var(--line);border-radius:14px;background:var(--card);box-shadow:0 3px 5px #24324b02}.editor-card{padding:25px 27px 20px}.section-heading{display:flex;align-items:center;gap:11px;margin-bottom:29px}.section-icon{height:36px;width:36px;display:grid;place-items:center;background:#f1f3ff;color:#6878d9;border-radius:10px;flex-shrink:0}h2{font-size:15px;font-weight:600}.section-heading p{font-size:10px;color:#98a1b1;margin-top:5px}.step-label{margin-left:auto;font-size:9px;letter-spacing:.5px;color:#acb3c1}.rate-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.rate-field label{display:flex;align-items:center;gap:7px;font-weight:600;font-size:13px}.direction-icon{width:23px;height:23px;border-radius:6px;display:grid;place-items:center}.inbound{background:#eaf7f1;color:#55a78e}.outbound{background:#eef0ff;color:#8290db}.field-caption{font-size:9px;letter-spacing:1.7px;color:#9ba6b9;margin:8px 0 13px 30px}.number-input{display:flex;align-items:center;border:1px solid #e1e6f0;border-radius:10px;background:#fbfcff;height:79px;transition:border-color .2s,box-shadow .2s}.number-input:focus-within{border-color:#8d9bea;box-shadow:0 0 0 3px #5265dc12;background:#fff}.number-input input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#253452;font-size:34px;letter-spacing:-1px;padding:14px 0 14px 19px;font-weight:550;font-variant-numeric:tabular-nums}.number-input>span{font-size:22px;color:#b1bbcc;padding:0 18px 0 5px}.input-hint{font-size:10px;line-height:1.8;color:#a3adbc;margin:11px 0 23px}.input-hint.invalid{color:#c2746b}.target-box{display:flex;align-items:center;padding:14px 13px;border:1px solid #e9edf4;border-radius:9px;gap:10px;margin-bottom:25px}.target-icon{height:33px;width:33px;background:#eff5fc;display:grid;place-items:center;border-radius:9px;color:#6b9bc8}.small-label{display:block;color:#a1aabc;font-size:9px;margin-bottom:4px}.target-box strong{display:block;font-size:11px;font-weight:500}.text-button{display:flex;gap:3px;align-items:center;margin-left:auto;font-size:10px;color:#7c88ae;white-space:nowrap}.form-actions{display:flex;gap:11px}.copy-button,.send-button{height:44px;display:flex;align-items:center;justify-content:center;gap:9px;border-radius:8px;font-size:12px;font-weight:550;transition:background .15s,transform .15s}.copy-button{border:1px solid #e2e7f1;padding:0 18px;color:#8591a7}.copy-button:hover{background:#f8f9fd}.send-button{flex:1;background:var(--primary);color:#fff;box-shadow:0 4px 9px #5265dc1f}.send-button:not(:disabled):hover{background:#4355ca;transform:translateY(-1px)}.send-footnote{display:flex;align-items:center;justify-content:center;gap:5px;font-size:9px;color:#adb6c5;margin-top:14px}.preview-card{padding:26px 23px 21px}.preview-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:21px}.preview-heading>span{display:flex;align-items:center;gap:6px;font-size:9px;color:#8e9bad}.preview-heading i{color:#8fc5b0}.telegram-preview{border:1px solid #e4ebf2;border-radius:11px;overflow:hidden;margin-bottom:21px}.preview-chat-top{display:flex;align-items:center;background:#fff;padding:13px 15px;gap:9px;border-bottom:1px solid #e9edf3}.chat-avatar{width:33px;height:33px;background:#6baed6;color:#fff;border-radius:50%;display:grid;place-items:center}.preview-chat-top strong{font-size:11px;font-weight:600;display:block}.preview-chat-top small{display:block;font-size:8px;color:#9ca7b8;margin-top:3px}.chat-dots{margin-left:auto;color:#a1aec1;font-size:21px}.chat-body{background-color:#edf3f8;background-image:radial-gradient(#b7cbda40 .7px,transparent .7px);background-size:16px 16px;min-height:228px;padding:17px 13px 36px}.date-divider{margin:0 auto 22px;width:max-content;background:#d7e1eac9;border-radius:12px;color:#8195a5;padding:4px 12px;font-size:8px}.message-bubble{background:white;border-radius:10px 10px 10px 3px;padding:13px 12px 7px;box-shadow:0 2px 4px #8ea4b51a;position:relative}.message-bubble:before{position:absolute;content:"";bottom:0;left:-5px;width:8px;height:9px;background:white;clip-path:polygon(100% 0,100% 100%,0 100%)}.bot-name{font-size:10px;font-weight:600;color:#6197bf;margin-bottom:10px}.bot-name span{font-size:7px;font-weight:500;color:#b2c0cd;margin-left:5px}.message-bubble p{font-size:11px;color:#3d4e61;line-height:2.2;white-space:nowrap}.message-bubble strong{font-weight:600}.bubble-footer{color:#a5b5c3;font-size:8px;text-align:right;margin-top:4px}.preview-note{display:flex;align-items:center;gap:7px;font-size:10px;color:#a1acba;margin-top:9px}.preview-note svg{color:#88b5a8}.history-card{margin-top:25px;scroll-margin-top:20px;overflow:hidden}.history-heading{display:flex;justify-content:space-between;align-items:center;padding:23px 27px;border-bottom:1px solid #f0f2f7}.history-heading h2{display:flex;gap:9px;align-items:center}.history-heading h2 span{font-size:9px;color:#95a0b4;background:#f1f3f8;padding:3px 7px;border-radius:5px}.history-heading p{font-size:10px;color:#a0aabb;margin-top:7px}.refresh-button{display:flex;align-items:center;gap:7px;font-size:11px;color:#8a97ae;border:1px solid #e9edf4;border-radius:6px;padding:7px 10px}.empty-state{display:flex;justify-content:center;align-items:center;gap:15px;padding:35px 20px 40px;min-height:145px}.empty-icon{width:51px;height:51px;display:grid;place-items:center;background:#f7f8fc;color:#b5bfd3;border:1px solid #eef1f7;border-radius:14px}.empty-state h3{font-weight:500;font-size:12px;color:#8794ab}.empty-state p{font-size:10px;color:#acb5c5;margin-top:8px}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left}th{font-size:10px;font-weight:400;color:#97a3b5;background:#fafbfe;padding:14px 26px}td{border-top:1px solid #f0f2f7;padding:17px 26px;font-size:12px;color:#6f7d93}.record-status{font-size:10px;padding:4px 7px;border-radius:4px;color:#af8b46;background:#faf4e7;white-space:nowrap}.record-status.sent{color:#529d82;background:#edf7f2}.record-status.failed{color:#c28079;background:#fff0ee}.record-detail{display:block;max-width:260px;font-size:9px;color:#99a4b5;margin-top:9px;line-height:1.7}footer{display:flex;justify-content:space-between;align-items:center;color:#aeb7c7;font-size:9px;margin-top:24px}footer span:last-child{display:flex;align-items:center;gap:5px}footer b{margin:0 7px;font-weight:400}.notice{display:flex;align-items:flex-start;gap:8px;font-size:11px;padding:11px;border-radius:7px;margin:-10px 0 16px;line-height:1.7}.notice svg{flex-shrink:0;margin-top:1px}.notice.info{background:#f0f3fc;color:#7685af}.notice.error{background:#fff3ef;color:#b67969}.notice.success{background:#edf8f2;color:#5b9c80}.resolve-button{font-size:10px;color:var(--primary);padding:0 0 15px;text-decoration:underline}.setup-dialog{border:1px solid #e1e6f0;border-radius:17px;padding:29px;max-width:470px;width:calc(100% - 32px);color:var(--ink);box-shadow:0 24px 100px #26365825;margin:auto}.setup-dialog::backdrop{background:#1c294b59;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;gap:10px}.dialog-heading h2{font-size:17px}.dialog-heading>button{margin-left:auto;color:#9aa6b9;padding:5px}.dialog-intro{font-size:12px;color:#97a2b4;margin:15px 0 25px}.setup-steps{list-style:none;padding:0;margin:0;display:grid;gap:22px}.setup-steps li{display:flex;gap:12px}.setup-steps li>span{height:23px;width:23px;flex-shrink:0;display:grid;place-items:center;background:#eff1ff;border-radius:50%;color:#7281cf;font-size:11px}.setup-steps strong{font-size:12px;font-weight:550;line-height:23px}.setup-steps p{font-size:11px;line-height:1.9;color:#929eb1;margin-top:5px}.setup-steps a{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:#7183d7;margin-top:8px}.dialog-status{margin-top:24px;background:#fcf7ed;border-radius:7px;padding:12px;font-size:10px;color:#b49b67;line-height:1.8}.dialog-status i{margin-right:7px}.dialog-status.ready{background:#edf7f2;color:#619d84}.dialog-close{width:100%;margin-top:17px}.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
@media(min-width:1450px){main{padding-top:52px}.page-heading{margin-bottom:35px}.editor-card{padding:30px 32px 25px}.preview-card{padding:30px 28px}.number-input{height:88px}.chat-body{min-height:247px}}
@media(max-width:1100px){.sidebar{width:190px;padding:30px 12px}.brand{font-size:17px;gap:8px}.workspace{margin-left:190px}main{padding:30px 25px 20px}.topbar{padding:0 25px}.editor-grid{gap:17px;grid-template-columns:minmax(0,1.25fr) minmax(285px,1fr)}.editor-card{padding:22px 20px}.preview-card{padding:23px 18px}.number-input input{font-size:30px;padding-left:13px}.number-input>span{padding-right:12px}.rate-grid{gap:12px}.step-label{display:none}.message-bubble p{font-size:10px}.input-hint{font-size:9px}.copy-button{padding:0 11px}}
@media(max-width:900px){.sidebar{width:76px;padding:26px 12px}.brand{padding:0;justify-content:center}.brand>span:last-child,.nav-caption,.nav-item .nav-dot,.sidebar-bottom div,.sidebar-bottom .tiny-dot{display:none}.nav-item{font-size:0;gap:0;justify-content:center;padding:15px;margin-top:5px}.sidebar nav{margin-top:32px}.sidebar-bottom{justify-content:center;padding:20px 0 0}.workspace{margin-left:76px}.editor-grid{grid-template-columns:1fr 310px}.page-heading h1{font-size:25px}.help-button{font-size:0}.editor-card{padding:21px 17px}.rate-field label{font-size:11px}.number-input{height:73px}.number-input input{font-size:28px}.copy-button{font-size:11px}.send-button{font-size:11px}.target-box{padding:11px 9px;gap:7px}.text-button{font-size:9px}.target-box strong{font-size:10px}}
@media(max-width:760px){.sidebar{position:relative;width:auto;height:65px;padding:0 20px;border-right:0;border-bottom:1px solid var(--line);flex-direction:row;align-items:center;justify-content:space-between}.brand{font-size:15px;gap:9px}.brand>span:last-child{display:block}.brand small{display:none}.brand-icon{width:30px;height:32px;border-radius:9px}.brand-icon svg{width:18px}.sidebar nav{margin:0;display:flex;gap:4px}.nav-item{padding:9px;width:auto;margin:0;font-size:0}.nav-item svg{height:17px;width:17px}.sidebar-bottom{display:none}.workspace{margin:0}.topbar{height:55px;padding:0 22px}.telegram-word{display:none}.breadcrumb{font-size:10px;gap:10px}.connection-pill{font-size:9px;padding:6px 9px}main{padding:29px 20px 20px}.eyebrow{font-size:8px;margin-bottom:11px}.page-heading{margin-bottom:24px}.page-heading h1{font-size:25px}.page-heading p{font-size:11px;max-width:270px;line-height:1.8;margin-top:8px}.editor-grid{grid-template-columns:1fr;gap:19px}.editor-card{padding:23px}.preview-card{padding:23px}.rate-field label{font-size:13px}.number-input{height:85px}.number-input input{font-size:34px;padding-left:18px}.number-input>span{padding-right:20px}.input-hint{font-size:9px;margin-bottom:22px}.form-actions{gap:10px}.copy-button{font-size:12px;padding:0 18px}.send-button{font-size:12px}.target-box{padding:12px}.target-box strong{font-size:11px}.text-button{font-size:10px}.message-bubble p{font-size:12px}.telegram-preview{margin-bottom:16px}.chat-body{min-height:200px;padding:15px 18px 29px}.preview-note{font-size:10px}.history-heading{padding:22px}.empty-state{padding:28px 20px;gap:12px}.empty-state p{max-width:220px;line-height:1.8}.empty-icon{width:43px;height:43px;flex-shrink:0}.history-card{margin-top:19px}th,td{padding:13px 18px;white-space:nowrap}.record-detail{white-space:normal;min-width:140px}footer{margin-top:22px;justify-content:center;font-size:8px}footer span:last-child{display:none}.setup-dialog{padding:23px}.dialog-heading h2{font-size:15px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{transition:none!important;animation:none!important}}

.login-screen{min-height:100vh;display:grid;place-items:center;background:#f7f8fc;padding:24px}.login-card{width:100%;max-width:410px;margin:0;padding:36px;background:#fff;border:1px solid #e6eaf2;border-radius:18px;box-shadow:0 12px 50px #29395608}.login-card .brand{padding:0;margin-bottom:32px}.login-card h1{font-size:25px}.login-card>p{font-size:12px;color:#94a0b3;margin:9px 0 27px}.login-card label{display:block;font-size:12px;margin:17px 0 8px;color:#738097}.login-card input:not([type=hidden]){display:block;width:100%;border:1px solid #e0e6f1;border-radius:8px;padding:12px 13px;outline:none;background:#fafbfe}.login-card input:focus{border-color:#7485e1;box-shadow:0 0 0 3px #5265dc13}.login-card .send-button{width:100%;margin-top:24px}.login-card>small{display:block;text-align:center;font-size:9px;color:#a5afc0;margin-top:25px}.login-error{font-size:11px;line-height:1.7;color:#bf766b;background:#fff2ef;padding:10px;border-radius:6px;margin-top:15px}.logout-button{font-size:10px;color:#8e99ac;padding:6px 2px}.sidebar-bottom form{margin-left:auto}
