/* Generated by deploy/build_css.py. Edit source styles, not this file. */

/* source: style.css */
:root{font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#223047;background:#f3f5f9;line-height:1.6}*{box-sizing:border-box}body{margin:0}header{background:#18283e;color:#fff;padding:20px max(24px,calc((100vw - 1050px)/2));display:flex;align-items:center;justify-content:space-between;gap:20px}header strong{font-size:20px}header span{font-weight:400;opacity:.7}nav{display:flex;gap:20px;flex-wrap:wrap}a{color:#2b61a4}header a{color:#e4edff}main{max-width:1050px;margin:36px auto;padding:0 24px}h1{font-size:32px;line-height:1.2;margin-bottom:8px}h2{font-size:20px;white-space:pre-wrap;overflow-wrap:anywhere}p{overflow-wrap:anywhere}article,fieldset{background:#fff;border:1px solid #dce3ed;border-radius:12px;padding:24px;margin:20px 0}legend{font-weight:700;padding:0 8px}label{display:block;font-weight:600;margin:16px 0 5px}input,textarea,select{width:100%;font:inherit;padding:10px;border:1px solid #acb9ca;border-radius:6px;background:#fff;color:#223047}textarea{resize:vertical}button,.button-link{background:#235e9e;color:#fff;border:0;padding:11px 16px;border-radius:6px;font:inherit;cursor:pointer;text-decoration:none;display:inline-block}button:disabled{opacity:.45;cursor:not-allowed}.secondary{background:#e5edf7;color:#223047}.actions,.row{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.actions{margin-top:16px}.row{justify-content:space-between;font-size:14px}.tag{background:#e8edff;color:#3549a2;padding:4px 10px;border-radius:20px}.notice{border-left:4px solid #c78d26;background:#fff3da;padding:16px;border-radius:6px}.notice.compact{margin-top:28px}.success{background:#e0f4e8;border-color:#24834e}.muted,footer{color:#64738a}footer{text-align:center;margin:40px 20px;font-size:13px}details{border-top:1px solid #e1e6ec;padding:12px 0}summary{cursor:pointer;color:#235e9e}article p{white-space:pre-wrap}.page-head{display:flex;justify-content:space-between;align-items:center;gap:24px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:24px 0}.stats div{background:#fff;border:1px solid #dce3ed;border-radius:10px;padding:16px}.stats strong{font-size:28px;display:block}.stats span{color:#64738a}.filters{background:#fff;border:1px solid #dce3ed;border-radius:12px;padding:16px;display:grid;grid-template-columns:minmax(180px,2fr) 1fr 1fr auto auto;gap:12px;align-items:end}.filters label{margin:0}.filters button{height:46px}.filters a{padding:10px 4px}.new-editor{background:#eaf2ff;border:1px solid #b9cce7;border-radius:12px;margin:20px 0;padding:18px}.new-editor>summary{font-weight:700;font-size:18px}.field-grid{display:grid;grid-template-columns:1fr 2fr;gap:14px}.check{font-weight:400;display:flex;gap:10px;align-items:flex-start}.check input{width:auto;margin-top:6px}.answer-card{padding:20px}.card-summary{display:flex;justify-content:space-between;gap:12px;align-items:center}.status{display:inline-block;margin-left:8px;padding:4px 10px;border-radius:20px;font-size:14px}.status-approved{background:#dff4e7;color:#17633a}.status-candidate{background:#fff0cb;color:#7b5410}.status-disabled{background:#e8ebef;color:#586474}.answer-preview{background:#f7f9fc;border-radius:8px;padding:12px 14px}.editor{margin-top:14px}.editor>summary{font-weight:650}.empty-state{text-align:center;background:#fff;border:1px dashed #acb9ca;border-radius:12px;padding:40px 20px;margin:20px 0}.pagination{justify-content:space-between;margin-top:24px}@media(max-width:760px){.page-head{align-items:flex-start;flex-direction:column}.stats{grid-template-columns:1fr}.filters,.field-grid{grid-template-columns:1fr}.filters button{height:auto}}@media(max-width:650px){header{align-items:flex-start;flex-direction:column}main{padding:0 16px}article,fieldset{padding:16px}button{width:100%}.button-link{width:100%;text-align:center}.actions{display:block}.actions button{margin-bottom:8px}.card-summary{align-items:flex-start;flex-direction:column}h1{font-size:26px}}
.staff-management{border:0;padding:0;margin:12px 0}.staff-toggle{display:block;width:100%;list-style:none;text-align:center}.staff-toggle::-webkit-details-marker{display:none}.staff-management[open] .staff-toggle{border-radius:6px 6px 0 0}.staff-management-panel{border:1px solid #d9e0ea;border-radius:0 0 14px 14px;padding:16px}.staff-card{padding:2px 0 18px;margin:0 0 18px;border-bottom:1px solid #d9e0ea}.staff-card:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}.staff-card h3{margin:0 0 8px}.operator-bottom{grid-template-columns:repeat(2,1fr)}
.generated-password{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.generated-password input,.generated-password button{margin:0}.generated-password button{white-space:nowrap}.settings-status-summary{display:flex;align-items:center;gap:12px;padding:12px 14px}.settings-status-summary>span:nth-child(2){min-width:0;flex:1}.settings-status-summary strong,.settings-status-summary small{display:block}.settings-status-summary small{color:#64738a;margin-top:2px}.invite-submit-row{display:flex;justify-content:flex-start;margin-top:10px}.invite-form .invite-submit{display:inline-block;width:auto!important;min-height:34px;padding:7px 12px;clear:both}.invite-form .invite-submit:disabled{opacity:.5;cursor:not-allowed}@media(max-width:560px){.generated-password{grid-template-columns:1fr}.generated-password button{width:100%}.invite-submit-row{margin-top:12px}.invite-form .invite-submit{width:auto!important}}

/* source: ai-settings.css */
.balance-alert{background:#fff0cb;border:1px solid #e2bd64;border-radius:10px;padding:14px 18px;margin-bottom:22px}.balance-alert a{font-weight:700}.ai-status{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:24px 0}.ai-status div{background:#fff;border:1px solid #dce3ed;border-radius:10px;padding:16px}.ai-status span,.ai-status strong,.ai-status small{display:block}.ai-status small{color:#64738a;margin-top:4px}.model-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:18px}.model-card{margin:0;border:2px solid #dce3ed;border-radius:12px;padding:18px;display:flex;gap:12px;cursor:pointer;font-weight:400}.model-card:has(input:checked){border-color:#2b61a4;background:#edf4ff;box-shadow:0 0 0 2px #2b61a422}.model-card input{width:auto;margin:5px 0 0}.model-card strong,.model-card em,.model-card small{display:block}.model-card em{font-style:normal;color:#235e9e;font-weight:700;margin-top:3px}.model-card small{color:#56677d;margin-top:8px;line-height:1.45}.capabilities{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}.capabilities i{font-style:normal;font-size:.78rem;background:#e4edf9;color:#234e82;border-radius:999px;padding:3px 8px}.deepseek-balance-setting{display:block}form:has(input[name="ai_provider"][value="openai"]:checked) .deepseek-balance-setting,form:has(input[name="ai_provider"][value="gemini"]:checked) .deepseek-balance-setting{display:none}.provider-guides{margin:28px 0}.setup-guide{background:#fff;border:1px solid #dce3ed;border-radius:12px;padding:0 20px;margin:12px 0}.setup-guide summary{font-weight:750;font-size:1.05rem;padding:17px 0}.setup-guide li{margin:12px 0}.setup-guide a{font-weight:650}.setup-steps{display:grid;gap:14px;margin-top:24px}.setup-step{display:grid;grid-template-columns:52px 1fr;gap:18px;margin:0}.setup-step h2{margin:7px 0}.step-number{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#18283e;color:#fff;font-size:1.25rem;font-weight:800}@media(max-width:760px){.ai-status,.model-grid{grid-template-columns:1fr}.setup-step{grid-template-columns:40px 1fr;gap:12px}.step-number{width:38px;height:38px;font-size:1rem}}

/* source: faq-table.css */
.faq-page-head{margin-bottom:12px}.faq-sheet{margin:0;border:1px solid #d7e0ea;border-radius:10px;background:#fff;overflow:hidden;box-shadow:0 4px 16px rgba(38,58,83,.05)}.faq-sheet-toolbar{display:grid;grid-template-columns:minmax(240px,1fr) minmax(190px,280px) auto auto;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #dfe6ee}.faq-sheet-title{min-width:0}.faq-sheet-title strong,.faq-sheet-title small{display:block}.faq-sheet-title strong{font-size:1rem}.faq-sheet-title small{margin-top:2px;color:#6f7f92;font-size:.78rem}.faq-sheet-search{margin:0}.faq-sheet-search input{width:100%;min-height:36px;margin:0;padding:7px 9px}.faq-sheet-toolbar button{min-height:36px;margin:0;padding:7px 10px;white-space:nowrap}.faq-sheet-scroll{max-height:calc(100vh - 245px);min-height:260px;overflow:auto}.faq-grid{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.faq-grid thead{position:sticky;top:0;z-index:2}.faq-grid th,.faq-grid td{border-right:1px solid #e4eaf0;border-bottom:1px solid #e4eaf0}.faq-grid thead th{padding:7px 8px;background:#f2f5f8;color:#53657a;font-size:.76rem;text-align:left}.faq-grid thead th:first-child,.faq-grid .faq-row-number{width:42px;text-align:center}.faq-grid thead th:last-child{width:42px}.faq-grid tbody tr:last-child>*{border-bottom:0}.faq-grid tr>*:last-child{border-right:0}.faq-grid .faq-row-number{padding:6px;background:#f8fafc;color:#7a8999;font-size:.78rem;font-weight:700}.faq-grid td{padding:0;background:#fff;vertical-align:top}.faq-grid textarea{display:block;width:100%;height:56px;min-height:56px;margin:0;padding:8px 10px;border:0;border-radius:0;background:transparent;box-shadow:none;resize:vertical;font:inherit;line-height:1.35}.faq-grid textarea:hover{background:#fbfdff}.faq-grid textarea:focus{position:relative;z-index:1;outline:2px solid #3390ec;outline-offset:-2px;background:#fff}.faq-remove-row{display:grid;place-items:center;width:30px;height:30px;margin:12px auto;padding:0;border:0;border-radius:7px;background:transparent;color:#8997a7;font-size:20px;line-height:1}.faq-remove-row:hover,.faq-remove-row:focus{background:#fff0f0;color:#c73535}.faq-empty-search{padding:34px;text-align:center;color:#718095}.faq-sheet.is-dirty #faq-save-table:after{content:" •"}.faq-grid tr[hidden]{display:none}
@media(max-width:900px){.faq-sheet-toolbar{grid-template-columns:1fr auto}.faq-sheet-title{grid-column:1/-1}.faq-sheet-search{grid-column:1/-1}.faq-sheet-scroll{max-height:none;min-height:220px}.faq-grid{min-width:700px}}
@media(max-width:600px){.faq-page-head h1{font-size:24px}.faq-page-head p{font-size:.85rem}.faq-sheet{border-radius:8px}.faq-sheet-toolbar{padding:9px}.faq-sheet-title small{line-height:1.35}.faq-sheet-toolbar button{padding:7px 9px;font-size:.82rem}.faq-sheet-scroll{max-height:calc(100dvh - 285px);overflow:auto}.faq-grid{min-width:640px}.faq-grid textarea{height:62px;min-height:62px}}

/* Keep the mobile spreadsheet open down to the fixed navigation bar. */
@media(max-width:600px){
  body.telegram-mode:has(.faq-sheet){
    overflow:hidden;
  }
  body.telegram-mode:has(.faq-sheet) main{
    display:flex;
    flex-direction:column;
    width:100%;
    max-width:none;
    height:calc(100dvh - 126px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-height:0;
    margin:0;
    padding:10px 0 0;
    overflow:hidden;
  }
  body.telegram-mode:has(.faq-sheet) .faq-page-head,
  body.telegram-mode:has(.faq-sheet) main>.notice{
    flex:0 0 auto;
    margin-left:14px;
    margin-right:14px;
  }
  .faq-sheet{
    display:flex;
    flex:1 1 auto;
    flex-direction:column;
    width:100%;
    min-height:0;
    border-right:0;
    border-left:0;
    border-radius:0;
  }
  .faq-sheet-toolbar{
    flex:0 0 auto;
  }
  .faq-sheet-scroll{
    flex:1 1 auto;
    width:100%;
    height:auto;
    min-height:0;
    max-height:none;
    padding-bottom:env(safe-area-inset-bottom);
    overscroll-behavior:contain;
    background:#fff;
  }
}

/* source: products.css */
.product-create{background:#eaf2ff;border:1px solid #b9cce7;border-radius:12px;padding:18px;margin:22px 0}.product-create>summary{font-weight:700;font-size:1.1rem}.product-create form{margin-top:14px}.product-fields{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:12px}.product-fields label{margin-top:8px}.product-list{display:grid;gap:16px}.product-card{display:grid;grid-template-columns:260px 1fr;gap:22px}.product-photos{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-content:start}.product-photo{position:relative;aspect-ratio:1;background:#eef2f7;border-radius:9px;overflow:hidden}.product-photo img{width:100%;height:100%;display:block;object-fit:cover}.product-photo form{position:absolute;right:5px;top:5px}.photo-delete{width:30px!important;height:30px;padding:0;background:#fff;color:#8c2020;border:1px solid #d9a6a6;border-radius:50%;font-size:1.2rem;line-height:1}.product-card>.product-photos+.product-fields{min-width:0}
.photo-answer-fields{display:grid;grid-template-columns:minmax(220px,1fr) 2fr;gap:16px;align-items:start}.photo-answer-fields label{margin-top:8px}
@media(max-width:850px){.product-card{grid-template-columns:190px 1fr}.product-fields{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.product-card{display:block}.product-photos{grid-template-columns:repeat(3,1fr);margin-bottom:14px}.product-fields,.photo-answer-fields{grid-template-columns:1fr}.photo-delete{width:30px!important}.product-card .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}}

/* source: mobile.css */
.brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none}.brand img{border-radius:10px}.desktop-nav{gap:16px}.install-button{background:#e8f2ff;color:#17375f;padding:8px 12px;font-weight:700}.mobile-menu,.bottom-nav{display:none}.dashboard-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:22px 0}.dashboard-card{background:#fff;border:1px solid #dce3ed;border-radius:12px;padding:19px;text-decoration:none;color:#223047;min-height:150px}.dashboard-card strong,.dashboard-card span{display:block}.dashboard-card strong{font-size:1.12rem}.dashboard-card .metric{font-size:2rem;line-height:1.2;margin:12px 0 4px}.state{display:inline-flex!important;width:max-content;padding:4px 9px;border-radius:999px;font-size:.875rem;margin-bottom:12px}.state-ok{background:#dff4e7;color:#17633a}.state-warn{background:#fff0cb;color:#7b5410}.state-off{background:#e8ebef;color:#586474}.quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:18px 0}.quick-actions a{background:#fff;border:1px solid #dce3ed;border-radius:10px;padding:16px;text-decoration:none;font-weight:700}.recent-list{display:grid;gap:10px}.recent-item{background:#fff;border:1px solid #dce3ed;border-radius:10px;padding:14px;text-decoration:none;color:#223047}.recent-item span{display:block}.dialog-close{float:right;background:transparent;color:#223047;font-size:1.6rem;padding:0 8px}dialog{border:0;border-radius:14px;max-width:460px;padding:24px;box-shadow:0 18px 60px #14223855}dialog::backdrop{background:#14223899}
.side-install-button{width:calc(100% - 20px);margin:-12px 10px 20px;border:1px solid #ffffff30;background:#ffffff12;color:#fff}.side-install-button:hover{background:#ffffff20}.install-help-copy{color:#586b82}.install-help h2{padding-right:35px}
@media(max-width:900px){.desktop-nav{display:none}.app-header{padding:12px 16px}.mobile-menu{display:block;position:relative}.mobile-menu summary{list-style:none;background:#31445d;border-radius:8px;padding:9px 13px;color:#fff;font-weight:700}.mobile-menu summary::-webkit-details-marker{display:none}.mobile-menu nav{position:absolute;right:0;top:48px;z-index:20;background:#fff;border:1px solid #dce3ed;border-radius:12px;padding:8px;display:grid;gap:0;min-width:220px;box-shadow:0 12px 34px #14223833}.mobile-menu nav a{color:#223047;text-decoration:none;padding:11px 12px;border-radius:7px}.mobile-menu nav a:hover{background:#edf3fa}.dashboard-grid{grid-template-columns:1fr 1fr}.quick-actions{grid-template-columns:1fr 1fr}}
@media(max-width:650px){body{padding-bottom:76px}.app-header{position:sticky;top:0;z-index:30;padding-top:max(10px,env(safe-area-inset-top))}.brand strong{font-size:1rem}.brand strong span{display:block;font-size:.8rem}.brand img{width:34px;height:34px}.install-button{font-size:.72rem;padding:7px 9px;min-height:44px}main{margin:20px auto}.dashboard-grid,.quick-actions{grid-template-columns:1fr}.dashboard-card{min-height:0}.bottom-nav{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;z-index:25;left:0;right:0;bottom:0;padding:5px 5px max(5px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid #dce3ed;box-shadow:0 -8px 24px #14223814}.bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:48px;color:#3d4c61;text-decoration:none;font-size:.72rem;line-height:1.2;gap:2px}.bottom-nav span{font-size:1.25rem}footer{display:none}input,textarea,select{font-size:16px}h1{margin-top:0}.filters{position:static}.answer-card{margin:12px 0}}
@media(max-width:650px){.app-header{align-items:center;flex-direction:row;justify-content:space-between;gap:8px;flex-wrap:nowrap}.brand{min-width:0;flex:1 1 auto}.brand strong{min-width:0;white-space:nowrap}.app-header .install-button{width:auto;flex:0 0 auto;white-space:nowrap}.mobile-menu{border:0;padding:0;margin-left:auto;flex:0 0 auto}.mobile-menu summary{display:flex;align-items:center;min-height:44px;white-space:nowrap}.mobile-menu nav{position:fixed;top:calc(max(10px,env(safe-area-inset-top)) + 58px);right:12px;left:auto;width:min(280px,calc(100vw - 24px));min-width:0;max-height:calc(100dvh - 90px);overflow-y:auto;overscroll-behavior:contain}}
@media(max-width:380px){.brand{gap:7px}.brand strong{font-size:.9rem}.brand strong span{display:none}.brand img{width:32px;height:32px}.app-header .install-button{font-size:.68rem;padding:7px}}
@media(max-width:340px){.brand{flex:0 0 auto}.brand strong{display:none}}
@media(display-mode:standalone){.install-button{display:none!important}}

/* source: design-v2.css */
:root{--navy:#11243c;--navy-2:#183556;--blue:#2368d1;--blue-soft:#eaf2ff;--ink:#17263b;--muted:#66758a;--line:#e1e7ef;--surface:#fff;--canvas:#f5f7fb;--green:#16865b;--green-soft:#e7f7f0;--amber:#a56a08;--amber-soft:#fff5dd;--red:#b93838;--shadow:0 10px 30px rgba(17,36,60,.07);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--canvas);line-height:1.5}body{background:var(--canvas);color:var(--ink);min-height:100vh}main{max-width:1180px;margin:0 auto;padding:42px 36px 60px}.app-header{display:none}.desktop-sidebar{position:fixed;inset:0 auto 0 0;width:248px;background:var(--navy);padding:28px 18px;display:flex;flex-direction:column;z-index:40;box-shadow:12px 0 40px rgba(17,36,60,.08)}.desktop-sidebar~main{margin-left:248px}.side-brand{padding:0 10px 28px}.brand strong{display:flex;flex-direction:column;font-size:1rem;line-height:1.2}.brand strong span{font-size:.78rem;margin-top:3px;color:#aebed2;opacity:1}.desktop-sidebar nav{display:grid;gap:7px}.desktop-sidebar nav a{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:11px;color:#bfcadb;text-decoration:none;font-weight:650}.desktop-sidebar nav a span{display:grid;place-items:center;width:24px;height:24px;font-size:1.15rem;opacity:1}.desktop-sidebar nav a:hover,.desktop-sidebar nav a.active{background:rgba(255,255,255,.10);color:#fff}.side-logout{margin-top:auto;color:#bfcadb;text-decoration:none;padding:12px 14px}.bottom-nav{display:none}.compact-head{margin-bottom:24px}.compact-head h1{margin:0;font-size:2rem;letter-spacing:-.035em}.compact-head p.muted{margin:7px 0 0}.eyebrow{margin:0 0 7px;color:var(--blue);font-size:.78rem;font-weight:800;letter-spacing:.11em;text-transform:uppercase}.section-title{font-size:1rem;margin:30px 0 12px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-top:30px}.section-heading .section-title{margin:0}.section-heading a{font-size:.9rem;text-decoration:none;font-weight:650}.manager-hero{border:0;border-radius:22px;padding:28px;margin:0;color:#fff;display:grid;grid-template-columns:1fr auto;gap:18px;box-shadow:0 18px 42px rgba(22,134,91,.15);position:relative;overflow:hidden}.manager-hero:after{content:"";position:absolute;width:240px;height:240px;border-radius:50%;background:rgba(255,255,255,.08);right:-90px;top:-120px}.hero-live{background:linear-gradient(135deg,#0c7c55,#16a36d)}.hero-paused{background:linear-gradient(135deg,#233954,#34577b);box-shadow:0 18px 42px rgba(17,36,60,.15)}.hero-status{display:flex;align-items:center;gap:8px;font-size:.82rem;font-weight:750;grid-column:1/-1}.pulse-dot{width:9px;height:9px;border-radius:50%;background:#fff;box-shadow:0 0 0 5px rgba(255,255,255,.16)}.hero-copy{max-width:680px;position:relative;z-index:1}.hero-copy h2{font-size:1.55rem;margin:0 0 7px}.hero-copy p{margin:0;color:rgba(255,255,255,.78)}.hero-action{align-self:end;position:relative;z-index:1;background:#fff;color:var(--ink);text-decoration:none;font-weight:750;padding:11px 16px;border-radius:11px}.attention-card,.feature-card{display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:17px 18px;text-decoration:none;color:var(--ink);box-shadow:var(--shadow)}.attention-card{margin-top:16px;border-color:#efd699;background:#fffaf0}.attention-card>span:nth-child(2),.feature-card>span:nth-child(2),.connection-card>span:nth-child(2){min-width:0;flex:1}.attention-card strong,.attention-card small,.feature-card strong,.feature-card small,.connection-card strong,.connection-card small{display:block}.attention-card small,.feature-card small,.connection-card small{color:var(--muted);margin-top:3px}.attention-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#f0a827;color:#fff;font-weight:900}.attention-card b,.feature-card b,.connection-card b{font-size:1.55rem;color:#8a98aa}.connection-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.connection-card{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px;text-decoration:none;color:var(--ink);min-width:0}.connection-icon,.settings-symbol,.feature-icon{width:40px;height:40px;min-width:40px;border-radius:12px;display:grid;place-items:center;font-weight:850;font-size:.8rem}.telegram-icon{background:linear-gradient(135deg,#f7d65a,#e44178 55%,#7547be);color:#fff}.ai-icon{background:#e8f0ff;color:#2459aa}.knowledge-icon{background:#e5f7ef;color:#16865b}.power-icon{background:#edf1f6;color:#65758a}.account-icon{background:#f0ecff;color:#6852a4}.status-light{width:9px;height:9px;border-radius:50%;background:#a8b2c0}.status-light.is-ok{background:#21a975}.status-light.is-warn{background:#eca92e}.today-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.today-grid div{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px}.today-grid strong{display:block;font-size:1.7rem;line-height:1.1}.today-grid span{display:block;color:var(--muted);font-size:.86rem;margin-top:8px}.knowledge-grid{display:grid;gap:12px;max-width:760px}.feature-card{padding:20px}.feature-card strong{font-size:1.03rem}.tip-card{display:flex;gap:13px;max-width:760px;background:var(--blue-soft);color:#27466f;border-radius:16px;padding:17px 19px;margin-top:18px}.tip-card p{margin:0}.tip-card>span{font-size:1.3rem}.settings-list{display:grid;gap:11px}.settings-group{border:1px solid var(--line);background:var(--surface);border-radius:16px;padding:0;margin:0;overflow:hidden;box-shadow:0 4px 16px rgba(17,36,60,.035)}.settings-group>summary{display:flex;align-items:center;gap:14px;padding:17px 18px;list-style:none;color:var(--ink)}.settings-group>summary::-webkit-details-marker{display:none}.settings-group>summary>span:nth-child(2){min-width:0;flex:1}.settings-group>summary strong,.settings-group>summary small{display:block}.settings-group>summary small{color:var(--muted);font-size:.85rem;margin-top:2px}.settings-group>summary>b{font-size:1.5rem;color:#8a98aa;transition:transform .2s}.settings-group[open]>summary>b{transform:rotate(90deg)}.settings-content{border-top:1px solid var(--line);padding:4px 20px 20px}.settings-content .notice{margin-top:16px}.save-settings{margin-top:5px;min-height:50px}.staff-settings{margin-top:11px}.staff-management{border-top:0}.logout-mobile{display:none}.conversation-card{border:1px solid var(--line);border-radius:18px;box-shadow:0 6px 22px rgba(17,36,60,.05);padding:20px}.conversation-meta{border-bottom:1px solid var(--line);padding-bottom:13px}.conversation-card .dialog-user{font-size:1.05rem;margin:17px 0 5px}.conversation-card h2{font-size:1.06rem;background:#f1f5fa;border-radius:4px 15px 15px 15px;padding:13px 15px;margin:10px 0;max-width:78%}.conversation-status{font-size:.78rem;border-radius:999px;padding:5px 9px}.status-pending,.status-unknown{background:var(--amber-soft);color:var(--amber)}.status-sent{background:var(--green-soft);color:var(--green)}input,textarea,select{border-color:#cfd8e5;border-radius:11px;padding:12px 13px;min-height:46px}input:focus,textarea:focus,select:focus{outline:3px solid rgba(35,104,209,.14);border-color:var(--blue)}button,.button-link{border-radius:11px;padding:11px 16px;font-weight:700;background:var(--blue)}.secondary{background:#edf2f8;color:#263a54}.notice{border:0;border-radius:14px}.success{background:var(--green-soft)}article,fieldset{border-color:var(--line);border-radius:18px;box-shadow:0 4px 18px rgba(17,36,60,.04)}
@media(max-width:1000px){.connection-grid{grid-template-columns:1fr}.today-grid{grid-template-columns:1fr 1fr}.manager-hero{grid-template-columns:1fr}.hero-action{justify-self:start}.desktop-sidebar{width:220px}.desktop-sidebar~main{margin-left:220px}}
@media(max-width:760px){.desktop-sidebar{display:none}.desktop-sidebar~main{margin-left:auto}.app-header{display:flex;background:var(--navy);padding:calc(10px + env(safe-area-inset-top)) 18px 11px;position:sticky;top:0;z-index:35;align-items:center;flex-direction:row}.app-header .brand{flex:1}.app-header .install-button{width:auto}.bottom-nav{display:grid}.compact-head h1{font-size:1.7rem}main{padding:23px 17px 92px;margin:0 auto}.manager-hero{padding:22px;border-radius:19px}.hero-copy h2{font-size:1.3rem}.hero-action{width:100%;text-align:center}.section-heading{margin-top:25px}.connection-grid{gap:9px}.today-grid{gap:9px}.today-grid div{padding:15px}.today-grid strong{font-size:1.45rem}.feature-card{padding:17px}.settings-group>summary{padding:15px}.settings-content{padding:3px 16px 17px}.logout-mobile{display:block;text-align:center;margin:22px 0}.conversation-card{padding:15px;margin:12px 0}.conversation-card h2{max-width:92%}.conversation-meta{display:grid;grid-template-columns:auto 1fr;gap:7px}.conversation-meta>span:nth-child(2){text-align:right}.conversation-status{grid-column:1/-1;width:max-content}.bottom-nav{background:rgba(255,255,255,.97);backdrop-filter:blur(14px);padding:6px 5px max(7px,env(safe-area-inset-bottom));border-top-color:var(--line)}.bottom-nav a.active{color:var(--blue);font-weight:750}.bottom-nav a.active span{background:var(--blue-soft);border-radius:8px;padding:0 10px}.answer-table tr,.product-card{border-radius:16px!important;box-shadow:0 5px 18px rgba(17,36,60,.04)}}
@media(max-width:360px){main{padding-left:13px;padding-right:13px}.today-grid{grid-template-columns:1fr}.brand strong{font-size:.9rem}.bottom-nav a{font-size:.68rem}}
.auth-page{max-width:560px;margin:5vh auto}.auth-page fieldset{padding:26px}.auth-page h1{letter-spacing:-.03em}.auth-page button{min-width:140px}@media(display-mode:standalone){.install-button{display:none!important}}
.data-actions{display:grid;gap:12px}.data-actions form{margin:0;padding:14px 0;border-top:1px solid var(--line)}.data-actions .danger{background:#fff;color:var(--red);border:1px solid #e7bcbc}.data-actions .actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}@media(max-width:650px){.data-actions .actions{grid-template-columns:1fr}}
.document-links{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:14px}.document-links a{display:flex;align-items:center;min-height:46px;padding:11px 13px;border:1px solid var(--line);border-radius:11px;background:#f7f9fc;color:var(--ink);font-weight:700;text-decoration:none}.document-links a:hover{border-color:#a9c5e8;background:var(--blue-soft)}
.app-footer{display:flex;justify-content:space-between;align-items:center;gap:14px;max-width:1180px;margin:6px auto 32px;padding:0 36px;color:var(--muted);font-size:.78rem}.app-footer nav{display:flex;flex-wrap:wrap;gap:8px 18px}.app-footer a{color:#526984}.cabinet-footer{margin-left:248px}.login-footer{max-width:760px;flex-direction:column}.login-footer>span{display:none}
@media(max-width:1000px) and (min-width:761px){.cabinet-footer{margin-left:220px}}
@media(max-width:760px){.document-links{grid-template-columns:1fr}.cabinet-footer{display:none}.login-footer{display:flex;padding:0 18px 20px;margin-top:12px}.login-footer nav{justify-content:center}}
.connection-grid-compact{grid-template-columns:repeat(2,minmax(0,1fr));max-width:800px}.knowledge-attention{border-color:#b9dfce;background:#f2fbf7}.knowledge-attention .attention-icon{background:#16865b}.knowledge-rules{max-width:760px;margin-top:18px;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow)}.knowledge-rules>div:first-child{display:flex;align-items:center;gap:14px}.knowledge-rules h2{margin:0}.knowledge-rules p{margin:3px 0 0}.knowledge-rules form{margin-top:14px}.knowledge-rules button{width:auto}
@media(max-width:760px){.connection-grid-compact{grid-template-columns:1fr}.knowledge-rules{padding:17px}.knowledge-rules button{width:100%}}
.telegram-icon{padding:0;overflow:hidden;background:transparent}.telegram-icon img{display:block;width:100%;height:100%}

/* source: dialogs.css */
.dialogs-page{max-width:1480px;margin:0 auto}.dialogs-header{display:flex;align-items:end;justify-content:space-between;margin-bottom:18px}.dialogs-header h1{margin:0}.dialogs-count{display:grid;place-items:center;min-width:36px;height:36px;padding:0 10px;border-radius:18px;background:#e8eef7;color:#29415f;font-weight:800}.dialogs-notice{margin-bottom:16px}.dialogs-layout{display:grid;grid-template-columns:minmax(300px,390px) minmax(0,1fr);height:min(760px,calc(100vh - 210px));min-height:570px;overflow:hidden;border:1px solid #dfe6ef;border-radius:22px;background:#fff;box-shadow:0 16px 45px rgba(33,52,78,.08)}.thread-panel{display:flex;min-width:0;flex-direction:column;border-right:1px solid #e3e9f1;background:#f8fafc}.thread-filters{padding:16px;border-bottom:1px solid #e3e9f1}.thread-filters input,.thread-filters select{margin:0;background:#fff}.filter-row{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;margin-top:9px}.compact-button{width:auto;margin:0;padding:10px 13px}.thread-list{overflow:auto;padding:8px}.thread-item{position:relative;display:grid;grid-template-columns:43px minmax(0,1fr) auto;grid-template-areas:"avatar copy side" "avatar badge side";gap:3px 11px;padding:13px;border:1px solid transparent;border-radius:15px;color:inherit;text-decoration:none}.thread-item:hover{background:#fff}.thread-item.selected{border-color:#bfd3ed;background:#fff;box-shadow:0 5px 18px rgba(33,52,78,.08)}.thread-avatar{grid-area:avatar;display:grid;place-items:center;width:43px;height:43px;border-radius:50%;background:linear-gradient(145deg,#dfeafb,#f0e9ff);color:#31517b;font-weight:800}.thread-copy{grid-area:copy;min-width:0}.thread-copy strong,.thread-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.thread-copy strong{font-size:14px}.thread-copy small{margin-top:4px;color:#68788b}.thread-side{grid-area:side;display:flex;align-items:end;flex-direction:column;gap:9px}.thread-side time{max-width:88px;color:#8290a1;font-size:10px;text-align:right}.status-dot{display:block;width:9px;height:9px;border-radius:50%;background:#aab5c2}.status-dot.status-pending,.status-dot.status-unknown,.status-dot.status-sending{background:#e49b34}.status-dot.status-sent{background:#39a271}.channel-badge{grid-area:badge;width:max-content;padding:3px 7px;border-radius:8px;background:#edf2f8;color:#60748d;font-size:10px;font-weight:800;text-transform:uppercase}.empty-threads{padding:32px 18px;text-align:center}.conversation-panel{display:flex;min-width:0;flex-direction:column;background:linear-gradient(180deg,#fff,#f8fafc)}.conversation-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 22px;border-bottom:1px solid #e5eaf1;background:#fff}.conversation-head h2{margin:5px 0 2px;font-size:20px}.conversation-head p{margin:0;color:#718096;font-size:12px}.conversation-head form{margin:0}.message-history{display:flex;flex:1;overflow:auto;flex-direction:column;gap:10px;padding:25px}.message-row{display:flex}.message-row.assistant{justify-content:flex-end}.message-bubble{max-width:min(680px,78%);padding:12px 15px;border-radius:6px 17px 17px 17px;background:#fff;border:1px solid #e0e7f0;box-shadow:0 3px 12px rgba(35,53,76,.05)}.message-row.assistant .message-bubble{border:0;border-radius:17px 6px 17px 17px;background:#dfeefd}.message-bubble span,.message-bubble time{display:block}.message-bubble span{white-space:pre-wrap}.message-bubble time{margin-top:7px;color:#75869a;font-size:10px;text-align:right}.reply-box{padding:17px 22px;border-top:1px solid #dfe6ef;background:#fff}.reply-box form{margin:0}.reply-box textarea{margin:8px 0 10px;resize:vertical}.reply-label{display:flex;justify-content:space-between;gap:12px}.reply-label span{color:#60748c;font-size:12px}.reply-box .actions{display:flex;flex-wrap:wrap;gap:8px}.reply-box .actions button{width:auto;margin:0}.ai-reply-box{border-top:2px solid #95bce9}.warning-box{background:#fff9ee}.comment-detail{margin:30px;padding:24px;border:1px solid #e0e7f0;border-radius:18px;background:#fff;font-size:18px}.comment-detail time{color:#718096;font-size:11px}.conversation-empty{display:grid;place-content:center;flex:1;text-align:center;color:#6c7e93}.conversation-empty>div{font-size:42px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:900px){.dialogs-layout{grid-template-columns:1fr;height:auto;min-height:0}.thread-panel{max-height:430px;border-right:0;border-bottom:1px solid #e3e9f1}.conversation-panel{min-height:600px}.filter-row{grid-template-columns:1fr 1fr}.filter-row button{grid-column:1/-1}.conversation-head{align-items:flex-start;flex-direction:column}.message-history{min-height:360px;padding:16px}.reply-box{padding:15px}.reply-box .actions button{flex:1}.message-bubble{max-width:88%}}
@media(max-width:520px){.dialogs-page{margin:-4px -7px 0}.dialogs-layout{border-radius:16px}.dialogs-header{padding:0 5px}.thread-panel{max-height:390px}.conversation-panel{min-height:540px}.conversation-head{padding:15px}.conversation-head .compact-button{width:100%}.conversation-head form{width:100%}.filter-row{grid-template-columns:1fr}.filter-row button{grid-column:auto}.message-bubble{max-width:92%}}
.message-image-link{display:block;margin:-5px -8px 10px}.message-image{display:block;width:auto;max-width:100%;max-height:420px;border-radius:12px;object-fit:contain}.message-audio{display:block;width:min(360px,100%);margin:2px 0 10px}
.telegram-voice{display:grid;grid-template-columns:34px minmax(110px,220px) 34px;align-items:center;gap:8px;min-width:210px;padding:2px 0}.telegram-voice .message-audio{display:none}.voice-play{display:grid;place-items:center;width:34px;min-width:34px;height:34px;margin:0;padding:0;border:0;border-radius:50%;background:#3390ec;color:#fff;font-size:13px;line-height:1}.message-row.assistant .voice-play{background:#4f9b56}.voice-track{position:relative;height:18px;cursor:pointer}.voice-track:before,.voice-track i{position:absolute;top:8px;left:0;height:3px;border-radius:3px;content:""}.voice-track:before{right:0;background:#b9c9d3}.voice-track i{width:0;background:#3390ec}.message-row.assistant .voice-track i{background:#4f9b56}.voice-track b{position:absolute;top:4px;left:0;width:11px;height:11px;transform:translateX(-50%);border-radius:50%;background:#3390ec}.message-row.assistant .voice-track b{background:#4f9b56}.voice-time{color:#718493;font-size:10px;font-variant-numeric:tabular-nums}
.thread-list{display:block}
.dialogs-header{position:relative;align-items:center;justify-content:center;text-align:center}.dialogs-count{position:absolute;right:0;bottom:0}.thread-filter-panel{padding:0;border:0;border-bottom:1px solid #e3e9f1}.thread-filter-panel>summary{display:flex;align-items:center;gap:10px;padding:14px 16px;color:#29415f;list-style:none}.thread-filter-panel>summary::-webkit-details-marker{display:none}.thread-filter-panel>summary span{font-weight:800}.thread-filter-panel>summary small{flex:1;color:#7a899b;text-align:right}.thread-filter-panel>summary b{font-size:1.2rem;transition:transform .2s}.thread-filter-panel[open]>summary b{transform:rotate(180deg)}.mobile-dialog-back{display:none}.shared-media-card{display:flex;align-items:center;gap:11px;margin:-5px -8px 10px;padding:12px;border:1px solid #d7e1ee;border-radius:13px;background:linear-gradient(135deg,#f7f2ff,#eef5ff);color:#223047;text-decoration:none}.shared-media-card>span:nth-child(2){min-width:0;flex:1}.shared-media-card strong,.shared-media-card small{display:block}.shared-media-card small{margin-top:2px;color:#68788b}.shared-media-card b{font-size:1.5rem;color:#8392a5}.shared-media-icon{display:grid!important;place-items:center;width:38px;height:38px;border-radius:11px;background:linear-gradient(135deg,#f7d65a,#e44178 55%,#7547be);color:#fff;font-size:.82rem}
@media(max-width:900px){.dialogs-layout{height:auto;min-height:0;overflow:visible}.dialogs-layout.show-list .conversation-panel{display:none}.dialogs-layout.show-conversation .thread-panel{display:none}.thread-panel{max-height:none;border:0}.thread-list{overflow:visible}.conversation-panel{min-height:0}.message-history{min-height:0;overflow:visible}.mobile-dialog-back{display:inline-flex;color:#2b61a4;font-weight:750;text-decoration:none}.dialogs-page.mobile-conversation .dialogs-header,.dialogs-page.mobile-conversation .dialogs-notice{display:none}}
@media(max-width:520px){.dialogs-page{margin:0}.dialogs-header{padding:0}.dialogs-header h1{font-size:1.65rem}.dialogs-header .muted{margin:4px 0 16px}.dialogs-count{right:5px;bottom:2px}.dialogs-notice{margin-bottom:12px;padding:12px 14px;font-size:.9rem}.dialogs-layout,.thread-panel,.thread-filter-panel,.thread-list{width:100%;min-width:0}.thread-list{display:block;padding:5px 0}.thread-item{width:100%;grid-template-columns:43px minmax(0,1fr) 82px;padding:12px 10px}.thread-side{min-width:0}.thread-side time{max-width:82px}.thread-filter-panel>summary{padding:13px 14px}.thread-filters{padding:0 14px 14px}.conversation-head{gap:12px}.conversation-head h2{margin-top:7px}.message-history{padding:13px 10px 18px}.message-bubble{max-width:94%}.reply-box{border-radius:14px 14px 0 0}}
.conversation-head{color:#223047}
.dialogs-title{width:100%;align-items:flex-start}.dialogs-title>div{width:100%;margin:0;padding:0;text-align:left}.dialogs-title h1{margin:0}.thread-list{display:block;width:100%;min-width:0}.thread-item{width:100%}
@media(max-width:900px){.dialogs-page.mobile-conversation .dialogs-title,.dialogs-page.mobile-conversation .dialogs-notice{display:none}}
.conversation-panel{min-height:0;overflow:hidden}.message-history{min-height:0}.reply-box{position:relative;z-index:2;flex:0 0 auto;box-shadow:0 -8px 20px rgba(33,52,78,.06)}.reply-box>form:first-of-type{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 10px;align-items:end}.reply-box>form:first-of-type>label{grid-column:1/-1;margin:0}.reply-box>form:first-of-type textarea{min-height:48px;max-height:130px;margin:0;resize:vertical}.reply-box>form:first-of-type>button{width:auto;min-width:170px;margin:0;white-space:nowrap}
@media(max-width:900px){.conversation-panel{overflow:visible}.reply-box{position:sticky;bottom:var(--bottom-nav-height,68px);box-shadow:0 -8px 20px rgba(33,52,78,.08)}.reply-box>form:first-of-type{grid-template-columns:1fr}.reply-box>form:first-of-type>label{grid-column:auto}.reply-box>form:first-of-type>button{width:100%}}
@media(min-width:901px){body:has(.dialogs-page) main{width:auto;max-width:none;margin-right:0;padding:12px 22px 16px;font-size:14px}.dialogs-page{width:100%;max-width:1420px;margin:0 auto;transform:none}.dialogs-title{margin:0 0 5px}.dialogs-title h1{font-size:1.55rem;line-height:1.05}.dialogs-title .muted{margin:2px 0 0;font-size:.82rem}.dialogs-notice{margin:0 0 6px;padding:7px 12px;border-radius:10px;font-size:.83rem;line-height:1.3}.dialogs-layout{grid-template-columns:clamp(245px,19vw,290px) minmax(0,1fr);height:calc(100dvh - 102px);min-height:600px;border-radius:13px}.thread-filter-panel>summary{min-height:42px;padding:8px 11px}.thread-filter-panel>summary span{font-size:.9rem}.thread-filters{padding:0 11px 9px}.thread-item{padding:8px 9px;border-radius:11px}.thread-avatar{width:38px;height:38px}.thread-item{grid-template-columns:38px minmax(0,1fr) auto}.thread-copy strong{font-size:13px}.thread-copy small{font-size:12px}.conversation-head{min-height:50px;padding:7px 14px}.conversation-head h2{margin:2px 0 0;font-size:15px}.conversation-head p{font-size:11px}.message-history{padding:12px 16px}.message-bubble{max-width:min(760px,82%);padding:9px 12px;font-size:14px}.reply-box{padding:8px 14px}.reply-box>form:first-of-type textarea{height:42px;min-height:42px;max-height:100px;padding:9px 11px}.reply-box>form:first-of-type>label{font-size:.8rem}.reply-box>form:first-of-type>button{min-width:150px;padding:9px 12px}.manual-attention{margin:0 0 5px;font-size:.78rem}.tg-reviewed-form{display:flex;align-items:center;gap:8px;margin-top:6px!important;padding-top:6px;border-top:1px solid #e7ecf2}.tg-reviewed-form p{margin:0!important;font-size:.78rem}.tg-reviewed-form button{width:auto;margin:0;padding:7px 10px}}

/* Clear messenger workspace */
.thread-tools{padding:7px;border-bottom:1px solid #e3e9f1;background:#fff}.thread-search{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:4px;margin:0}.thread-search>span{color:#8190a0;font-size:16px}.thread-search input{min-width:0;margin:0}.thread-search button{width:auto;margin:0}.status-tabs{display:grid!important;grid-template-columns:repeat(2,1fr);gap:3px!important;margin-top:6px}.status-tabs a{display:block!important;padding:5px 3px!important;border-radius:6px!important;color:#60748d!important;font-size:10px!important;text-align:center}.status-tabs a.active{background:#e7f3ff!important;color:#2382dc!important}.conversation-head{justify-content:flex-start}.conversation-avatar{display:grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border-radius:50%;background:#e7f3ff;color:#2382dc;font-weight:800}.conversation-head>div{min-width:0;flex:1}.conversation-head h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-head p{display:flex;align-items:center;gap:6px}.telegram-label{color:#2382dc;font-weight:700}.reply-window{padding-left:6px;border-left:1px solid #d8e0e8}.reply-window.expired{color:#b25b54}.message-history{background-color:#dce7ed;background-image:radial-gradient(rgba(69,100,119,.07) .7px,transparent .7px);background-size:14px 14px}.thread-item .channel-badge{display:none}.message-bubble time{margin-top:3px}.reply-box{box-shadow:0 -1px 5px rgba(33,52,78,.08)}
@media(min-width:901px){.thread-list{padding:3px}.thread-item{border-radius:7px}.thread-search input{height:28px;min-height:28px;padding:4px 6px;font-size:10px}.thread-search button{height:28px;padding:4px 6px;font-size:10px}.reply-box>form:first-of-type{align-items:center}.reply-box>form:first-of-type textarea{overflow-y:auto;resize:none}.tg-reviewed-form{position:absolute;right:136px;bottom:6px;border:0!important;margin:0!important;padding:0!important}}
@media(max-width:900px){.thread-tools{padding:10px}.thread-search{grid-template-columns:auto minmax(0,1fr) auto}.status-tabs a{font-size:12px!important}.conversation-avatar{width:38px;height:38px;flex-basis:38px}.conversation-head p{flex-wrap:wrap}.reply-box>form:first-of-type textarea{resize:none}}
@media(max-width:760px){body:has(.dialogs-page.mobile-conversation){overflow:hidden;padding-bottom:0}body:has(.dialogs-page.mobile-conversation) .app-header,body:has(.dialogs-page.mobile-conversation) .bottom-nav{display:none}body:has(.dialogs-page.mobile-conversation) main{height:100dvh;margin:0;padding:max(env(safe-area-inset-top),0px) 0 max(env(safe-area-inset-bottom),0px)}.dialogs-page.mobile-conversation,.dialogs-page.mobile-conversation .dialogs-layout{height:100%;min-height:0}.dialogs-page.mobile-conversation .dialogs-layout{overflow:hidden;border:0;border-radius:0}.dialogs-page.mobile-conversation .conversation-panel{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100%;min-height:0;overflow:hidden}.dialogs-page.mobile-conversation .conversation-head{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:8px;min-height:52px;padding:7px 10px}.dialogs-page.mobile-conversation .mobile-dialog-back{grid-column:1;display:grid;place-items:center;width:36px;height:36px;margin:0;overflow:hidden;font-size:0}.dialogs-page.mobile-conversation .mobile-dialog-back:before{content:"‹";font-size:36px;line-height:32px}.dialogs-page.mobile-conversation .conversation-avatar{display:none}.dialogs-page.mobile-conversation .conversation-head>div{grid-column:2;min-width:0}.dialogs-page.mobile-conversation .conversation-head h2{margin:0;font-size:15px;line-height:1.2}.dialogs-page.mobile-conversation .conversation-head p{display:none}.dialogs-page.mobile-conversation .message-history{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:10px 8px 12px;scrollbar-gutter:stable}.dialogs-page.mobile-conversation .message-bubble{max-width:88%;padding:8px 10px;font-size:13px}.dialogs-page.mobile-conversation .message-bubble:has(.message-image-link){position:relative;overflow:hidden;padding:0;border:0;background:transparent}.dialogs-page.mobile-conversation .message-bubble:has(.message-image-link)>time{position:absolute;right:6px;bottom:5px;padding:2px 5px;border-radius:8px;background:rgba(0,0,0,.5);color:#fff}.dialogs-page.mobile-conversation .message-image-link{margin:0}.dialogs-page.mobile-conversation .message-image{max-height:58dvh;border-radius:12px}.dialogs-page.mobile-conversation .telegram-voice{grid-template-columns:38px minmax(120px,190px) 34px;min-width:220px}.dialogs-page.mobile-conversation .voice-play{width:38px;min-width:38px;height:38px}.dialogs-page.mobile-conversation .message-composer{position:static;z-index:2;min-width:0;padding:6px 8px;border-radius:0;background:#fff;box-shadow:0 -1px 5px rgba(33,52,78,.08)}.dialogs-page.mobile-conversation .message-composer .manual-attention,.dialogs-page.mobile-conversation .message-composer>form:first-of-type>label,.dialogs-page.mobile-conversation .message-composer .tg-reviewed-form{display:none}.dialogs-page.mobile-conversation .message-composer>form:first-of-type{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:center;gap:7px}.dialogs-page.mobile-conversation .message-composer>form:first-of-type textarea{height:40px;min-height:40px;max-height:82px;margin:0;padding:9px 13px;border-radius:20px}.dialogs-page.mobile-conversation .message-composer>form:first-of-type>button{display:grid;place-items:center;width:40px;min-width:40px;height:40px;margin:0;padding:0;border-radius:50%;font-size:0}.dialogs-page.mobile-conversation .message-composer>form:first-of-type>button:after{content:"➤";font-size:17px}.dialogs-page.mobile-conversation .message-composer:has(.tg-reviewed-form)>form:first-of-type textarea{padding-right:13px}}

/* Mobile screens use the complete viewport: no desktop gutter may reduce the chat. */
@media(max-width:760px){
  body.telegram-mode:has(.dialogs-page.mobile-conversation) main{
    position:fixed;
    inset:0;
    width:100%;
    max-width:none;
    height:100dvh;
    padding:max(env(safe-area-inset-top),0px) 0 max(env(safe-area-inset-bottom),0px);
    overflow:hidden;
  }
  .dialogs-page.mobile-conversation,
  .dialogs-page.mobile-conversation .dialogs-layout,
  .dialogs-page.mobile-conversation .conversation-panel,
  .dialogs-page.mobile-conversation .message-history,
  .dialogs-page.mobile-conversation .message-composer{
    width:100%;
    max-width:none;
    margin:0;
  }
  .dialogs-page.mobile-conversation .dialogs-layout,
  .dialogs-page.mobile-thread-list .dialogs-layout{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .dialogs-page.mobile-conversation .conversation-panel,
  .dialogs-page.mobile-thread-list .thread-panel{
    width:100%!important;
    min-width:0!important;
  }
  .dialogs-page.mobile-conversation .message-history{
    scrollbar-gutter:auto;
  }
  .dialogs-page.mobile-conversation .message-bubble:has(.message-image-link){
    width:min(94%,430px);
    max-width:94%;
  }
  .dialogs-page.mobile-conversation .message-image{
    width:100%;
    max-width:none;
    height:auto;
  }
  .dialogs-page.mobile-conversation .message-bubble:has(.telegram-voice){
    width:min(94%,430px);
    max-width:94%;
  }
  .dialogs-page.mobile-conversation .telegram-voice{
    width:100%;
    grid-template-columns:38px minmax(0,1fr) 34px;
  }
  body.telegram-mode:has(.dialogs-page.mobile-thread-list) main{
    width:100%;
    max-width:none;
    padding-left:0;
    padding-right:0;
  }
  .dialogs-page.mobile-thread-list{
    width:100%;
    max-width:none;
    margin:0;
  }
  .dialogs-page.mobile-thread-list .dialogs-title{
    padding-left:14px;
    padding-right:14px;
  }
  .dialogs-page.mobile-thread-list .dialogs-layout{
    width:100%;
    max-width:none;
    margin:0;
    border-left:0;
    border-right:0;
    border-radius:0;
  }
}

/* Both conversation actions belong to one aligned control group. */
.message-composer .composer-form{grid-template-columns:minmax(0,1fr) auto}
.message-composer .composer-form textarea{min-width:0}
.message-composer .composer-actions{display:flex;align-items:center;gap:6px}
.message-composer .composer-actions button{
  width:120px;
  min-width:120px;
  height:42px;
  min-height:42px;
  margin:0;
  padding:7px 10px;
  white-space:nowrap;
}

@media(max-width:760px){
  .dialogs-page.mobile-conversation .message-composer .composer-form{
    grid-template-columns:minmax(0,1fr) auto;
    gap:7px;
  }
  .dialogs-page.mobile-conversation .message-composer .composer-actions{gap:5px}
  .dialogs-page.mobile-conversation .message-composer .composer-actions button{
    display:block;
    width:68px;
    min-width:68px;
    height:40px;
    min-height:40px;
    border-radius:10px;
    padding:5px;
    font-size:10px;
  }
  .dialogs-page.mobile-conversation .message-composer .composer-actions button:after{content:none}
}

/* Reading a conversation and requiring an operator are independent states. */
.thread-item.is-unread .thread-copy strong{font-weight:900}
.thread-flags{display:flex;align-items:center;justify-content:flex-end;gap:5px;min-height:16px}
.unread-dot{display:block;width:8px;height:8px;border-radius:50%;background:#238ff0;box-shadow:0 0 0 2px #e8f4ff}
.attention-mark{display:grid;place-items:center;width:16px;height:16px;border-radius:50%;font-style:normal;font-size:10px;font-weight:900}
.attention-mark{background:#fff0d4;color:#b86c00;border:1px solid #efbf6e}
.manual-attention{padding:5px 8px;border-radius:7px;background:#fff4dc;color:#765018!important}
.message-bubble.needs-attention{border:2px solid #e8a238;box-shadow:0 0 0 3px rgba(232,162,56,.14)}
.message-attention-actions{display:flex;align-items:center;gap:6px;width:max-content;margin-top:7px}
.message-attention-label{width:max-content;padding:3px 7px;border-radius:8px;background:#fff0d4;color:#9b5b00;font-size:10px;font-weight:800;line-height:1.2}
.message-reply-select{width:auto;min-width:0;min-height:24px;margin:0;padding:3px 8px;border-radius:8px;background:#e8f3ff;color:#1877ce;font-size:10px;font-weight:800;line-height:1.2}
.message-read-form{display:inline-flex;margin:0}
.message-read-button{width:auto;min-width:0;min-height:24px;margin:0;padding:3px 8px;border-radius:8px;background:#edf1f5;color:#52677a;font-size:10px;font-weight:800;line-height:1.2}
.message-bubble.needs-attention:has(.message-image-link) .message-attention-actions{position:absolute;top:7px;left:7px;margin:0;z-index:2}
.selected-reply-target{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;padding:6px 9px;border-left:3px solid #3390ec;border-radius:7px;background:#edf6ff;color:#38546d;font-size:12px}
.selected-reply-target[hidden]{display:none!important}
.selected-reply-target>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.selected-reply-target .clear-reply-target{display:grid;place-items:center;width:24px;min-width:24px;height:24px;min-height:24px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:#60758a;font-size:19px;line-height:1}
.unknown-send-box>p{margin:5px 0 8px;color:#765018}
.unknown-reply-preview{overflow:hidden;margin:0 0 8px;padding:7px 9px;border-radius:7px;background:#fff;color:#3d4c5d;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.unknown-send-actions{display:flex;align-items:center;gap:7px}
.unknown-send-actions button{width:auto;min-width:170px;margin:0;padding:8px 12px}
.unknown-send-box>small{display:block;margin-top:7px;color:#8b651f}

@media(max-width:760px){
  .dialogs-page.mobile-conversation .message-bubble.needs-attention:has(.message-image-link){border:2px solid #e8a238}
  .dialogs-page.mobile-conversation .message-composer .manual-attention{
    display:block;
    overflow:hidden;
    margin:0 0 5px;
    padding:3px 7px;
    font-size:10px;
    line-height:1.3;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .dialogs-page.mobile-conversation .selected-reply-target{padding:4px 7px;font-size:10px}
  .dialogs-page.mobile-conversation .unknown-send-actions{display:grid;grid-template-columns:1fr 1fr}
  .dialogs-page.mobile-conversation .unknown-send-actions button{width:100%;min-width:0;font-size:11px}
}

/* Removing a local conversation is explicit and never affects Telegram itself. */
.delete-chat-form{flex:0 0 auto!important;width:auto!important;margin:0!important}
.delete-chat-button{display:flex;align-items:center;gap:5px;width:auto;min-width:0;min-height:30px;margin:0;padding:5px 9px;border:1px solid #e6c4c4;border-radius:8px;background:#fff5f5;color:#a63838;font-size:11px}
.delete-chat-button span{font-size:18px;line-height:1}
.delete-chat-button b{font-size:11px;white-space:nowrap}

@media(max-width:760px){
  .dialogs-page.mobile-conversation .conversation-head{grid-template-columns:36px minmax(0,1fr) auto}
  .dialogs-page.mobile-conversation .delete-chat-form{grid-column:3}
  .dialogs-page.mobile-conversation .delete-chat-button{display:flex;width:auto;min-width:84px;height:34px;min-height:34px;padding:0 10px;border-radius:8px}
  .dialogs-page.mobile-conversation .delete-chat-button span{display:none}
  .dialogs-page.mobile-conversation .delete-chat-button b{display:block}
}

/* source: design-v3.css */
:root {
  --navy: #17263a;
  --navy-2: #223853;
  --blue: #2868b2;
  --blue-soft: #edf4fb;
  --ink: #1c2735;
  --muted: #6d7784;
  --line: #dde2e8;
  --surface: #fff;
  --canvas: #f4f5f6;
  --green: #27765a;
  --green-soft: #eaf5f0;
  --amber: #8a641d;
  --amber-soft: #fbf4e5;
  --red: #a13d3d;
  --shadow: 0 1px 2px rgba(20, 34, 50, .05), 0 8px 24px rgba(20, 34, 50, .04);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.48;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-weight: 400;
}

h1, h2, h3, strong, button, .button-link {
  font-family: inherit;
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.018em;
}

main {
  max-width: 1160px;
  padding: 38px 42px 64px;
}

.compact-head {
  margin-bottom: 22px;
}

.compact-head h1,
.dialogs-header h1 {
  font-size: clamp(1.65rem, 2.3vw, 2rem);
  letter-spacing: -.025em;
}

.compact-head p.muted,
.dialogs-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .94rem;
}

.desktop-sidebar {
  width: 224px;
  padding: 25px 16px 20px;
  border-right: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
}

.desktop-sidebar ~ main {
  margin-left: 224px;
}

.desktop-sidebar .brand {
  color: var(--ink);
}

.desktop-sidebar .brand strong span {
  color: var(--muted);
}

.side-brand {
  padding: 0 9px 25px;
}

.desktop-sidebar nav {
  gap: 3px;
}

.desktop-sidebar nav a,
.side-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #586575;
  font-size: .94rem;
  font-weight: 600;
}

.desktop-sidebar nav a:hover {
  background: #f4f6f8;
  color: var(--ink);
}

.desktop-sidebar nav a.active {
  background: var(--blue-soft);
  color: #225c9d;
}

.side-logout {
  text-decoration: none;
}

.nav-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.manager-hero {
  padding: 25px 26px;
  border-radius: 14px;
  box-shadow: none;
}

.manager-hero::after {
  display: none;
}

.hero-live {
  background: #247357;
}

.hero-paused {
  background: #263d59;
}

.hero-copy h2 {
  color: #fff;
  font-size: 1.4rem;
}

.hero-action {
  border-radius: 8px;
  font-weight: 650;
}

.attention-card,
.connection-card,
.feature-card,
.today-grid div,
.knowledge-rules,
.settings-group,
.answer-edit-card,
.suggestion-card,
.analysis-panel,
.simple-panel,
.table-wrap,
.product-card,
.product-create {
  border: 0;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.attention-card,
.connection-card,
.feature-card {
  padding: 16px 17px;
}

.attention-card {
  border-left: 3px solid #d69a35;
  background: #fffaf1;
}

.knowledge-attention {
  border-left-color: var(--green);
  background: #f3faf7;
}

.connection-icon,
.settings-symbol,
.feature-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 9px;
}

.today-grid div {
  padding: 17px;
}

.today-grid strong {
  font-size: 1.55rem;
  font-weight: 700;
}

.section-title {
  margin-top: 27px;
  color: #424e5d;
  font-size: .94rem;
  font-weight: 650;
  letter-spacing: 0;
}

.feature-card strong,
.connection-card strong,
.settings-group strong {
  font-weight: 650;
}

.settings-list {
  gap: 8px;
}

.settings-group > summary {
  padding: 16px 17px;
}

.settings-group > summary > b,
.attention-card b,
.feature-card b,
.connection-card b {
  color: #929ba6;
  font-weight: 400;
}

.settings-content {
  border-top-color: #edf0f3;
}

.settings-document-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.settings-document-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.settings-document-links a:hover {
  text-decoration: underline;
}

input,
textarea,
select {
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #cfd5dc;
  border-radius: 8px;
  background: #fff;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #72a0cf;
  outline: 3px solid rgba(40, 104, 178, .11);
}

button,
.button-link {
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 650;
}

.secondary {
  background: #eef1f4;
  color: #334255;
}

.notice {
  border-radius: 9px;
  font-size: .94rem;
}

.tip-card {
  border-radius: 10px;
  background: #edf4f9;
}

.dialogs-page {
  max-width: 1400px;
}

.dialogs-header {
  justify-content: flex-start;
  margin-bottom: 17px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.dialogs-layout {
  grid-template-columns: minmax(285px, 365px) minmax(0, 1fr);
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.thread-panel {
  border-right: 1px solid #e6e9ed;
  background: #f7f8f9;
}

.thread-filter-panel {
  border-bottom-color: #e6e9ed;
}

.thread-filter-panel > summary {
  padding: 13px 15px;
  color: #4d5a69;
}

.thread-filter-panel > summary span {
  font-weight: 650;
}

.thread-list {
  padding: 7px;
  scrollbar-width: thin;
  scrollbar-color: #cbd1d8 transparent;
}

.thread-item {
  padding: 12px;
  border: 0;
  border-radius: 10px;
}

.thread-item:hover {
  background: #f0f2f4;
}

.thread-item.selected {
  border: 0;
  background: #eaf1f8;
  box-shadow: none;
}

.thread-avatar {
  background: #e5e9ee;
  color: #405269;
  font-weight: 700;
}

.thread-copy strong {
  font-weight: 650;
}

.channel-badge {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #798695;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .04em;
}

.conversation-panel {
  background: #f6f7f8;
}

.conversation-head {
  padding: 17px 20px;
  border-bottom-color: #e6e9ed;
}

.conversation-head h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

.message-history {
  gap: 8px;
  padding: 22px;
  scrollbar-width: thin;
  scrollbar-color: #cbd1d8 transparent;
}

.message-bubble {
  border: 0;
  border-radius: 5px 14px 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 34, 50, .07);
}

.message-row.assistant .message-bubble {
  border-radius: 14px 5px 14px 14px;
  background: #deebf7;
}

.reply-box {
  border-top-color: #e1e5e9;
}

.ai-reply-box {
  border-top: 1px solid #c8d9e9;
}

.shared-media-card {
  border: 0;
  border-radius: 9px;
  background: #edf2f7;
}

.bottom-nav {
  box-shadow: 0 -1px 8px rgba(20, 34, 50, .06);
}

.bottom-nav a {
  position: relative;
  gap: 3px;
  color: #687381;
  font-size: .69rem;
  font-weight: 500;
}

.bottom-nav a > span {
  font-size: .69rem;
}

.bottom-nav .nav-icon {
  width: 22px;
  height: 22px;
}

.bottom-nav a.active {
  color: var(--blue);
  font-weight: 650;
}

.bottom-nav a.active::before {
  position: absolute;
  top: -6px;
  width: 28px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--blue);
  content: "";
}

.bottom-nav a.active .nav-icon,
.bottom-nav a.active span {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.app-footer {
  justify-content: center;
}

.app-footer nav {
  justify-content: center;
}

@media (max-width: 1000px) and (min-width: 761px) {
  .desktop-sidebar {
    width: 210px;
  }

  .desktop-sidebar ~ main {
    margin-left: 210px;
  }
}

@media (max-width: 760px) {
  .desktop-sidebar {
    display: none;
  }

  .desktop-sidebar ~ main {
    margin-left: auto;
  }

  .app-header {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: none;
  }

  main {
    padding: 22px 16px 92px;
  }

  .manager-hero {
    padding: 21px;
    border-radius: 12px;
  }

  .today-grid,
  .connection-grid {
    gap: 8px;
  }

  .settings-group > summary {
    padding: 14px 15px;
  }

  .settings-document-links {
    grid-template-columns: 1fr;
  }

  .dialogs-layout {
    border-radius: 12px;
  }

  .thread-panel {
    border-right: 0;
  }

  .conversation-head {
    padding: 14px 15px;
  }

  .message-history {
    padding: 14px 10px 18px;
  }
}

@media (max-width: 390px) {
  main {
    padding-right: 13px;
    padding-left: 13px;
  }

  .bottom-nav a > span {
    font-size: .65rem;
  }
}

/* source: telegram-core.css */
/* Telegram-inspired conversation layout; our own branding, not Telegram's UI. */
.telegram-mode{--navy:#263e55;--blue:#3390ec;--blue-soft:#eaf4ff;--ink:#202a35;--muted:#6e7b89;--line:#e3e8ed;--canvas:#f3f5f7;--shadow:0 2px 8px rgba(25,48,72,.06)}
.telegram-mode .app-header{background:#fff;color:var(--ink);border-bottom:1px solid var(--line)}
.telegram-mode .app-header .brand{color:var(--ink)}
.telegram-mode .app-header .brand span{color:#66798b}
.telegram-mode .desktop-sidebar{background:#fff}
.telegram-mode .desktop-sidebar nav a.active{background:#e8f4ff;color:#2382dc}
.telegram-mode .desktop-sidebar nav a:hover{background:#f1f7fc}
.telegram-mode .nav-icon{stroke-width:1.7}
.telegram-mode .manager-hero{background:#e7f4ff;border:1px solid #d6eaff;box-shadow:none;color:#20384b}
.telegram-mode .manager-hero h2,.telegram-mode .manager-hero p{color:#20384b}
.telegram-mode .connection-card,.telegram-mode .settings-group,.telegram-mode .attention-card{border-color:#e2e9ef;box-shadow:none;border-radius:12px}
.telegram-mode .connection-card:hover,.telegram-mode .settings-group:hover{border-color:#bfdef7}
.telegram-mode .dialogs-layout{border:1px solid #dfe7ee;border-radius:12px;box-shadow:0 4px 18px rgba(24,55,78,.06)}
.telegram-mode .dialogs-header{justify-content:flex-start;text-align:left;padding:0 5px}
.telegram-mode .thread-panel{background:#fff;border-right:1px solid #e8edf1}
.telegram-mode .thread-filter-panel>summary{color:#657482}
.telegram-mode .thread-list{padding:5px}
.telegram-mode .thread-item{border-radius:10px;padding:12px 10px}
.telegram-mode .thread-item:hover{background:#f3f8fd}
.telegram-mode .thread-item.selected{background:#e8f4ff}
.telegram-mode .thread-avatar{background:#dceeff;color:#327dbb}
.telegram-mode .thread-copy strong{font-weight:650}
.telegram-mode .thread-copy small{color:#788796}
.telegram-mode .thread-side time{font-size:.7rem;color:#8b9aa7}
.telegram-mode .channel-badge{color:#3290e5;font-size:.64rem;letter-spacing:0;text-transform:none}
.telegram-mode .conversation-panel{background:#dce7ed}
.telegram-mode .conversation-head{background:#fff;border-bottom:1px solid #e3e9ee}
.telegram-mode .conversation-head h2{margin:2px 0;font-size:1.1rem}
.telegram-mode .message-history{gap:9px;padding:20px 24px}
.telegram-mode .message-bubble{border-radius:12px 12px 12px 4px;background:#fff;box-shadow:0 1px 3px rgba(27,56,75,.09);max-width:min(600px,82%);padding:10px 13px;line-height:1.45}
.telegram-mode .message-row.assistant .message-bubble{border-radius:12px 12px 4px 12px;background:#ddf5cf}
.telegram-mode .message-bubble time{font-size:.68rem;color:#8293a0}
.telegram-mode .reply-box{background:#fff;border-top:1px solid #e4eaf0;padding:15px 20px}
.telegram-mode .reply-box textarea{border-color:#d9e4ec;border-radius:10px}
.telegram-mode .reply-box button:not(.secondary){background:#3390ec}
.telegram-mode .reply-box button:disabled{background:#e6ebef;color:#8896a3}
.telegram-mode .manual-attention{margin:0 0 8px;color:#6c7985;font-size:.85rem}
.telegram-mode .tg-reviewed-form{margin-top:12px;padding-top:10px;border-top:1px solid #e6edf2}
.telegram-mode .tg-reviewed-form p{margin:0 0 6px;font-size:.8rem}
.telegram-mode .tg-reviewed-form button{width:auto;margin:0}
.telegram-mode .bottom-nav{background:#fff;border-top:1px solid #e7edf2}
.telegram-mode .bottom-nav a.active{color:#3390ec;background:transparent}
.telegram-mode .bottom-nav a.active::before{background:#3390ec}
.telegram-mode .bottom-nav a.active::before{width:25px}
.telegram-icon img,.tg-setup-symbol{border-radius:50%}
.tg-switch-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;margin:0 0 18px;border-radius:12px;background:#e8f4ff;border:1px solid #cfe8fb}
.tg-switch-card strong{display:block;font-size:1.03rem}
.tg-switch-card p{margin:4px 0 0;color:#53697d;font-size:.89rem}
.tg-switch-card .button-link{flex:0 0 auto}
.tg-sample-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;margin:0 0 18px;background:#f2f8fd;border:1px solid #dbeaf6;border-radius:11px}
.tg-sample-card strong{display:block}
.tg-sample-card p{margin:4px 0 0;color:#657789;font-size:.85rem}
.tg-sample-card .actions{display:flex;gap:8px;flex:0 0 auto}
.tg-setup-card,.tg-setup-actions,.tg-consent-note{background:#fff;border:1px solid #e1e9f0;border-radius:13px;padding:20px;margin-bottom:18px;box-shadow:0 2px 8px rgba(25,48,72,.04)}
.tg-setup-top{display:flex;align-items:center;gap:14px}
.tg-setup-symbol{display:grid;place-items:center;width:48px;height:48px;background:#3390ec;color:#fff;font-size:1.5rem}
.tg-setup-top h2{margin:0;font-size:1.2rem}
.tg-setup-top p{margin:3px 0 0;color:#738394}
.tg-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:20px}
.tg-status-grid>div{padding:12px;border-radius:9px;background:#f4f8fb;min-width:0}
.tg-status-grid span,.tg-status-grid strong{display:block;overflow-wrap:anywhere}
.tg-status-grid span{color:#728394;font-size:.75rem}
.tg-status-grid strong{font-size:.88rem;margin-top:4px}
.tg-setup-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;list-style:none;counter-reset:tgstep;margin:0 0 18px;padding:0}
.tg-setup-steps li{position:relative;counter-increment:tgstep;padding:18px 18px 18px 52px;background:#fff;border:1px solid #e1e9f0;border-radius:12px}
.tg-setup-steps li::before{content:counter(tgstep);position:absolute;top:17px;left:17px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#e9f4ff;color:#2484d9;font-size:.8rem;font-weight:700}
.tg-setup-steps strong{display:block}
.tg-setup-steps p{margin:5px 0 0;color:#667788;font-size:.85rem}
.tg-setup-actions{display:grid;gap:12px}
.tg-setup-actions form{margin:0;padding-bottom:12px;border-bottom:1px solid #e8edf2}
.tg-setup-actions form:last-child{padding-bottom:0;border:0}
.tg-setup-actions form button{width:auto;margin:9px 8px 0 0}
.tg-setup-actions label{display:block;font-weight:650;margin-bottom:7px}
.tg-setup-actions input{max-width:560px;margin:0}
.tg-setup-actions h3{margin:2px 0 4px;font-size:1rem}
.tg-setup-actions p{margin:0 0 9px;color:#657789;font-size:.85rem}
.tg-disconnect{border:0;padding:0;margin:0}.tg-disconnect summary{width:max-content;color:#8b3b3b;font-weight:650}.tg-disconnect form{margin-top:10px;padding:0;border:0}
.tg-consent-note{background:#fffaf0;border-color:#f1e5c9}
.tg-consent-note p{margin:5px 0 0;color:#716648;font-size:.87rem}
@media(max-width:760px){.telegram-mode main{padding-top:20px}.telegram-mode .app-header{box-shadow:none}.telegram-mode .dialogs-layout{border:0;border-radius:0;box-shadow:none}.telegram-mode .thread-item.selected{background:#e8f4ff}.telegram-mode .conversation-panel{background:#dce7ed}.telegram-mode .message-history{padding:16px 12px}.telegram-mode .message-bubble{max-width:86%}.telegram-mode .reply-box{padding:14px 13px}.tg-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tg-setup-steps{grid-template-columns:1fr}.tg-switch-card,.tg-sample-card{flex-direction:column;align-items:flex-start}.tg-sample-card .actions{flex-wrap:wrap;flex:0 1 auto}.tg-setup-actions form button{width:100%;margin:8px 0 0}}

/* Единая сетка Telegram-консоли. */
.telegram-mode{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:#f4f6f8}
.telegram-mode main{width:min(100%,1240px);max-width:1240px}
.telegram-mode .page-head,.telegram-mode .compact-head{max-width:none;margin-bottom:24px}
.telegram-mode .page-head h1{font-size:clamp(1.75rem,2.4vw,2.25rem);font-weight:700;letter-spacing:-.025em}
.telegram-mode .connection-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:820px}
.telegram-mode .today-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.telegram-mode .knowledge-grid,.telegram-mode .knowledge-rules,.telegram-mode .tip-card{max-width:900px}
.telegram-mode .settings-list{max-width:900px}
.telegram-mode .settings-content form{max-width:680px}
.telegram-mode .telegram-icon img{width:26px;height:26px}
.telegram-mode button,.telegram-mode .button-link{min-height:44px}

/* Voice playback must stay circular despite the global button min-height. */
.telegram-mode .telegram-voice .voice-play{
  width:34px;
  min-width:34px;
  height:34px;
  min-height:34px;
  aspect-ratio:1;
  margin:0;
  padding:0;
  border-radius:50%;
}
@media(max-width:760px){
  .telegram-mode .telegram-voice .voice-play{
    width:38px;
    min-width:38px;
    height:38px;
    min-height:38px;
  }
}
.telegram-mode textarea{line-height:1.45}
.telegram-mode .app-footer{width:min(100%,1240px)}

@media(max-width:900px){
  .telegram-mode .today-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .telegram-mode .dialogs-layout{height:auto;min-height:0}
  .telegram-mode .thread-panel{max-height:none}
  .telegram-mode .conversation-panel{min-height:calc(100dvh - 150px)}
}
@media(max-width:760px){
  .telegram-mode main{width:100%;padding:20px 14px calc(92px + env(safe-area-inset-bottom))}
  .telegram-mode .app-header{padding-left:14px;padding-right:14px}
  .telegram-mode .page-head h1{font-size:1.65rem}
  .telegram-mode .page-head p{font-size:.92rem}
  .telegram-mode .manager-hero{grid-template-columns:1fr;gap:14px}
  .telegram-mode .connection-grid{grid-template-columns:1fr}
  .telegram-mode .today-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .telegram-mode .today-grid div{min-width:0}
  .telegram-mode .today-grid span{font-size:.8rem}
  .telegram-mode .settings-group{border-radius:14px}
  .telegram-mode .settings-group>summary{gap:11px;padding:14px}
  .telegram-mode .settings-symbol{width:38px;height:38px;min-width:38px}
  .telegram-mode .settings-content{padding:4px 14px 16px}
  .telegram-mode .settings-content .actions{display:grid;grid-template-columns:1fr}
  .telegram-mode .settings-content .actions>*{width:100%}
  .telegram-mode .app-footer{display:none}
}
@media(max-width:380px){
  .telegram-mode main{padding-left:11px;padding-right:11px}
  .telegram-mode .bottom-nav a{font-size:.68rem}
  .telegram-mode .today-grid{gap:7px}
  .telegram-mode .today-grid div{padding:13px 11px}
}
@media(max-width:390px){.tg-setup-card,.tg-setup-actions,.tg-consent-note{padding:15px}.tg-status-grid{gap:7px}.tg-status-grid>div{padding:10px}.telegram-mode .message-bubble{max-width:90%}}

/* source: compact-ui.css */
:root{font-size:15px;line-height:1.42}body{font-size:14px}main{max-width:1120px;padding:24px 28px 42px}h1{font-size:26px}h2{font-size:18px}.compact-head{margin-bottom:16px}.compact-head h1{font-size:26px}.compact-head p.muted{margin-top:3px}.desktop-sidebar{width:210px;padding:18px 12px}.desktop-sidebar~main{margin-left:210px}.desktop-sidebar .side-brand{padding:0 9px 18px}.desktop-sidebar .brand img{width:36px;height:36px}.desktop-sidebar nav{gap:4px}.desktop-sidebar nav a,.side-logout{padding:9px 11px;border-radius:8px}.side-install-button{margin:-8px 8px 14px;width:calc(100% - 16px);padding:8px 10px}.settings-list{gap:7px}.settings-group{border-radius:10px;box-shadow:none}.settings-group>summary{gap:11px;padding:11px 13px}.settings-symbol,.feature-icon,.connection-icon{width:34px;height:34px;min-width:34px;border-radius:9px}.settings-group>summary strong{font-size:.95rem}.settings-group>summary small{font-size:.78rem}.settings-group>summary>b{font-size:1.2rem}.settings-content{padding:2px 14px 14px}.settings-content label{margin:11px 0 4px}.settings-content .notice{margin-top:10px}.save-settings{min-height:40px}input,textarea,select{min-height:40px;padding:8px 10px;border-radius:8px}button,.button-link{padding:8px 12px;border-radius:8px}.actions{gap:8px;margin-top:11px}article,fieldset{margin:13px 0;padding:16px;border-radius:11px;box-shadow:none}.feature-card,.attention-card,.connection-card{padding:13px 14px;border-radius:10px;box-shadow:none}.feature-card{min-height:70px}.knowledge-grid{gap:8px}.knowledge-rules{padding:16px}.section-title{margin:22px 0 9px}.manager-hero{padding:20px;border-radius:13px}.today-grid,.connection-grid{gap:8px}.today-grid div{padding:13px;border-radius:10px}.today-grid strong{font-size:1.4rem}.app-footer{max-width:1120px;padding:0 28px}.cabinet-footer{margin-left:210px}.notice{padding:11px 13px;border-radius:9px}.simple-panel{border-radius:9px}.answer-edit-card{border-radius:8px}.faq-workspace{gap:7px}.faq-list-heading{margin-top:18px}
@media(max-width:1000px) and (min-width:761px){.desktop-sidebar{width:190px}.desktop-sidebar~main{margin-left:190px}.cabinet-footer{margin-left:190px}main{padding:20px 22px 38px}}
@media(max-width:760px){:root{font-size:16px}body{font-size:15px}main{padding:18px 15px 88px}.compact-head{margin-bottom:15px}.compact-head h1,h1{font-size:24px}.settings-group>summary{padding:12px}.settings-content{padding:2px 13px 14px}input,textarea,select{min-height:44px;padding:10px 11px}button,.button-link{padding:10px 13px}.feature-card{padding:14px}.manager-hero{padding:18px}.notice{padding:11px 12px}}
.desktop-sidebar .side-install-button{border:1px solid #c8dcf3;background:#eaf3fd;color:#2368a8}.desktop-sidebar .side-install-button:hover{background:#dcecff}
.desktop-sidebar .side-install-button{margin-top:auto!important;margin-bottom:4px!important}.desktop-sidebar .side-logout{margin-top:0}
@media(min-width:761px){:root{font-size:14px}body{font-size:13px}main{max-width:1050px;padding:18px 22px 34px}.desktop-sidebar{width:190px;padding:15px 10px}.desktop-sidebar~main{margin-left:190px}.desktop-sidebar .side-brand{padding:0 8px 14px}.desktop-sidebar .brand img{width:32px;height:32px}.desktop-sidebar nav a,.side-logout{padding:8px 10px}.desktop-sidebar .side-install-button{margin:-5px 7px 11px;width:calc(100% - 14px);padding:7px 9px;font-size:.82rem}.compact-head{margin-bottom:12px}.compact-head h1,h1{font-size:23px}.compact-head p.muted{font-size:.85rem}.settings-list{gap:5px}.settings-group>summary{padding:9px 11px}.settings-symbol,.feature-icon,.connection-icon{width:31px;height:31px;min-width:31px}.settings-content{padding:1px 12px 12px}.settings-content label{margin:9px 0 3px}input,textarea,select{min-height:36px;padding:7px 9px}button,.button-link{padding:7px 10px}.save-settings{min-height:36px}.feature-card,.attention-card,.connection-card{padding:11px 12px}.feature-card{min-height:62px}article,fieldset{margin:10px 0;padding:13px}.manager-hero{padding:17px}.notice{padding:9px 11px}.cabinet-footer{margin-left:190px}.app-footer{max-width:1050px;padding:0 22px}}
@media(max-width:1000px) and (min-width:761px){.desktop-sidebar{width:175px}.desktop-sidebar~main{margin-left:175px}.cabinet-footer{margin-left:175px}main{padding:16px 18px 32px}}
@media(min-width:761px){:root{font-size:13px}body{font-size:12px}main{max-width:980px;padding:14px 18px 28px}.desktop-sidebar{width:160px;padding:12px 8px}.desktop-sidebar~main{margin-left:160px}.desktop-sidebar .side-brand{padding:0 7px 11px}.desktop-sidebar .brand{gap:7px}.desktop-sidebar .brand img{width:28px;height:28px}.desktop-sidebar .brand strong{font-size:.9rem}.desktop-sidebar nav a,.side-logout{gap:8px;padding:6px 8px}.desktop-sidebar nav a span{width:20px;height:20px}.desktop-sidebar .side-install-button{margin:-3px 6px 9px;width:calc(100% - 12px);padding:6px 7px;font-size:.76rem}.compact-head{margin-bottom:9px}.compact-head h1,h1{font-size:20px}.settings-list{gap:4px}.settings-group>summary{gap:8px;padding:7px 9px}.settings-symbol,.feature-icon,.connection-icon{width:27px;height:27px;min-width:27px;border-radius:7px}.settings-group>summary strong{font-size:.9rem}.settings-group>summary small{font-size:.72rem}.settings-content{padding:1px 10px 10px}.settings-content label{margin:7px 0 2px}input,textarea,select{min-height:32px;padding:5px 8px;border-radius:6px}button,.button-link{padding:6px 9px;border-radius:6px}.save-settings{min-height:32px}.feature-card,.attention-card,.connection-card{padding:9px 10px}.feature-card{min-height:54px}article,fieldset{margin:8px 0;padding:11px}.notice{padding:7px 9px}.cabinet-footer{margin-left:160px}.app-footer{max-width:980px;padding:0 18px}body:has(.dialogs-page) main{padding:8px 14px 10px;font-size:12px}.dialogs-page{max-width:1360px}.dialogs-title h1{font-size:20px}.dialogs-layout{grid-template-columns:175px minmax(0,1fr);height:calc(100dvh - 78px);min-height:560px}.thread-filter-panel>summary{min-height:35px;padding:6px 8px}.thread-filter-panel>summary small{max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.thread-item{padding:5px 6px}.thread-avatar{width:28px;height:28px}.thread-item{grid-template-columns:28px minmax(0,1fr) auto;gap:2px 6px}.thread-copy strong{font-size:11px}.thread-copy small{font-size:10px}.thread-side time{max-width:58px;font-size:9px}.conversation-head{min-height:42px;padding:5px 10px}.conversation-head h2{font-size:13px}.message-history{padding:9px 12px}.message-bubble{padding:7px 9px;font-size:12px}.reply-box{padding:4px 8px}.manual-attention,.reply-box>form:first-of-type>label,.tg-reviewed-form p{display:none}.reply-box>form:first-of-type{gap:6px}.reply-box>form:first-of-type textarea{height:30px;min-height:30px;max-height:70px;margin:0;padding:5px 8px}.reply-box>form:first-of-type>button{min-width:120px;padding:5px 8px}.tg-reviewed-form{justify-content:flex-end;margin-top:3px!important;padding-top:3px}.tg-reviewed-form button{padding:4px 7px;font-size:10px}}
@media(max-width:1000px) and (min-width:761px){.desktop-sidebar{width:150px}.desktop-sidebar~main{margin-left:150px}.cabinet-footer{margin-left:150px}}
@media(min-width:901px){.dialogs-layout{grid-template-columns:240px minmax(0,1fr)}.reply-box:has(.tg-reviewed-form)>form:first-of-type{grid-template-columns:minmax(0,1fr) 92px 120px}.reply-box:has(.tg-reviewed-form)>form:first-of-type>button{grid-column:3}.reply-box:has(.tg-reviewed-form) .tg-reviewed-form{right:136px}}
@media(max-width:760px){.desktop-sidebar~main{width:auto;max-width:100%;margin-left:auto}.cabinet-footer{margin-left:0}.app-footer{max-width:100%}body{overflow-x:hidden}main>*{max-width:100%}}

/* source: usage.css */
.switch-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 0;margin:0}.switch-row span{display:block}.switch-row small{display:block;color:#64738a;font-weight:400;margin-top:5px}.switch-input{appearance:none;width:44px;min-width:44px;height:24px;min-height:24px;border:1px solid #8291a3;border-radius:999px;background:#9aa8ba;padding:0;position:relative;flex:0 0 44px;cursor:pointer;transition:background .16s ease,border-color .16s ease}.switch-input:before{content:"";position:absolute;width:18px;height:18px;left:2px;top:2px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0004;transition:transform .16s ease}.switch-input:checked{background:#24834e;border-color:#24834e}.switch-input:checked:before{transform:translateX(20px)}.switch-input:focus-visible{outline:3px solid #2f8de455;outline-offset:2px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:20px 0}.stats-grid article{margin:0}.stats-grid strong,.stats-grid span{display:block}.stats-grid strong{font-size:26px}.stats-grid span,td small{color:#64738a}.table-wrap{overflow-x:auto;background:#fff;border:1px solid #dce3ed;border-radius:12px;margin-top:20px}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px;border-bottom:1px solid #e5e9ef;vertical-align:top}th{white-space:nowrap}@media(max-width:760px){.stats-grid{grid-template-columns:1fr 1fr}}@media(max-width:650px){.switch-row{align-items:center}.switch-input{width:44px}.actions .button-link{margin-bottom:8px}}

/* source: faq-ui.css */
.simple-panel>header,.simple-panel>summary{justify-content:flex-start;margin:0;background:#fff}.simple-panel>header{color:#223047}.simple-panel>header strong{font-size:1rem}

/* source: unified-ui.css */
/* Final console design system. This is the only layer allowed to normalize legacy pages. */
:root{--ui-font:14px;--ui-caption:12px;--ui-title:22px;--ui-control:38px;--ui-radius:8px;--ui-space-1:4px;--ui-space-2:8px;--ui-space-3:12px;--ui-space-4:16px;--ui-space-5:24px;--ui-canvas:#f3f5f7;--ui-surface:#fff;--ui-text:#1d2a38;--ui-muted:#68788a;--ui-line:#dfe5eb;--ui-blue:#2f8de4;--ui-blue-soft:#eaf4fd;--ui-amber:#b56f09;--ui-amber-soft:#fff4dc;--ui-red:#ad4141;font-size:var(--ui-font)}
html,body{max-width:100%;overflow-x:hidden}body{background:var(--ui-canvas);color:var(--ui-text);font-size:var(--ui-font);line-height:1.42}main{padding:var(--ui-space-4) var(--ui-space-5) calc(var(--ui-space-5)*2)}
h1,.compact-head h1{font-size:var(--ui-title);line-height:1.2}h2{font-size:18px;line-height:1.3}h3{font-size:15px;line-height:1.35}.muted,.compact-head p.muted,small{color:var(--ui-muted);font-size:var(--ui-caption)}.compact-head{margin-bottom:var(--ui-space-3)}.compact-head p.muted{margin-top:var(--ui-space-1)}
button,.button-link,input,select,textarea{font:inherit;border-radius:var(--ui-radius)}input,select{min-height:var(--ui-control);padding:7px 10px}textarea{padding:9px 10px}button,.button-link{min-height:36px;padding:7px 12px}label{margin:var(--ui-space-3) 0 var(--ui-space-1);font-size:13px}.actions,.row{gap:var(--ui-space-2)}.notice{padding:9px 12px;border-radius:var(--ui-radius)}
.desktop-sidebar{width:176px;padding:14px 9px}.desktop-sidebar~main{margin-left:176px}.desktop-sidebar .side-brand{padding:0 8px 14px}.desktop-sidebar .side-brand img{width:30px;height:30px}.desktop-sidebar nav{gap:2px}.desktop-sidebar nav a,.side-logout{min-height:38px;padding:7px 9px;border-radius:var(--ui-radius);font-size:13px}.desktop-sidebar nav a span{width:20px;height:20px}
.settings-list{gap:6px}.settings-group{border:1px solid var(--ui-line);border-radius:10px;box-shadow:none}.settings-group>summary{min-height:54px;padding:9px 12px;gap:10px}.settings-group>summary small{margin-top:1px}.settings-content{padding:4px 14px 14px;border-top:1px solid var(--ui-line)}.settings-symbol{width:30px;height:30px;min-width:30px;border-radius:8px}.settings-content .muted{margin:7px 0}.settings-content .actions{margin-top:10px}.save-settings{min-height:38px;margin-top:8px}
.manager-hero{padding:17px 18px;border-radius:10px}.hero-copy h2{font-size:18px}.hero-copy p{font-size:13px}.hero-copy .hero-mode{display:inline-flex;gap:5px;margin:0 0 7px;padding:4px 8px;border-radius:7px;background:#d4eafb;color:#173d5c;font-size:12px}.hero-action{padding:8px 12px}.attention-card,.connection-card,.feature-card{padding:11px 12px;border-radius:10px;box-shadow:none}.connection-grid,.today-grid,.knowledge-grid{gap:8px}.today-grid div{padding:12px;border-radius:10px;box-shadow:none}.today-grid strong{font-size:20px}.section-title{margin:20px 0 8px}.knowledge-rules{padding:14px;border-radius:10px;box-shadow:none}.tip-card{padding:10px 12px;margin-top:10px}
.faq-page-head{margin-bottom:8px}.faq-sheet{height:calc(100dvh - 92px);min-height:500px;border-radius:10px;box-shadow:none}.faq-sheet-toolbar{gap:8px;padding:8px}.faq-sheet-toolbar button{min-height:36px}.faq-grid textarea{font-size:13px}
.dialogs-layout{border:1px solid var(--ui-line);border-radius:10px;box-shadow:none}.thread-tools{padding:6px}.thread-item{padding:7px 8px}.thread-copy strong{font-size:12px}.thread-copy small{font-size:11px}.conversation-head{min-height:48px;padding:6px 10px}.conversation-head h2{font-size:14px}.message-history{gap:7px;padding:10px 12px}.message-bubble{padding:7px 9px;border-radius:5px 12px 12px;font-size:13px;box-shadow:0 1px 2px rgba(26,43,60,.08)}.message-row.assistant .message-bubble{border-radius:12px 5px 12px 12px}.message-bubble.needs-attention{border:1px solid #e4a441;box-shadow:0 0 0 2px rgba(228,164,65,.12)}.message-attention-label{background:var(--ui-amber-soft);color:var(--ui-amber)}.reply-box{padding:6px 9px}.message-composer .composer-actions button{height:38px;min-height:38px}.delete-chat-button{height:32px;min-height:32px}
@media(min-width:901px){body:has(.dialogs-page) main{padding:8px 12px 10px}.dialogs-layout{grid-template-columns:260px minmax(0,1fr);height:calc(100dvh - 82px)}}
@media(max-width:760px){:root{--ui-font:14px;--ui-caption:12px;--ui-title:22px;--ui-control:44px}.desktop-sidebar{display:none}.desktop-sidebar~main{margin-left:0}main{width:100%;padding:16px 12px calc(76px + env(safe-area-inset-bottom))}.app-header{box-sizing:border-box;min-height:calc(58px + env(safe-area-inset-top));padding:calc(8px + env(safe-area-inset-top)) 14px 8px}.compact-head{margin-bottom:10px}button,.button-link{min-height:44px}input,select{min-height:44px;font-size:16px}textarea{font-size:16px}.manager-hero{display:block;padding:15px}.hero-action{display:block;margin-top:12px;text-align:center}.connection-grid,.today-grid{grid-template-columns:1fr 1fr}.settings-group>summary{min-height:58px;padding:10px 11px}.settings-content{padding:4px 11px 12px}.faq-sheet{height:calc(100dvh - 154px);min-height:420px;border-right:0;border-left:0;border-radius:0}.faq-sheet-toolbar{position:sticky;top:0;z-index:3}.dialogs-page.mobile-thread-list .dialogs-title{padding:0 12px}.dialogs-page.mobile-conversation .conversation-head{min-height:52px;padding:6px 8px}.dialogs-page.mobile-conversation .message-history{padding:8px}.dialogs-page.mobile-conversation .message-bubble{font-size:14px}.dialogs-page.mobile-conversation .message-composer{padding:6px 8px calc(6px + env(safe-area-inset-bottom))}.dialogs-page.mobile-conversation .message-composer .composer-actions button{width:44px;min-width:44px;height:44px;min-height:44px;border-radius:50%;font-size:0}.dialogs-page.mobile-conversation .message-composer .composer-actions button:after{content:"➤";font-size:16px}}
@media(max-width:380px){main{padding-right:9px;padding-left:9px}.connection-grid,.today-grid{grid-template-columns:1fr}.bottom-nav a span{font-size:11px}}
.faq-add-dialog{width:min(460px,calc(100vw - 24px));padding:18px}.faq-add-dialog h2{margin:0 0 12px}.faq-add-dialog label{display:block}.faq-add-dialog textarea{display:block;width:100%;margin-top:5px}.faq-add-dialog .actions{display:grid;grid-template-columns:1fr 1fr;margin-top:14px}.faq-add-error{margin:8px 0 0;color:var(--ui-red);font-size:13px}
@media(max-width:760px){.faq-add-dialog{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);overflow:auto}.faq-add-dialog::backdrop{background:rgba(20,34,51,.55)}}
.faq-row-review td{background:#fffaf0}.faq-review-note{display:inline-block;margin:6px 10px 0;padding:2px 6px;border-radius:5px;background:#fff0c7;color:#8b5b00;font-size:.7rem;font-weight:700}.faq-row-review textarea{height:45px;min-height:45px;padding-top:5px}
/* Structured AI manager settings and operator handoff workspace. */
.manager-profile-form{margin:0}.manager-defaults-note{margin-bottom:10px}.manager-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 14px}.manager-form-grid label{display:flex;flex-direction:column}.manager-form-grid .wide{grid-column:1/-1}.manager-save{margin:12px 0 22px}.manager-collection{margin:10px 0;background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:10px}.manager-collection>summary{display:flex;flex-direction:column;gap:2px;padding:13px 15px;cursor:pointer;list-style:none}.manager-collection>summary::-webkit-details-marker{display:none}.manager-collection>summary:after{content:"›";position:absolute;right:30px;font-size:20px;transition:transform .15s}.manager-collection[open]>summary:after{transform:rotate(90deg)}.manager-collection-body{padding:0 15px 15px;border-top:1px solid var(--ui-line)}.manager-item{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(280px,2fr) 80px auto;gap:8px;align-items:start;padding:10px 0;border-bottom:1px solid var(--ui-line)}.manager-item>input,.manager-item>textarea{width:100%;margin:0}.manager-item .compact-check{display:flex;align-items:center;gap:5px;margin:0;min-height:38px}.manager-item .compact-check input{min-height:auto;width:auto}.manager-item .actions{display:flex;margin:0}.manager-item-new{grid-template-columns:minmax(150px,.8fr) minmax(280px,2fr) auto;border:1px dashed #b7c7d8;border-radius:8px;margin-top:10px;padding:10px}
@media(max-width:760px){.bottom-nav a{min-width:0}.bottom-nav a span{font-size:10px}.manager-form-grid{grid-template-columns:1fr}.manager-item{grid-template-columns:1fr}.manager-item .actions{display:grid;grid-template-columns:1fr 1fr}.manager-collection>summary:after{right:24px}}

/* Review mode: one compact proposal card above the ordinary reply field. */
.approval-card{border-top:1px solid var(--ui-line);background:#f6faff;padding:9px 11px}
.approval-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}
.approval-card-head span:first-child{display:flex;flex-direction:column}
.approval-card-head small{margin-top:1px}
.approval-confidence{padding:3px 7px;border-radius:7px;background:#e4f2ff;color:#1769aa;font-size:11px;font-weight:800}
.approval-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;margin:0}
.approval-reply{min-height:66px;margin:0;background:#fff}
.approval-reply[readonly]{color:#34495e;background:#fff}
.approval-actions{display:grid;grid-template-columns:repeat(3,auto);gap:6px}
.approval-actions button{width:auto;min-width:86px;margin:0;white-space:nowrap}
.approval-reject{color:#a23838;background:#fff0f0}
@media(max-width:760px){
  .approval-card{padding:8px}
  .approval-form{grid-template-columns:1fr}
  .approval-reply{min-height:72px;font-size:14px}
  .approval-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
  .approval-actions button{width:100%;min-width:0;padding:8px 5px;font-size:11px}
}

/* Desktop console: one typography scale and one form language. Mobile remains unchanged. */
@media(min-width:761px){
  :root{font-size:15px;--manager-blue:#3390ec;--manager-ink:#172b3f;--manager-muted:#687b8f;--manager-line:#dbe5ef;--manager-soft:#f5f8fb}
  body{font-size:14px;line-height:1.45;color:var(--manager-ink)}
  main{max-width:1180px;padding:24px 30px 44px}
  .desktop-sidebar{width:218px;padding:18px 12px}
  .desktop-sidebar~main,.cabinet-footer{margin-left:218px}
  .desktop-sidebar .side-brand{padding:0 10px 18px}
  .desktop-sidebar .brand img{width:36px;height:36px}
  .desktop-sidebar .brand strong{font-size:15px}
  .desktop-sidebar nav a,.side-logout{gap:11px;min-height:42px;padding:9px 11px;border-radius:9px;font-size:14px;line-height:1.2}
  .desktop-sidebar nav a span{width:22px;height:22px}
  .compact-head{margin-bottom:18px}
  .compact-head h1,h1{font-size:28px;line-height:1.2;letter-spacing:-.02em}
  h2{font-size:19px;line-height:1.3}
  .compact-head p.muted{margin-top:5px;font-size:14px}
  input,textarea,select{min-height:42px;padding:9px 11px;border-radius:9px;font:inherit;font-size:14px;line-height:1.4}
  textarea{resize:vertical}
  button,.button-link{min-height:40px;padding:9px 14px;border-radius:9px;font-size:14px;line-height:1.2}
  label{font-size:14px}
  .notice{padding:12px 14px;border-radius:10px;font-size:14px}
  article,fieldset{padding:17px;border-radius:12px}

  .manager-setup-page,.business-knowledge-page{max-width:1040px;margin:0 auto}
  .manager-page-head{display:flex;align-items:flex-end;justify-content:space-between}
  .manager-profile-form,.business-knowledge-form{display:grid;gap:14px}
  .manager-section{margin:0;padding:20px 22px;background:#fff;border:1px solid var(--manager-line);border-radius:14px;box-shadow:0 2px 10px rgba(27,55,82,.04)}
  .manager-section-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:17px;padding-bottom:15px;border-bottom:1px solid #edf2f6}
  .manager-section-head>span{display:grid;place-items:center;width:32px;height:32px;min-width:32px;border-radius:9px;background:#e7f3ff;color:#247ac5;font-size:14px;font-weight:800}
  .manager-section-head h2{margin:0;color:var(--manager-ink);font-size:19px}
  .manager-section-head p{margin:3px 0 0;color:var(--manager-muted);font-size:13px}
  .manager-fields{display:grid;gap:15px 16px}
  .manager-fields-2{grid-template-columns:repeat(2,minmax(0,1fr))}
  .manager-fields-3{grid-template-columns:repeat(3,minmax(0,1fr))}
  .manager-fields label{display:flex;min-width:0;flex-direction:column;gap:6px;margin:0;color:#30465b;font-weight:650}
  .manager-fields label.wide{grid-column:1/-1}
  .manager-fields label small{color:var(--manager-muted);font-size:12px;font-weight:400}
  .manager-fields label code{padding:1px 4px;border-radius:4px;background:#edf4fa;color:#365d7b}
  .manager-fields textarea{width:100%;margin:0;font-weight:400}
  .manager-choice-row{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin-top:16px}
  .manager-check{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;margin:0!important;color:#30465b;font-weight:600}
  .manager-check input{width:18px;min-height:18px;height:18px;margin:0;accent-color:var(--manager-blue)}
  .manager-check-field{align-self:end;min-height:42px;padding:0 2px}
  .manager-fixed{padding:7px 10px;border:1px solid #dbe7f2;border-radius:8px;background:var(--manager-soft);color:#50677d;font-size:13px}
  .manager-handoff-result{display:flex;align-items:center;gap:10px;margin-top:15px;padding:12px 14px;border-radius:10px;background:#f0f7fe;color:#335976}
  .manager-handoff-result strong{white-space:nowrap}
  .manager-order-toggle{font-size:15px}
  .manager-order-help{max-width:820px;margin:9px 0 14px;color:var(--manager-muted)}
  .manager-order-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px;padding:14px;border:1px solid #e1eaf2;border-radius:10px;background:#f8fafc}
  .manager-order-fields .manager-check{min-height:28px}
  .manager-order-fields .is-required{color:#50677d}
  .manager-safety{margin:0;padding:17px 19px;border:1px solid #bee2ce;border-radius:13px;background:#f1fbf6}
  .manager-safety strong{font-size:15px;color:#176740}
  .manager-safety p{margin:4px 0 0;color:#47685a}
  .manager-savebar{display:flex;justify-content:flex-end;margin:0 0 8px}
  .manager-save{min-width:210px;min-height:44px;margin:0;font-weight:750}
  .business-rules{margin-top:14px}
  .business-rule-row{display:grid;grid-template-columns:minmax(150px,.75fr) minmax(300px,2fr) 105px auto;gap:10px;align-items:start;padding:12px 0;border-bottom:1px solid #edf2f6}
  .business-rule-row>input,.business-rule-row>textarea{width:100%;margin:0}
  .business-rule-row .manager-check{min-height:42px}
  .business-rule-actions{display:flex;gap:7px}
  .business-rule-new{grid-template-columns:minmax(150px,.75fr) minmax(300px,2fr) 150px;margin-top:12px;padding:14px;border:1px dashed #b8cadd;border-radius:10px;background:#fafcfe}

  .orders-page{max-width:none}
  .orders-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) 220px auto auto;gap:9px;align-items:center;margin:0 0 14px}
  .orders-toolbar input,.orders-toolbar select{margin:0}
  .orders-table-wrap{overflow:auto;border:1px solid var(--manager-line);border-radius:12px;background:#fff;box-shadow:0 2px 10px rgba(27,55,82,.04)}
  .orders-table{width:100%;min-width:1740px;border-collapse:separate;border-spacing:0}
  .orders-table th{position:sticky;top:0;z-index:2;padding:10px;background:#eef4f9;color:#41576c;font-size:12px;text-align:left;white-space:nowrap;border-bottom:1px solid var(--manager-line)}
  .orders-table td{padding:8px;vertical-align:top;border-right:1px solid #edf2f6;border-bottom:1px solid #edf2f6}
  .orders-table td:nth-child(1){min-width:45px}.orders-table td:nth-child(2){min-width:210px}.orders-table td:nth-child(3){min-width:180px}.orders-table td:nth-child(4){min-width:250px}.orders-table td:nth-child(5){min-width:110px}.orders-table td:nth-child(6){min-width:190px}.orders-table td:nth-child(7),.orders-table td:nth-child(8){min-width:145px}.orders-table td:nth-child(9){min-width:180px}.orders-table td:nth-child(10){min-width:250px;border-right:0}
  .orders-table input,.orders-table textarea,.orders-table select{width:100%;min-height:38px;margin:0;padding:7px 8px;font-size:13px}
  .orders-table textarea{height:62px;resize:vertical}
  .order-number,.order-date{color:#63788b;font-size:12px;white-space:nowrap}
  .order-client{display:block;margin-top:6px;font-size:12px;font-weight:700;color:#2176bd}
  .order-status{display:inline-flex;align-items:center;min-height:30px;padding:5px 9px;border-radius:999px;background:#eef3f7;color:#4e6275;font-size:12px;font-weight:700;white-space:nowrap}
  .status-ready{background:#fff3d6;color:#8a5b00}.status-confirmed{background:#e7f3ff;color:#1769aa}.status-shipped{background:#eee9ff;color:#6848b8}.status-delivered{background:#e4f7ea;color:#187342}.status-cancelled{background:#fbe8e8;color:#a43d3d}
  .order-shipped,.order-delivered{color:#63788b;font-size:12px;white-space:nowrap}
  .order-shipped button,.order-delivered button,.order-status-cell button{width:100%;min-height:36px;margin-top:6px;padding:7px 9px}
  .order-status-cell button{display:block;margin-top:6px}
  .order-comment form{margin:6px 0 0}.order-comment button{width:100%;min-height:36px}
  .orders-empty{padding:34px!important;text-align:center;color:var(--manager-muted)}

  body:has(.dialogs-page) main{padding:16px 22px 24px;font-size:14px}
  .dialogs-title h1{font-size:26px}
  .thread-copy strong{font-size:13px}.thread-copy small{font-size:12px}.thread-side time{font-size:11px}
  .conversation-head h2{font-size:16px}.message-bubble{font-size:14px}.reply-box>form:first-of-type textarea{font-size:14px}
}
@media(max-width:1000px) and (min-width:761px){
  .desktop-sidebar{width:190px}.desktop-sidebar~main,.cabinet-footer{margin-left:190px}
  main{padding:20px 22px 38px}
  .manager-fields-3{grid-template-columns:1fr 1fr}
}
@media(max-width:760px){
  .bottom-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));padding-left:2px;padding-right:2px}
  .bottom-nav a{width:auto;padding-left:1px;padding-right:1px;gap:2px}.bottom-nav a span{font-size:9px;white-space:nowrap}
  .orders-page .page-head{align-items:flex-start}.orders-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:8px}.orders-toolbar input{grid-column:1/-1}
  .orders-table-wrap{overflow:visible;border:0;background:transparent}.orders-table{display:block;min-width:0}.orders-table thead{display:none}.orders-table tbody,.orders-table tr{display:block}
  .orders-table tr{margin:0 0 12px;padding:10px;border:1px solid var(--ui-line);border-radius:12px;background:#fff}
  .orders-table td{display:grid;grid-template-columns:105px minmax(0,1fr);gap:8px;align-items:start;min-width:0!important;padding:7px 0;border:0!important}
  .orders-table td:before{color:var(--ui-muted);font-size:11px;font-weight:700}
  .orders-table td:nth-child(1):before{content:"№"}.orders-table td:nth-child(2):before{content:"Имя"}.orders-table td:nth-child(3):before{content:"Контакт"}.orders-table td:nth-child(4):before{content:"Товар"}.orders-table td:nth-child(5):before{content:"Количество"}.orders-table td:nth-child(6):before{content:"Трек-номер"}.orders-table td:nth-child(7):before{content:"Отправлен"}.orders-table td:nth-child(8):before{content:"Доставлен"}.orders-table td:nth-child(9):before{content:"Статус"}.orders-table td:nth-child(10):before{content:"Комментарий"}
  .orders-table input,.orders-table textarea,.orders-table select{min-width:0;width:100%;font-size:16px}.orders-empty{display:block!important}
  .manager-section{padding:14px 12px}.manager-fields-2,.manager-fields-3,.manager-order-fields{grid-template-columns:1fr}
  .manager-savebar{position:sticky;bottom:calc(64px + env(safe-area-inset-bottom));z-index:4;padding:8px;background:rgba(243,245,247,.94)}.manager-save{width:100%;margin:0}
  .tg-status-grid{grid-template-columns:1fr 1fr}
}

/* source: dashboard.css */
.dashboard-shell{display:grid;gap:14px;max-width:1080px;margin:0 auto}.dashboard-status{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:17px 19px;border:1px solid #cfe2f3;border-radius:12px;background:#eaf5ff;color:#18334c}.dashboard-status>div{display:grid;gap:3px}.dashboard-label{font-size:12px;font-weight:750}.dashboard-status strong{display:flex;align-items:center;gap:8px;font-size:16px}.dashboard-status strong i{width:8px;height:8px;border-radius:50%;background:#21a66d;box-shadow:0 0 0 4px rgba(33,166,109,.12)}.dashboard-status.is-off strong i{background:#98a4b2}.dashboard-status small{color:#62778c;font-size:12px}.dashboard-status>a{display:flex;align-items:center;gap:7px;flex:0 0 auto;padding:9px 13px;border:1px solid #dbe3eb;border-radius:8px;background:#fff;color:#25394e;text-decoration:none;font-size:12px;font-weight:750}.dashboard-section-head{display:flex;align-items:center;justify-content:space-between;margin-top:1px}.dashboard-section-head h2{margin:0;font-size:13px}.dashboard-section-head>a{color:#38668d;text-decoration:none;font-size:11px;font-weight:700}.dashboard-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.dashboard-metrics article{min-width:0;padding:13px 14px;border:1px solid #e1e8ee;border-radius:11px;background:#fff;box-shadow:0 4px 14px rgba(25,53,78,.04)}.dashboard-metrics article>span{display:block;color:#26394b;font-size:11px;font-weight:750}.dashboard-metrics article>strong{display:block;margin-top:2px;font-size:23px;line-height:1}.dashboard-metrics svg{display:block;width:100%;height:42px;margin-top:8px;overflow:visible}.dashboard-metrics svg path{stroke:#e7edf2;stroke-width:.7}.dashboard-metrics svg polyline{fill:none;stroke:#62a9c9;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.chart-scale{display:flex;justify-content:space-between;color:#9aa6b1;font-size:7px}.chart-scale b{font-weight:500}.success-metric{text-align:left}.success-ring{display:grid;place-items:center;width:62px;height:62px;margin:8px auto 3px;border-radius:50%;background:conic-gradient(#2c91d0 calc(var(--success)*1%),#e7edf2 0);position:relative}.success-ring:after{content:"";position:absolute;width:48px;height:48px;border-radius:50%;background:#fff}.success-ring strong{position:relative;z-index:1;font-size:17px}.success-metric>small,.metric-cost{display:block;color:#82909e;font-size:9px;text-align:center}.dashboard-attention{overflow:hidden;border:1px solid #ecd7ac;border-radius:12px;background:#fffaf1}.dashboard-attention>header{display:flex;align-items:center;gap:10px;padding:11px 13px;border-bottom:1px solid #f0e1c4}.dashboard-attention>header>span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#efad2e;color:#fff;font-size:13px;font-weight:900}.dashboard-attention>header>div{display:grid;flex:1}.dashboard-attention>header strong{font-size:12px}.dashboard-attention>header small{color:#8b7350;font-size:9px}.dashboard-attention>header>a{color:#6f5938;text-decoration:none;font-size:10px;font-weight:750}.dashboard-attention-list{display:grid;max-height:216px;overflow:auto;padding:3px 12px 8px}.dashboard-attention-list article{display:flex;align-items:center;gap:9px;padding:9px 1px;border-bottom:1px solid #f1e8d8}.dashboard-attention-list article:last-child{border-bottom:0}.attention-avatar{display:grid;place-items:center;width:31px;height:31px;flex:0 0 31px;border-radius:50%;background:#e9d9ce;color:#6e4936;font-size:11px;font-weight:800}.dashboard-attention-list article>div{display:grid;min-width:0;flex:1}.dashboard-attention-list strong{font-size:11px}.dashboard-attention-list small,.dashboard-attention-list em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;font-style:normal}.dashboard-attention-list small{color:#4f5f6e}.dashboard-attention-list em{color:#9b7040}.dashboard-attention-list article>a{padding:6px 10px;border:1px solid #dedede;border-radius:7px;background:#fff;color:#293b4c;text-decoration:none;font-size:9px;font-weight:750}.dashboard-attention-empty{display:grid;gap:2px;padding:17px;text-align:center}.dashboard-attention-empty strong{font-size:12px}.dashboard-attention-empty span{color:#778594;font-size:10px}.connections-head{margin-top:2px}.dashboard-connections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.dashboard-connections>a{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #e1e8ee;border-radius:11px;background:#fff;color:#23374a;text-decoration:none}.dashboard-connection-logo{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:10px;background:#eaf5ff}.dashboard-connection-logo img{width:28px;height:28px}.dashboard-connection-logo.ai-mark{background:#eef0ff;color:#475a91;font-size:10px;font-weight:900}.dashboard-connections>a>div{display:grid;min-width:0;flex:1}.dashboard-connections strong{font-size:11px}.dashboard-connections small{overflow:hidden;color:#7a8896;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.connection-state{display:flex;align-items:center;gap:5px;color:#67798a;font-size:9px;font-style:normal}.connection-state:before{content:"";width:7px;height:7px;border-radius:50%;background:#eca92e}.connection-state.ok:before{background:#23a675}
@media(max-width:900px){.dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.dashboard-shell{gap:11px}.dashboard-status{align-items:stretch;flex-direction:column;gap:11px;padding:15px}.dashboard-status>a{justify-content:center}.dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.dashboard-metrics article{padding:12px}.dashboard-attention-list{padding-right:9px;padding-left:9px}.dashboard-attention-list article>div em{display:none}.dashboard-connections{grid-template-columns:1fr}.connection-state{font-size:0}.dashboard-section-head h2{font-size:14px}}
@media(max-width:380px){.dashboard-metrics{grid-template-columns:1fr 1fr}.dashboard-metrics article{padding:10px}.dashboard-metrics article>strong{font-size:20px}.dashboard-metrics svg{height:35px}.dashboard-attention>header>a{font-size:0}.dashboard-attention>header>a:after{content:"Все";font-size:10px}}
.dashboard-status small em{font-style:normal;font-weight:750}
.success-ring{background:none}.success-ring:after{display:none}.success-ring svg{position:absolute;inset:0;width:100%;height:100%;margin:0;transform:rotate(-90deg)}.success-ring circle{fill:none;stroke-width:3}.ring-track{stroke:#e7edf2}.ring-value{stroke:#2c91d0;stroke-linecap:round}

/* Reuse the exact palette that the dashboard had before its layout changed. */
.dashboard-status{border-color:#d6eaff;background:#e7f4ff;color:#20384b}
.dashboard-status.is-off{border-color:#d6eaff;background:#e7f4ff;color:#20384b}
.dashboard-status small{color:var(--muted)}
.dashboard-status>a{border-color:var(--line);background:var(--surface);color:var(--ink)}
.dashboard-status strong i{background:#21a975;box-shadow:0 0 0 4px rgba(33,169,117,.12)}
.dashboard-status.is-off strong i{background:#a8b2c0;box-shadow:none}
.dashboard-section-head>a{color:var(--blue)}
.dashboard-metrics article,.dashboard-connections>a{border-color:var(--line);background:var(--surface);box-shadow:none}
.dashboard-metrics svg path,.ring-track{stroke:var(--line)}
.dashboard-metrics svg polyline,.ring-value{stroke:var(--blue)}
.dashboard-attention{border-color:#efd699;background:#fffaf0}
.dashboard-attention>header{background:#fffaf0;color:var(--ink)}
.dashboard-attention>header>span{background:#f0a827}

/* source: neon-theme.css */
/* Dark violet console theme. This file is intentionally last in console.css. */
.telegram-mode{
  --navy:#09090e;
  --navy-2:#14121a;
  --blue:#e24bdf;
  --blue-soft:#29172d;
  --ink:#f5eff7;
  --muted:#aca2b2;
  --line:rgba(226,75,223,.28);
  --surface:#18171e;
  --canvas:#0e0d13;
  --green:#35de76;
  --green-soft:#13271d;
  --amber:#e7a73e;
  --amber-soft:#2d2517;
  --red:#f06a78;
  --ui-canvas:var(--canvas);
  --ui-surface:var(--surface);
  --ui-text:var(--ink);
  --ui-muted:var(--muted);
  --ui-line:var(--line);
  --ui-blue:var(--blue);
  --ui-blue-soft:var(--blue-soft);
  --manager-blue:var(--blue);
  --manager-ink:var(--ink);
  --manager-muted:var(--muted);
  --manager-line:var(--line);
  --manager-soft:#121118;
  color-scheme:dark;
}

body.telegram-mode{
  color:var(--ink);
  background:
    radial-gradient(circle at 78% 7%,rgba(178,44,190,.12),transparent 28rem),
    radial-gradient(circle at 20% 90%,rgba(111,32,129,.08),transparent 30rem),
    var(--canvas);
}

.telegram-mode h1,.telegram-mode h2,.telegram-mode h3,.telegram-mode strong,
.telegram-mode legend,.telegram-mode label{color:var(--ink)}
.telegram-mode .muted,.telegram-mode small,.telegram-mode footer{color:var(--muted)}
.telegram-mode a{color:#f08ced}

.telegram-mode .desktop-sidebar{
  border-right:1px solid rgba(226,75,223,.24);
  background:
    linear-gradient(145deg,rgba(226,75,223,.05),transparent 38%),
    linear-gradient(35deg,#09090e,#111018 65%,#0b0910);
  box-shadow:12px 0 34px rgba(0,0,0,.28);
}
.telegram-mode .desktop-sidebar .brand,.telegram-mode .side-logout{color:var(--ink)}
.telegram-mode .brand img{
  border:1px solid rgba(239,88,235,.5);
  border-radius:10px;
  box-shadow:0 0 14px rgba(226,75,223,.28);
}
.telegram-mode .brand strong span{color:#bbaec1}
.telegram-mode .desktop-sidebar nav a{color:#c8bccd}
.telegram-mode .desktop-sidebar nav a:hover{
  color:#fff;
  background:rgba(226,75,223,.1);
}
.telegram-mode .desktop-sidebar nav a.active{
  color:#fff;
  border:1px solid rgba(242,99,238,.62);
  background:linear-gradient(90deg,rgba(226,75,223,.42),rgba(113,36,131,.2));
  box-shadow:inset 0 0 16px rgba(236,76,231,.18),0 0 14px rgba(226,75,223,.2);
}
.telegram-mode .side-install-button{
  border-color:rgba(226,75,223,.48);
  background:#15121a;
  color:#f4c8f2;
}

.telegram-mode article,.telegram-mode fieldset,.telegram-mode .settings-group,
.telegram-mode .manager-collection,.telegram-mode .simple-panel,
.telegram-mode .knowledge-rules,.telegram-mode .faq-sheet,
.telegram-mode .table-wrap,.telegram-mode .orders-shell{
  border-color:var(--line);
  background:var(--surface);
  color:var(--ink);
  box-shadow:0 8px 24px rgba(0,0,0,.18);
}

.telegram-mode input,.telegram-mode textarea,.telegram-mode select{
  border-color:#46394a;
  background:#111017;
  color:var(--ink);
}
.telegram-mode input::placeholder,.telegram-mode textarea::placeholder{color:#796f7d}
.telegram-mode input:focus,.telegram-mode textarea:focus,.telegram-mode select:focus{
  border-color:var(--blue);
  outline:3px solid rgba(226,75,223,.15);
  box-shadow:0 0 12px rgba(226,75,223,.13);
}
.telegram-mode button,.telegram-mode .button-link{
  color:#fff;
  background:linear-gradient(135deg,#bc36c0,#e451df);
  box-shadow:0 0 12px rgba(226,75,223,.18);
}
.telegram-mode button:hover,.telegram-mode .button-link:hover{filter:brightness(1.08)}
.telegram-mode .secondary{
  border:1px solid #46394a;
  background:#24212a;
  color:#e9e0ec;
  box-shadow:none;
}
.telegram-mode .danger{border-color:#713841!important;background:#29171c!important;color:#ff9aa5!important}

.telegram-mode .settings-group>summary,.telegram-mode .manager-collection>summary{
  color:var(--ink);
  background:#18171e;
}
.telegram-mode .settings-group[open]>summary,.telegram-mode .manager-collection[open]>summary{
  border-bottom-color:var(--line);
  background:#201823;
}
.telegram-mode .settings-symbol,.telegram-mode .manager-section-head>span{
  background:#29172d;
  color:#ef76eb;
}
.telegram-mode .manager-fixed,.telegram-mode .manager-order-fields,
.telegram-mode .business-rule-new,.telegram-mode .answer-preview{
  border-color:var(--line);
  background:#121118;
  color:#cfc3d3;
}
.telegram-mode .manager-handoff-result,
.telegram-mode .tip-card{
  border:1px solid var(--line);
  background:#18171e;
  color:#d8ccdc;
}
.telegram-mode .manager-handoff-result strong,
.telegram-mode .tip-card strong{color:var(--ink)}
.telegram-mode .manager-safety{border-color:#2c6947;background:#12251a}
.telegram-mode .manager-safety strong{color:#67e99a}
.telegram-mode .manager-safety p{color:#a3cbb2}

.telegram-mode table{color:var(--ink)}
.telegram-mode th,.telegram-mode .orders-table th{
  border-color:#3b3040;
  background:#211824;
  color:#eeccec;
}
.telegram-mode td,.telegram-mode .orders-table td{border-color:#332b37;background:#17161d}
.telegram-mode tr:hover td{background:#211a23}
.telegram-mode .faq-row-review td{background:#292117}
.telegram-mode .faq-sheet-toolbar{border-color:var(--line);background:#18171e}
.telegram-mode .orders-table-wrap{border-color:var(--line);background:#141319}

/* Telegram setup must use the same dark surface and truly circular symbols. */
.telegram-mode .tg-setup-card,
.telegram-mode .tg-setup-actions,
.telegram-mode .tg-consent-note,
.telegram-mode .tg-switch-card,
.telegram-mode .tg-sample-card,
.telegram-mode .tg-setup-steps li{
  border-color:var(--line);
  background:#18171e;
  color:var(--ink);
  box-shadow:0 8px 24px rgba(0,0,0,.18);
}
.telegram-mode .tg-setup-top{align-items:center}
.telegram-mode .tg-setup-top>div{min-width:0}
.telegram-mode .tg-setup-top p,
.telegram-mode .tg-setup-actions p,
.telegram-mode .tg-setup-steps p,
.telegram-mode .tg-consent-note p{color:var(--muted)}
.telegram-mode .tg-status-grid>div{background:#111017;color:var(--ink)}
.telegram-mode .tg-status-grid span{color:var(--muted)}
.telegram-mode .tg-status-grid strong{color:var(--ink)}
.telegram-mode .tg-setup-actions form{border-color:#352b39}
.telegram-mode .tg-setup-symbol{
  display:grid;
  place-items:center;
  width:52px;
  min-width:52px;
  max-width:52px;
  height:52px;
  min-height:52px;
  max-height:52px;
  flex:0 0 52px;
  padding:0;
  border-radius:50%;
  background:#3390ec;
  color:#fff;
  font-size:30px;
  font-weight:800;
  line-height:1;
  aspect-ratio:1;
  overflow:hidden;
}
.telegram-mode .tg-setup-symbol b{color:#fff;font-size:30px;line-height:1}
.telegram-mode .tg-symbol-icon{display:block;width:32px;height:32px;fill:#fff}

.telegram-mode .dashboard-status,
.telegram-mode .dashboard-status.is-off{
  border-color:rgba(226,75,223,.55);
  background:#19171e;
  color:var(--ink);
  box-shadow:0 0 18px rgba(226,75,223,.14);
}
.telegram-mode .dashboard-status small{color:var(--muted)}
.telegram-mode .dashboard-status>a{
  border-color:rgba(226,75,223,.52);
  background:#17141b;
  color:#f5d4f3;
}
.telegram-mode .dashboard-status strong i{background:var(--green);box-shadow:0 0 10px rgba(53,222,118,.8)}
.telegram-mode .dashboard-status.is-off strong i{background:#8e8791;box-shadow:none}
.telegram-mode .dashboard-metrics article,.telegram-mode .dashboard-connections>a{
  border-color:rgba(226,75,223,.38);
  background:#18171e;
  color:var(--ink);
  box-shadow:0 0 14px rgba(226,75,223,.09);
}
.telegram-mode .dashboard-metrics article>span,.telegram-mode .dashboard-connections>a{color:var(--ink)}
.telegram-mode .dashboard-metrics svg path,.telegram-mode .ring-track{stroke:#3a303e}
.telegram-mode .dashboard-metrics svg polyline,.telegram-mode .ring-value{
  stroke:#ee58e9;
  filter:drop-shadow(0 0 3px rgba(238,88,233,.6));
}
.telegram-mode .success-ring strong{color:#fff}
.telegram-mode .dashboard-attention{
  border-color:rgba(226,75,223,.42);
  background:#18171e;
  box-shadow:0 0 14px rgba(226,75,223,.09);
}
.telegram-mode .dashboard-attention>header{
  border-color:#3a303e;
  background:#17161d;
  color:var(--ink);
}
.telegram-mode .dashboard-attention>header>span{background:#9b671c;box-shadow:0 0 9px rgba(231,167,62,.35)}
.telegram-mode .dashboard-attention>header small{color:var(--muted)}
.telegram-mode .dashboard-attention>header>a{color:#e989e6}
.telegram-mode .dashboard-attention-list article{border-color:#322a35;background:transparent}
.telegram-mode .attention-avatar{background:#332239;color:#f1b4ee;box-shadow:0 0 8px rgba(226,75,223,.2)}
.telegram-mode .dashboard-attention-list small{color:#d2c6d5}
.telegram-mode .dashboard-attention-list em{color:#c796c6}
.telegram-mode .dashboard-attention-list article>a{
  border-color:rgba(226,75,223,.48);
  background:#1c1720;
  color:#f3c0f0;
}
.telegram-mode .dashboard-connection-logo{background:#20202a}
.telegram-mode .dashboard-connection-logo.ai-mark{background:#2a1730;color:#ef82ea}
.telegram-mode .connection-state{color:#b7abbc}
.telegram-mode .connection-state.ok:before{background:var(--green);box-shadow:0 0 8px rgba(53,222,118,.7)}

.telegram-mode .dialogs-layout{
  border-color:rgba(226,75,223,.3);
  background:#141319;
  box-shadow:0 10px 34px rgba(0,0,0,.28);
}
.telegram-mode .thread-panel,.telegram-mode .thread-tools,.telegram-mode .thread-filter-panel{
  border-color:#332a36;
  background:#111016;
}
.telegram-mode .thread-item{color:var(--ink)}
.telegram-mode .thread-item:hover{background:#201822}
.telegram-mode .thread-item.selected{
  border-color:rgba(226,75,223,.55);
  background:#26192a;
  box-shadow:0 0 12px rgba(226,75,223,.13);
}
.telegram-mode .thread-avatar,.telegram-mode .conversation-avatar{
  background:linear-gradient(145deg,#432148,#24182a);
  color:#f3a7ef;
}
.telegram-mode .thread-copy small,.telegram-mode .conversation-head p{color:var(--muted)}
.telegram-mode .conversation-panel,.telegram-mode .message-history{
  background-color:#100f15;
  background-image:radial-gradient(rgba(226,75,223,.08) .7px,transparent .7px);
}
.telegram-mode .conversation-head,.telegram-mode .reply-box{
  border-color:#332a36;
  background:#17161d;
  color:var(--ink);
}
.telegram-mode .message-bubble{
  border-color:#3d3341;
  background:#1d1c23;
  color:#f2ebf4;
  box-shadow:0 3px 12px rgba(0,0,0,.22);
}
.telegram-mode .message-row.assistant .message-bubble{background:#2d1930;color:#fff}
.telegram-mode .message-bubble time{color:#9d92a2}
.telegram-mode .message-bubble.needs-attention{border-color:#d29334;box-shadow:0 0 0 2px rgba(210,147,52,.14)}
.telegram-mode .message-attention-label{background:#352715;color:#f0bc67}
.telegram-mode .selected-reply-target{border-color:#e24bdf;background:#29172d;color:#e8dce9}
.telegram-mode .approval-card,.telegram-mode .warning-box{border-color:#413346;background:#19171e}

.telegram-mode .status-tabs a{color:#b7abbc!important}
.telegram-mode .status-tabs a.active{background:#321b36!important;color:#f58af0!important}
.telegram-mode .unread-dot{background:#ef5eea;box-shadow:0 0 0 2px #39203d}
.telegram-mode .switch-input{border-color:#655a69;background:#4d4751}
.telegram-mode .switch-input:checked{border-color:#35c970;background:#2aa85c}
.telegram-mode .switch-input:focus-visible{outline-color:rgba(226,75,223,.35)}

.telegram-mode .balance-alert,.telegram-mode .notice{
  border-color:#6f5222;
  background:#2a2216;
  color:#ead7b7;
}
.telegram-mode .success{border-color:#2d7249;background:#14271c;color:#b9e8c9}
.telegram-mode .status-approved,.telegram-mode .status-delivered{background:#14301f;color:#75e69e}
.telegram-mode .status-candidate,.telegram-mode .status-ready{background:#332816;color:#e8bd6b}
.telegram-mode .status-disabled{background:#2a272d;color:#aca3b0}

.telegram-mode .app-header,.telegram-mode .bottom-nav{
  border-color:#352b39;
  background:rgba(13,12,18,.96);
  color:var(--ink);
  box-shadow:0 -5px 18px rgba(0,0,0,.28);
}
.telegram-mode .bottom-nav a{color:#a99ead}
.telegram-mode .bottom-nav a.active{color:#f16bed}
.telegram-mode .bottom-nav a.active span{background:#2c1830}
.telegram-mode .auth-page fieldset{background:#18171e}

/* Legacy surfaces and interaction states must stay readable in the dark theme. */
.telegram-mode .manager-section,
.telegram-mode .product-create,
.telegram-mode .model-card,
.telegram-mode .setup-guide,
.telegram-mode .ai-status>div,
.telegram-mode .filters,
.telegram-mode .new-editor,
.telegram-mode .empty-state,
.telegram-mode .dashboard-card,
.telegram-mode .quick-actions a,
.telegram-mode .recent-item,
.telegram-mode dialog{
  border-color:var(--line);
  background:#18171e;
  color:var(--ink);
  box-shadow:0 8px 24px rgba(0,0,0,.18);
}
.telegram-mode .manager-section-head{border-color:#352b39}
.telegram-mode .manager-section-head p,
.telegram-mode .manager-fields small,
.telegram-mode .install-help-copy{color:var(--muted)}
.telegram-mode .manager-section:hover,
.telegram-mode .feature-card:hover,
.telegram-mode .connection-card:hover,
.telegram-mode .dashboard-connections>a:hover,
.telegram-mode .model-card:hover,
.telegram-mode .product-card:hover{
  border-color:rgba(239,92,234,.62);
  background:#201922;
  color:var(--ink);
  box-shadow:0 0 14px rgba(226,75,223,.12);
}
.telegram-mode .model-card:has(input:checked){
  border-color:var(--blue);
  background:#2b1930;
  box-shadow:0 0 0 2px rgba(226,75,223,.16);
}
.telegram-mode .model-card em{color:#f188ed}
.telegram-mode .capabilities i{background:#2c1a31;color:#edb2ea}

.telegram-mode .faq-sheet-scroll{background:#141319}
.telegram-mode .faq-grid th,.telegram-mode .faq-grid td{border-color:#382f3c}
.telegram-mode .faq-grid thead th{background:#211824;color:#e9c5e7}
.telegram-mode .faq-grid .faq-row-number{background:#1c1921;color:#a99eae}
.telegram-mode .faq-grid td{background:#17161d}
.telegram-mode .faq-grid textarea{background:transparent;color:var(--ink)}
.telegram-mode .faq-grid textarea:hover{background:#221a24;color:#fff}
.telegram-mode .faq-grid textarea:focus{
  background:#241b27;
  color:#fff;
  outline-color:var(--blue);
}
.telegram-mode .faq-remove-row{background:transparent;color:#a89dac;box-shadow:none}
.telegram-mode .faq-remove-row:hover,.telegram-mode .faq-remove-row:focus{background:#351b24;color:#ff8997}

.telegram-mode .product-create>summary{color:#f0c8ee}
.telegram-mode .product-photo{background:#222029}
.telegram-mode .photo-delete{border-color:#71404a;background:#2d171d;color:#ff9aa5;box-shadow:none}
.telegram-mode input[type="file"]::file-selector-button{
  margin-right:10px;
  border:1px solid #65536a;
  border-radius:6px;
  padding:6px 10px;
  background:#2a222d;
  color:#f0e7f2;
}
.telegram-mode .answer-search a{color:#f08ced}
.telegram-mode .mobile-menu nav{border-color:var(--line);background:#18171e;box-shadow:0 14px 34px rgba(0,0,0,.42)}
.telegram-mode .mobile-menu nav a{color:var(--ink)}
.telegram-mode .mobile-menu nav a:hover{background:#281a2c;color:#fff}
.telegram-mode dialog{color:var(--ink)}
.telegram-mode dialog::backdrop{background:rgba(4,3,7,.78)}

.telegram-mode select option{background:#15131a;color:#fff}
.telegram-mode a:focus-visible,.telegram-mode button:focus-visible,
.telegram-mode summary:focus-visible{
  outline:2px solid #ef64ea;
  outline-offset:2px;
}

@media(max-width:760px){
  body.telegram-mode{background:var(--canvas)}
  .telegram-mode .app-header{box-shadow:0 5px 18px rgba(0,0,0,.22)}
  .telegram-mode .app-header .brand{gap:9px}
  .telegram-mode .app-header .brand img{width:36px;height:36px;flex:0 0 36px}
  .telegram-mode .app-header .brand strong{font-size:15px;line-height:1.15}
  .telegram-mode .app-header .brand strong span{margin-top:2px;font-size:11px}
  .telegram-mode .bottom-nav{
    min-height:calc(66px + env(safe-area-inset-bottom));
    padding:5px 2px max(5px,env(safe-area-inset-bottom));
  }
  .telegram-mode .bottom-nav a{min-width:0;gap:3px;padding:2px 1px}
  .telegram-mode .bottom-nav .nav-icon{width:21px;height:21px}
  .telegram-mode .bottom-nav a>span{max-width:100%;overflow:hidden;font-size:9.5px;text-overflow:ellipsis}
  .telegram-mode .manager-savebar{
    border-top:1px solid var(--line);
    background:rgba(14,13,19,.96);
    backdrop-filter:blur(12px);
  }
  .telegram-mode .orders-table tr{border-color:var(--line);background:#18171e}
  .telegram-mode .conversation-panel{background:#100f15}
  .telegram-mode .dialogs-page.mobile-conversation .message-composer{
    border-top:1px solid #332a36;
    background:#100f15;
    box-shadow:0 -4px 16px rgba(0,0,0,.34);
  }
  .telegram-mode .dialogs-page.mobile-conversation .message-composer .composer-actions button{
    display:grid;
    place-items:center;
    width:48px;
    min-width:48px;
    max-width:48px;
    height:48px;
    min-height:48px;
    max-height:48px;
    padding:0;
    border-radius:50%;
    color:#fff;
    font-size:0;
    line-height:1;
    aspect-ratio:1;
  }
  .telegram-mode .dialogs-page.mobile-conversation .message-composer .composer-actions button:after{
    content:"➤";
    color:#fff;
    font-size:24px;
    line-height:1;
    transform:translateX(1px);
  }
  .telegram-mode .faq-sheet-scroll{background:#141319}
}
@media(max-width:360px){
  .telegram-mode .bottom-nav a>span{font-size:8.5px}
  .telegram-mode .app-header .brand strong{font-size:14px}
}
.staff-mobile-entry{display:none}
@media(max-width:760px){.telegram-mode .staff-mobile-entry{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;padding:8px;border:1px solid #62406d;border-radius:9px;color:#e7c3ed;text-decoration:none;font-size:12px;min-height:40px}.telegram-mode .app-header{gap:6px}}

/* Responsive geometry: shrink content, not the entire UI or its text. */
.telegram-mode main{min-width:0}
.telegram-mode main :is(section,article,fieldset,form,details,label){min-width:0}
.telegram-mode :is(.page-head,.compact-head,.card-summary,.section-heading){flex-wrap:wrap;min-width:0}
.telegram-mode :is(.page-head,.compact-head,.card-summary,.section-heading)>*{min-width:0;max-width:100%}
.telegram-mode :is(h1,h2,h3,legend,label,summary,.notice,.message-text,.message-bubble){overflow-wrap:anywhere}
.telegram-mode :is(input,textarea,select){max-width:100%}
.telegram-mode :is(button,.button-link){white-space:normal;overflow-wrap:anywhere}
.telegram-mode :is(.field-grid,.manager-form-grid,.manager-fields,.product-fields,.model-grid,.stats-grid)>*{min-width:0}
.telegram-mode :is(.table-wrap,.orders-table-wrap,.faq-sheet,.faq-sheet-scroll){max-width:100%;min-width:0;overscroll-behavior-x:contain}
.telegram-mode .message-bubble{min-width:0;word-break:normal}
.telegram-mode .message-bubble :is(p,div,a,span){overflow-wrap:anywhere;min-width:0}
.telegram-mode .message-bubble pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}
.telegram-mode .dialogs-page .conversation-panel{display:flex;flex-direction:column;min-width:0;min-height:0}
.telegram-mode .dialogs-page .conversation-head{flex-shrink:0;max-height:30dvh;overflow-y:auto;min-width:0}
.telegram-mode .dialogs-page .message-history{flex:1;min-height:0;overflow-y:auto}
.telegram-mode .dialogs-page .message-composer{flex-shrink:0}
.telegram-mode .dialogs-page .reply-box{position:static;bottom:auto;min-width:0;max-width:100%}
.telegram-mode :is(.approval-card,.unknown-send-box){flex:0 0 auto;min-width:0;max-height:28dvh;overflow:auto}
.telegram-mode .unknown-reply-preview{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;max-height:14dvh;overflow:auto}
.telegram-mode .unknown-reply-preview,.telegram-mode .approval-reply{background:#110f17;color:#efe8f2;border:1px solid #413346}
.telegram-mode .unknown-send-box>p,.telegram-mode .unknown-send-box>small{color:#d6bfdc}
.telegram-mode .unknown-send-actions{flex-wrap:wrap}
.telegram-mode .unknown-send-actions button{min-width:0;max-width:100%}
.telegram-mode .settings-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 20px}
.telegram-mode .settings-shortcuts>a{position:relative;display:grid;align-content:center;gap:5px;min-width:0;min-height:86px;padding:16px 36px 16px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);text-decoration:none}
.telegram-mode .settings-shortcuts>a:hover{border-color:#c34fce;background:#221a28}
.telegram-mode .settings-shortcuts>a:focus-visible{outline:2px solid #ef72e9;outline-offset:2px}
.telegram-mode .settings-shortcuts small{overflow-wrap:anywhere}
.telegram-mode .settings-shortcuts>a>span{position:absolute;right:16px;top:50%;transform:translateY(-50%);color:#ed85e9;font-size:22px}
.telegram-mode .settings-breadcrumb{margin:0 0 14px;font-size:13px}
.telegram-mode .settings-breadcrumb a{text-decoration:none;padding:6px 0;display:inline-block}
@media(max-width:760px){
 .telegram-mode .bottom-nav{gap:0}
 .telegram-mode .settings-shortcuts{grid-template-columns:minmax(0,1fr);gap:8px;margin-bottom:16px}
 .telegram-mode .settings-shortcuts>a{min-height:76px;padding:12px 32px 12px 12px}
 .telegram-mode .bottom-nav:has(>a:nth-child(5):last-child){grid-template-columns:repeat(5,minmax(0,1fr))}
 .telegram-mode .bottom-nav:has(>a:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
}
.telegram-mode dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain}
@media(min-width:761px){
 .telegram-mode{--sidebar-width:218px}
 .telegram-mode .desktop-sidebar{width:var(--sidebar-width);height:100dvh;min-height:0;overflow-y:auto;overscroll-behavior:contain}
 .telegram-mode .desktop-sidebar nav{flex:0 0 auto;align-content:start}
 .telegram-mode .side-brand,.telegram-mode .side-logout{flex-shrink:0}
 .telegram-mode .desktop-sidebar~main{width:calc(100% - var(--sidebar-width));max-width:none;margin-left:var(--sidebar-width);margin-right:0;padding-inline:clamp(16px,2vw,36px)}
 .telegram-mode .business-rule-row,.telegram-mode .manager-item{grid-template-columns:minmax(0,1fr) minmax(0,2fr) 90px auto}
 .telegram-mode .business-rule-new,.telegram-mode .manager-item-new{grid-template-columns:minmax(0,1fr) minmax(0,2fr) auto}
 .telegram-mode .orders-toolbar{grid-template-columns:minmax(0,1fr) minmax(130px,200px) auto auto}
 .telegram-mode:has(.dialogs-page) main{display:flex;flex-direction:column;height:100dvh;min-height:0}
 .telegram-mode .dialogs-page{display:flex;flex-direction:column;flex:1;min-height:0;width:100%}
 .telegram-mode .dialogs-title{flex-shrink:0}
 .telegram-mode .dialogs-layout{flex:1;min-height:0;height:auto;overflow:hidden}
 .telegram-mode .dialogs-layout .conversation-panel{min-height:0;overflow:hidden}
 .telegram-mode .dialogs-layout .thread-panel{min-height:0;max-height:none;overflow:hidden}
 .telegram-mode .dialogs-layout :is(.message-history,.thread-list){min-height:0;overflow-y:auto}
 .telegram-mode .dialogs-layout .message-history{flex:1}
 .telegram-mode .dialogs-layout :is(.conversation-head,.message-composer,.thread-tools){flex-shrink:0}
}
@media(min-width:761px) and (max-width:1100px){
 .telegram-mode{--sidebar-width:190px}
 .telegram-mode .model-grid,.telegram-mode .product-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 .telegram-mode .business-rule-row,.telegram-mode .business-rule-new,.telegram-mode .manager-item,.telegram-mode .manager-item-new{grid-template-columns:minmax(0,1fr)}
 .telegram-mode .faq-sheet-toolbar{grid-template-columns:minmax(0,1fr) auto}
 .telegram-mode .faq-sheet-title,.telegram-mode .faq-sheet-search{grid-column:1/-1}
 .telegram-mode .orders-toolbar{grid-template-columns:minmax(0,1fr) auto auto}
 .telegram-mode .orders-toolbar input{grid-column:1/-1}
 .telegram-mode .dialogs-layout{grid-template-columns:220px minmax(0,1fr)}
 .telegram-mode .approval-form{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:760px){
 .telegram-mode .app-header{flex-wrap:wrap;align-items:center}
 .telegram-mode .app-header .brand{min-width:0;flex:1 1 150px}
 .telegram-mode .app-header #install-app{flex:0 1 auto;width:auto;max-width:100%}
 .telegram-mode .app-header .staff-mobile-entry{max-width:100%}
 .telegram-mode .page-head{gap:10px}
 .telegram-mode .page-head>div{width:100%}
 .telegram-mode :is(.manager-save,.hero-action){min-width:0;max-width:100%}
 .telegram-mode :is(.field-grid,.product-fields,.business-rule-row,.business-rule-new){grid-template-columns:minmax(0,1fr)}
 .telegram-mode :is(input[type=date],input[type=datetime-local]){width:100%;min-width:0;min-inline-size:0}
 .telegram-mode :is(.actions,.setup-save-actions){display:flex;flex-wrap:wrap}
 .telegram-mode .actions>*{max-width:100%}
 .telegram-mode .bottom-nav:has(>a:only-child){grid-template-columns:minmax(0,1fr)}
 .telegram-mode .dashboard-attention>header{flex-direction:row;flex-wrap:wrap}
 .telegram-mode .dashboard-attention>header>div{min-width:0}
}

/* Compact, unified settings hub. Native details work without JavaScript. */
.telegram-mode .settings-hub{display:grid;gap:12px;max-width:1120px;width:100%;min-width:0}
.telegram-mode .settings-category{margin:0;padding:0;min-width:0;border:1px solid #413346;border-radius:14px;background:var(--surface);overflow:hidden}
.telegram-mode .settings-category>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:76px;padding:16px 20px;list-style:none;cursor:pointer}
.telegram-mode .settings-category>summary::-webkit-details-marker{display:none}
.telegram-mode .settings-category>summary>span{min-width:0}
.telegram-mode .settings-category>summary strong{display:block;font-size:16px;line-height:1.4;font-weight:700}
.telegram-mode .settings-category>summary small{display:block;margin-top:3px;color:var(--muted);font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.telegram-mode .settings-category>summary>b{color:#d68bdc;font-size:20px;transition:transform .15s;flex-shrink:0}
.telegram-mode .settings-category[open]>summary>b{transform:rotate(180deg)}
.telegram-mode .settings-category[open]>summary{border-bottom:1px solid #413346}
.telegram-mode .settings-category-body{padding:0 12px}
.telegram-mode .settings-hub .settings-group{margin:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.telegram-mode .settings-hub .settings-row,.telegram-mode .settings-hub .settings-group>summary,.telegram-mode .settings-hub .settings-status-summary{box-sizing:border-box;display:flex;align-items:center;gap:12px;width:100%;min-width:0;min-height:68px;padding:12px 8px;margin:0;border:0;border-radius:0;color:var(--ink);text-decoration:none;background:transparent}
.telegram-mode .settings-category-body>:not(:last-child){border-bottom:1px solid #302735}
.telegram-mode .settings-hub .settings-symbol{display:grid;place-items:center;width:32px;height:32px;min-width:32px;border-radius:9px;background:#2c2033;color:#e38be5;font-size:16px;font-style:normal;font-weight:600}
.telegram-mode .settings-hub .settings-symbol img{width:24px;height:24px;object-fit:contain}
.telegram-mode .settings-row-copy,.telegram-mode .settings-hub .settings-status-summary>span:nth-child(2){flex:1;min-width:0}
.telegram-mode .settings-hub .settings-row strong,.telegram-mode .settings-hub .settings-group>summary strong,.telegram-mode .settings-hub .settings-status-summary strong{display:block;font-size:14px;font-weight:650;line-height:1.4}
.telegram-mode .settings-hub .settings-row small,.telegram-mode .settings-hub .settings-group>summary small,.telegram-mode .settings-hub .settings-status-summary small{display:block;margin-top:3px;font-size:12px;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}
.telegram-mode .settings-hub .settings-row>b,.telegram-mode .settings-hub .settings-group>summary>b{font-size:20px;font-weight:400;color:#ae8fb5;margin-left:auto}
.telegram-mode .settings-hub .settings-content{padding:8px 8px 18px;border-top:1px solid #302735}
.telegram-mode .settings-hub .settings-row:hover,.telegram-mode .settings-hub .settings-group>summary:hover{background:#211b28}
.telegram-mode .settings-hub :is(a,summary):focus-visible{outline:2px solid #ee86ec;outline-offset:-3px;border-radius:8px}
@media(max-width:760px){
 .telegram-mode .settings-hub{gap:10px}
 .telegram-mode .settings-category>summary{padding:14px;min-height:72px}
 .telegram-mode .settings-category>summary strong{font-size:16px}
 .telegram-mode .settings-category>summary small{font-size:12px}
 .telegram-mode .settings-category-body{padding:0 8px}
 .telegram-mode .settings-hub .settings-row,.telegram-mode .settings-hub .settings-group>summary,.telegram-mode .settings-hub .settings-status-summary{gap:10px;padding:12px 6px;min-height:68px}
}

/* Guided setup: a single ordered workspace, not five unrelated settings pages. */
.telegram-mode .agent-wizard{width:100%;max-width:1120px;min-width:0}
.telegram-mode .setup-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:18px 0 22px}
.telegram-mode .setup-steps a{display:flex;align-items:center;gap:8px;min-width:0;min-height:54px;padding:10px;border:1px solid #413346;border-radius:10px;color:var(--muted);text-decoration:none;font-size:13px;overflow-wrap:anywhere}
.telegram-mode .setup-steps a>span{display:grid;place-items:center;flex-shrink:0;width:24px;height:24px;border-radius:7px;background:#2c2033;color:#dfb9e3}
.telegram-mode .setup-steps a[aria-current=step]{color:var(--ink);border-color:#ce58d1;background:#2a1b30}
.telegram-mode .setup-steps a[aria-current=step]>span{background:#c742cf;color:#fff}
.telegram-mode .setup-step-head{margin-bottom:16px}
.telegram-mode .setup-step-head small{color:#d896df;font-size:12px}
.telegram-mode .setup-step-head h2{margin:5px 0;font-size:22px}
.telegram-mode .agent-wizard .manager-section-head>span{display:none}
.telegram-mode .agent-wizard .manager-section{margin:14px 0;padding:20px;border-color:#413346}
.telegram-mode .agent-wizard .manager-fields{min-width:0}
.telegram-mode .agent-wizard :is(.setup-extra,.setup-faq-list,.setup-faq-item){min-width:0;margin:14px 0;padding:0;border:1px solid #413346;border-radius:12px;background:var(--surface)}
.telegram-mode .agent-wizard :is(.setup-extra,.setup-faq-list,.setup-faq-item)>summary{padding:14px;min-height:48px;cursor:pointer;overflow-wrap:anywhere}
.telegram-mode .agent-wizard :is(.setup-extra,.setup-faq-list,.setup-faq-item)>:not(summary){margin:12px}
.telegram-mode .agent-wizard .setup-faq-item{margin:12px}
.telegram-mode .setup-faq-search,.telegram-mode .setup-pagination,.telegram-mode .setup-bottom-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.telegram-mode .setup-faq-search input{flex:1;min-width:0;width:auto}
.telegram-mode .setup-pagination,.telegram-mode .setup-bottom-actions{justify-content:space-between}
.telegram-mode .setup-bottom-actions{border-top:1px solid #413346;margin-top:24px;padding-top:18px}
.telegram-mode .setup-mode .settings-group{max-width:none}
.telegram-mode .setup-mode .settings-group>summary{display:none}
.telegram-mode .setup-mode .settings-content{border:0;padding:18px}
.telegram-mode .settings-hub .setup-entry{padding:18px;min-height:88px}
.telegram-mode .agent-wizard a:focus-visible,.telegram-mode .agent-wizard summary:focus-visible{outline:2px solid #ee86ec;outline-offset:2px}
@media(max-width:1000px){
 .telegram-mode .setup-steps{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
 .telegram-mode .setup-steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:14px 0}
 .telegram-mode .setup-steps a{min-height:48px;padding:8px;font-size:12px}
 .telegram-mode .agent-wizard .manager-section{padding:14px}
 .telegram-mode .setup-step-head h2{font-size:20px}
 .telegram-mode .setup-bottom-actions>*{max-width:100%;white-space:normal}
}

/* Keep legacy desktop-only form rules consistent inside the mobile setup. */
.telegram-mode .agent-wizard .setup-step-head{display:block;padding:0;background:transparent;color:var(--ink)}
.telegram-mode .agent-wizard .manager-section{background:var(--surface);border:1px solid #413346;border-radius:12px}
.telegram-mode .agent-wizard .manager-section-head{display:flex;gap:12px;padding-bottom:12px;margin-bottom:14px;border-bottom:1px solid #302735}
.telegram-mode .agent-wizard .manager-section-head h2{margin:0;font-size:18px}
.telegram-mode .agent-wizard .manager-section-head p{margin:4px 0 0;color:var(--muted);font-size:13px}
.telegram-mode .agent-wizard .manager-fields{display:grid;gap:14px}
.telegram-mode .agent-wizard .manager-check{display:flex!important;flex-direction:row!important;align-items:center!important;gap:10px!important;min-height:44px;margin:0!important;color:var(--ink)}
.telegram-mode .agent-wizard .manager-check input[type=checkbox]{flex:0 0 20px;width:20px;min-width:20px;height:20px;min-height:20px;max-height:20px;margin:0;padding:0;accent-color:#dc4cdf}
.telegram-mode .agent-wizard .manager-order-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 14px;padding:12px;border:1px solid #413346;border-radius:10px;background:#110f17}
@media(max-width:760px){
 .telegram-mode .agent-wizard .manager-fields,.telegram-mode .agent-wizard .manager-order-fields{grid-template-columns:minmax(0,1fr)}
}
