/* JustFun Desktop Platform 7.8.3 */
:root{--jf-deep:#082c23;--jf-green:#10945c;--jf-gold:#d5aa54;--jf-soft:#edf8f3;--jf-danger:#b72b38}
#jfLogPath{word-break:break-all;font-family:Consolas,"Courier New",monospace;font-size:12px}
html,body{min-width:0!important}body{background:#eef5f1!important}.topbar{position:relative!important}.nav{display:grid!important;grid-template-columns:minmax(300px,1fr) auto!important;align-items:center!important;gap:18px!important}.company-brand{min-width:0!important}.brand-copy{min-width:0!important}.brand-title,.brand-sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jf-default-brand .logo{background:transparent url('../justfun-official.png') center/contain no-repeat!important;border:1px solid rgba(225,181,77,.75)!important}.jf-desktop-strip{position:sticky;top:0;z-index:1100;display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:38px;padding:7px 22px;background:linear-gradient(90deg,#082c23,#0c5a43);color:#fff;box-shadow:0 4px 18px rgba(5,36,28,.18);font-size:13px}.jf-desktop-strip strong{font-size:14px}.jf-edition{display:inline-flex;align-items:center;gap:7px;padding:5px 11px;border-radius:999px;background:rgba(255,255,255,.13)}.jf-edition.demo{background:#6f4d0a;color:#ffe8ad}.jf-userbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.jf-userbar button{border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.1);color:#fff;border-radius:10px;padding:6px 10px;font-weight:700;cursor:pointer}
html:not(.jf-authenticated) body>:not(#jfAuthRoot){visibility:hidden!important}#jfAuthRoot{position:fixed;inset:0;z-index:999999;background:linear-gradient(135deg,#061b16 0 38%,#edf7f2 38% 100%);display:grid;place-items:center;padding:28px;font-family:"Segoe UI",Arial,sans-serif;color:#082c23}html.jf-authenticated #jfAuthRoot{display:none}.jf-auth-card{width:min(100%,1040px);min-height:630px;background:#fff;border:1px solid #d8b867;border-radius:32px;box-shadow:0 36px 100px rgba(0,0,0,.35);display:grid;grid-template-columns:340px 1fr;overflow:hidden}.jf-auth-brand{padding:36px 34px;background:linear-gradient(160deg,#071d17,#0b4937);color:#fff;display:flex;flex-direction:column;justify-content:space-between}.jf-auth-logo{width:190px;height:190px;margin:0 auto;border-radius:50%;background:transparent url('../justfun-official.png') center/contain no-repeat;border:1px solid rgba(221,180,91,.72);box-shadow:0 18px 48px rgba(0,0,0,.3)}.jf-auth-brand h1{font-size:34px;margin:20px 0 8px}.jf-auth-brand p{color:#b7d1c6;line-height:1.55}.jf-auth-meta{font-size:13px;line-height:1.65;color:#b9d2c8}.jf-auth-meta b{color:#f0ca72}.jf-auth-main{padding:48px 54px;display:flex;flex-direction:column;justify-content:center}.jf-auth-main h2{font-size:32px;margin:0 0 8px}.jf-auth-main>.muted{margin-bottom:28px}.jf-auth-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.jf-auth-field{display:flex;flex-direction:column;gap:7px}.jf-auth-field.span-2{grid-column:1/-1}.jf-auth-field label{font-weight:750}.jf-auth-field input,.jf-auth-field select{height:50px;border:1px solid #c6d9d0;border-radius:14px;padding:0 15px;font:16px "Segoe UI";outline:none}.jf-auth-field input:focus,.jf-auth-field select:focus{border-color:var(--jf-gold);box-shadow:0 0 0 4px rgba(213,170,84,.16)}.jf-auth-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}.jf-auth-button{min-height:48px;border:0;border-radius:14px;padding:0 24px;font-weight:800;font-size:16px;cursor:pointer;background:linear-gradient(135deg,#0d684d,#0a4b39);color:#fff;box-shadow:0 8px 18px rgba(8,67,50,.18)}.jf-auth-button.secondary{background:#f3ead5;color:#654d14}.jf-auth-status{min-height:24px;margin-top:15px;color:#6d8078}.jf-auth-status.error{color:var(--jf-danger)}
.jf-no-access{padding:30px;border:1px solid #e6c470;background:#fff7e4;border-radius:20px}.jf-role-hidden{display:none!important}.jf-readonly [data-jf-write],.jf-readonly .orders-delete-all{display:none!important}.jf-profile-modal,.jf-help-modal,.jf-dialog-overlay{position:fixed;inset:0;z-index:900000;background:rgba(3,25,19,.64);display:none;place-items:center;padding:24px}.jf-profile-modal.open,.jf-help-modal.open,.jf-dialog-overlay.open{display:grid}.jf-dialog{width:min(100%,700px);max-height:88vh;overflow:auto;background:#fff;border-radius:25px;border:1px solid #d7ba72;box-shadow:0 30px 90px rgba(0,0,0,.35);padding:28px}.jf-dialog h2{margin:0 0 8px}.jf-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.jf-toast-stack{position:fixed;right:24px;bottom:24px;z-index:910000;display:flex;flex-direction:column;gap:10px;max-width:440px}.jf-toast{background:#fff;border-left:5px solid var(--jf-green);border-radius:14px;padding:14px 17px;box-shadow:0 14px 45px rgba(0,0,0,.2);animation:jfIn .18s ease}.jf-toast.error{border-left-color:var(--jf-danger)}@keyframes jfIn{from{transform:translateY(10px);opacity:0}}
.jf-users-panel{margin-top:14px}.jf-users-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.jf-user-list{display:grid;gap:10px;margin-top:14px}.jf-user-row{display:grid;grid-template-columns:minmax(180px,1.4fr) minmax(120px,.7fr) minmax(160px,1fr) auto;gap:12px;align-items:center;padding:14px;border:1px solid #d8e7df;border-radius:16px;background:#fbfdfc}.jf-user-row small{display:block;color:#71857c}.jf-user-row .danger{color:#a82934}.jf-instruction-btn{margin-left:auto!important;background:#eff8f4!important;color:#0b7650!important;border:1px solid #cde5d9!important}.jf-settings-help{margin-top:10px;padding:10px 12px;background:#f3f9f6;border-radius:12px;color:#5c756a;font-size:13px}.settings-box{position:relative}.settings-box>.jf-instruction-btn{position:absolute;right:16px;top:14px}.settings-box>h3{padding-right:130px}
.jf-integration-lead{margin:0 0 14px;color:#5a7066;font-size:13px;line-height:1.5}.jf-integration-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.jf-integration-card{border:1px solid #d3e4dc;border-radius:17px;background:#fff;padding:15px;display:grid;gap:13px}.jf-integration-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.jf-integration-head b{display:block;font-size:16px;color:#17372a}.jf-integration-head span{display:block;margin-top:3px;color:#6d7e76;font-size:11px}.jf-integration-head i{font-style:normal;white-space:nowrap;border-radius:999px;padding:6px 9px;background:#eef3f0;color:#60736a;font-size:10px;font-weight:900}.jf-integration-head i.ready{background:#e5f7ed;color:#087547}.jf-integration-head i.error{background:#fff0f0;color:#ae2e38}.jf-reg-fields{grid-template-columns:1.25fr .8fr .55fr!important}.jf-integration-note{padding:10px 12px;border-radius:12px;background:#f3f8f5;color:#536b60;font-size:11px;line-height:1.5}.jf-integration-status{min-height:42px;padding:11px 12px;border:1px solid #dce8e2;border-radius:12px;background:#f9fcfa;color:#486056;font-size:12px;line-height:1.45}.jf-integration-status.ok{border-color:#bfe1cf;background:#effaf4;color:#087246}.jf-integration-status.error{border-color:#edc6c9;background:#fff5f5;color:#a52d36}.jf-link-result{padding:12px;border:1px solid #c8dfd3;border-radius:12px;background:#f1faf5;overflow-wrap:anywhere;font-size:12px}.jf-telegram-driver{border-color:#c7dfd3!important;background:linear-gradient(145deg,#f1faf5,#f8fbff)!important}.jf-telegram-driver-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.jf-telegram-driver-result{margin-top:10px;padding:10px;border-radius:11px;background:#fff;border:1px solid #d8e7df;overflow-wrap:anywhere;font-size:12px}.jf-integrations-box button[disabled]{opacity:.55;cursor:wait}
@media(max-width:1100px){.jf-integration-grid{grid-template-columns:1fr}.jf-reg-fields{grid-template-columns:1fr 1fr 1fr!important}}@media(max-width:720px){.jf-reg-fields{grid-template-columns:1fr!important}.jf-integration-head{flex-direction:column}.jf-integration-card .inline-actions{display:grid;grid-template-columns:1fr}.jf-integration-card .inline-actions button{width:100%}}
.jf-user-row.blocked{background:#fff8f8;border-color:#efd5d8}.jf-user-actions{display:flex;gap:7px;justify-content:flex-end;flex-wrap:wrap}.jf-user-actions button{white-space:nowrap}.jf-user-all{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;background:#edf8f3;margin-bottom:9px}.jf-warehouse-checks{display:flex;gap:8px 18px;flex-wrap:wrap}.jf-warehouse-checks label{display:inline-flex;align-items:center;gap:7px;font-weight:600}.jf-auth-field small{color:#687d74;margin-top:4px}
.jf-demo-lock #demoModeToggle,.jf-demo-lock #restartDemoButton,.jf-demo-lock #demoModeBanner button{pointer-events:none;opacity:.55}.jf-license-banner{display:flex;gap:8px;align-items:center}.jf-license-time{font-variant-numeric:tabular-nums}.warehouse-editor-box .field input::placeholder{color:#8aa097}.route-settings-start-locked{display:block!important}
@media(max-width:1100px){.nav{grid-template-columns:1fr!important}.nav .actions{justify-content:flex-start!important}.jf-auth-card{grid-template-columns:290px 1fr}.jf-auth-main{padding:36px}.jf-user-row{grid-template-columns:1fr 1fr}.jf-user-row>*:last-child{grid-column:1/-1}}@media(max-width:760px){#jfAuthRoot{padding:0;background:#fff}.jf-auth-card{min-height:100vh;border-radius:0;border:0;grid-template-columns:1fr}.jf-auth-brand{padding:24px}.jf-auth-logo{height:84px;background-size:70px}.jf-auth-brand h1{font-size:26px;margin:12px 0 4px}.jf-auth-brand p{display:none}.jf-auth-main{padding:28px 22px}.jf-auth-grid{grid-template-columns:1fr}.jf-auth-field.span-2{grid-column:auto}.jf-desktop-strip{align-items:flex-start;flex-direction:column}.jf-userbar{width:100%}.jf-user-row{grid-template-columns:1fr}.settings-box>.jf-instruction-btn{position:static;margin-bottom:10px!important}.settings-box>h3{padding-right:0}}

.jf-auth-choice-grid{display:grid;gap:14px;margin-top:24px}.jf-auth-choice{width:100%;text-align:left;border:1px solid #c7ddd3;background:#f5fbf8;border-radius:18px;padding:18px 20px;cursor:pointer;color:#082c23;display:flex;flex-direction:column;gap:5px;transition:.16s ease}.jf-auth-choice:hover{border-color:var(--jf-green);box-shadow:0 8px 24px rgba(16,148,92,.12);transform:translateY(-1px)}.jf-auth-choice b{font-size:18px}.jf-auth-choice span{color:#657d73;font-size:14px}.jf-auth-field>div:not(.jf-warehouse-checks){min-height:44px;padding:11px 13px;border-radius:12px;background:#f4f8f6;border:1px solid #d7e3dd}.jf-license-banner .jf-license-time{white-space:nowrap}

.jf-help-dialog{width:min(100%,920px)!important;padding:0!important;overflow:hidden!important}
.jf-help-dialog>.jf-dialog-actions{padding:18px 28px;margin:0;border-top:1px solid #e2ece7;background:#f8fbf9}
.jf-help-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:25px 28px 20px;background:linear-gradient(135deg,#073c2d,#0b6a4c);background-color:#073c2d;color:#fff}
.jf-help-head span{display:block;margin-bottom:5px;color:#c8eadc;font-size:12px;font-weight:850;letter-spacing:.08em;text-transform:uppercase}
.jf-help-head h2{margin:0!important;color:#fff!important;font-size:clamp(22px,3vw,30px);line-height:1.2}
.jf-help-x{min-width:42px;height:42px;padding:0!important;border-color:rgba(255,255,255,.35)!important;background:rgba(255,255,255,.12)!important;color:#fff!important;font-size:24px!important}
.jf-help-summary{margin:0;padding:20px 28px;border-bottom:1px solid #e1ebe6;background:#f1f8f4;color:#264a3b;font-size:16px;line-height:1.55}
.jf-help-section{margin:18px 28px;padding:17px 19px;border:1px solid #dbe8e1;border-radius:16px;background:#fff}
.jf-help-section h3{margin:0 0 10px;color:#153b2c;font-size:17px}
.jf-help-section ul,.jf-help-section ol{margin:0;padding-left:23px;display:grid;gap:8px}
.jf-help-section li{padding-left:4px;color:#365348;line-height:1.52}
.jf-help-section li::marker{color:#0a7652;font-weight:800}
.jf-help-section.check{border-color:#bfdfcf;background:#f0faf5}
.jf-help-section.warning{border-color:#ead39d;background:#fff9e9}
.jf-help-section.warning li::marker{color:#9a6811}
@media(max-width:720px){
  .jf-help-modal{padding:0!important}
  .jf-help-dialog{width:100%!important;max-height:100vh!important;border-radius:0!important}
  .jf-help-head,.jf-help-summary{padding-left:20px;padding-right:20px}
  .jf-help-section{margin-left:18px;margin-right:18px}
}

/* Telegram + Cloudflare 7.8.3: встроенный безопасный мастер без домена и старых CMD/PowerShell-сценариев */
.jf-telegram-progress{margin:12px 0 8px;padding:11px 12px;border:1px solid rgba(16,185,129,.24);border-radius:12px;background:rgba(5,46,34,.22)}
.jf-telegram-progress-head{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:var(--muted,#9eb7ae)}
.jf-telegram-progress-head b{color:#b7f7df;font-variant-numeric:tabular-nums}
.jf-telegram-progress-track{height:7px;margin-top:8px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.09)}
.jf-telegram-progress-track i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#20c98b,#58e2b0);transition:width .25s ease}
