*{box-sizing:border-box}dialog{border:none;padding:0;margin:0;max-width:none;max-height:none;width:auto;height:auto;background:transparent;color:inherit;overflow:visible}dialog::backdrop{display:none}:root{font-family:Segoe UI,Trebuchet MS,sans-serif;line-height:1.45;color:#132b3b}html,body,#root{margin:0;min-height:100%;background-color:#d2e4e9}input,textarea,select,button{font-size:16px}@media (max-width: 768px){input,textarea,select{font-size:16px!important}}.login-shell{min-height:100vh;min-height:100dvh;width:100%;box-sizing:border-box;display:grid;place-items:center;background:radial-gradient(circle at 20% 10%,rgba(245,199,107,.35),transparent 40%),radial-gradient(circle at 80% 80%,rgba(83,153,237,.28),transparent 35%),linear-gradient(135deg,#f4efe6,#dbeef5 50%,#f2e6db);padding:1.25rem}.login-card{width:min(420px,100%);box-sizing:border-box;background:#ffffffd6;border:1px solid rgba(18,43,63,.15);border-radius:1.2rem;box-shadow:0 20px 60px #112a442e;padding:2rem;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:fade-up .5s ease;display:flex;flex-direction:column;min-height:520px}.login-card h1{margin:0;font-size:2rem}.login-card p{color:#32526b}.login-form{margin-top:1rem;display:grid;gap:1rem}.login-built-by{margin-top:auto;text-align:right;font-size:.8rem;letter-spacing:.08em;color:#4e6f87}.login-built-by a{color:#0f766e;font-weight:800;text-decoration:none}.login-built-by a:hover{text-decoration:underline}.login-form label{display:grid;gap:.45rem;color:#12253a;font-weight:600}.login-form input,.send-box input{border:1px solid #87a7bf;border-radius:.8rem;padding:.75rem .9rem;font-size:1rem;outline:none}.login-form input:focus,.send-box input:focus{border-color:#2563eb;box-shadow:0 0 0 3px #2563eb26}button{border:none;border-radius:.8rem;padding:.7rem 1rem;background:#0f766e;color:#f8fffe;font-weight:700;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease}button:hover{transform:translateY(-1px);box-shadow:0 12px 22px #0f766e47}.chat-shell{min-height:100vh;min-height:100dvh;height:100vh;height:100dvh;display:grid;grid-template-columns:330px 1fr;background:#d2e4e9;align-items:stretch;overflow:hidden;padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}.chat-shell.settings-full{grid-template-columns:1fr;grid-template-rows:auto 1fr}.chat-shell.settings-full .contacts-panel{border-right:none;border-bottom:1px solid rgba(18,43,63,.15);min-height:0;overflow:visible;position:relative;z-index:80}.chat-shell.settings-full .contacts-header{position:relative;z-index:81}.contacts-panel{border-right:1px solid rgba(18,43,63,.15);background:linear-gradient(180deg,#e8f4f8,#d9eaef);display:flex;flex-direction:column;min-height:0;overflow:hidden}.contacts-header,.chat-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;border-bottom:1px solid rgba(18,43,63,.15)}.chat-title-group{display:flex;align-items:center;gap:.7rem;width:100%;min-width:0}.back-button{width:34px;height:34px;border-radius:999px;padding:0;display:grid;place-items:center;font-size:1rem;background:#145f76}.header-actions{display:flex;gap:.5rem;align-items:center}.tab-button{background:#145f76}.tab-button.active{background:#2563eb}.icon-button{width:36px;height:36px;border-radius:999px;padding:0;display:grid;place-items:center;background:#145f76;font-size:1.05rem;line-height:1}.icon-button svg{width:18px;height:18px;fill:currentColor}.menu-wrapper{position:relative}.menu-popover{position:absolute;right:0;top:calc(100% + .4rem);width:180px;background:#fffffff5;border:1px solid rgba(18,43,63,.18);border-radius:.7rem;box-shadow:0 14px 30px #122b3f33;padding:.35rem;z-index:20;display:grid;gap:.25rem}.menu-item{width:100%;text-align:left;border-radius:.55rem;background:#eef5f8;color:#16384f;box-shadow:none;transform:none;padding:.55rem .7rem;font-size:.95rem;line-height:1.25}.menu-item:hover{background:#dfeef5;box-shadow:none;transform:none}.menu-item.danger{background:#fde9e9;color:#8d1f1f}.menu-item.danger:hover{background:#f9dede}.icon-button.active{background:#2563eb}.contacts-header small,.chat-header small{display:block;color:#446078;font-size:.84rem}.contacts-list{flex:1;overflow-y:auto;padding:.55rem;display:grid;gap:.45rem;align-content:start;grid-auto-rows:max-content}.contacts-tools{padding:.55rem;display:grid;gap:.5rem;border-bottom:1px solid rgba(18,43,63,.1)}.contacts-search-input{border:1px solid #87a7bf;border-radius:.65rem;padding:.48rem .6rem;font-size:.88rem;background:#fff;color:#16384f}.contacts-search-input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.contacts-tag-filters{display:flex;gap:.35rem;overflow-x:auto;padding-bottom:.1rem}.contact-filter-chip{background:#eef5f8;color:#173b53;border:1px solid rgba(18,43,63,.16);border-radius:999px;padding:.25rem .55rem;font-size:.74rem;line-height:1.2;font-weight:700;white-space:nowrap;box-shadow:none;transform:none}.contact-filter-chip:hover{background:#e1eef4;box-shadow:none;transform:none}.contact-filter-chip.active{background:#145f76;border-color:#145f76;color:#fff}.register-user-box{padding:.8rem;display:grid;gap:.45rem}.register-user-box input{border:1px solid #87a7bf;border-radius:.6rem;padding:.5rem .65rem;font-size:.88rem}.register-user-box select{border:1px solid #87a7bf;border-radius:.6rem;padding:.5rem .65rem;font-size:.88rem;background:#fff}.register-user-box small{color:#31556f}.contact-item{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:.75rem;width:100%;text-align:left;background:#f8fcfd;color:#11324a;border:1px solid transparent;border-radius:.9rem;padding:.6rem;font-size:1rem}.contact-item time{font-size:.75rem;color:#5b7689}.contact-meta{display:grid;justify-items:end;align-content:center;gap:.3rem;min-width:2.4rem}.window-countdown{font-size:.68rem;color:#5a7a8f;font-weight:700}.window-expired{color:#c46a00;background:#c46a001a;border-radius:999px;padding:.1rem .4rem}.unread-badge{min-width:20px;height:20px;border-radius:999px;padding:0 .35rem;display:grid;place-items:center;background:#0a84ff;color:#fff;font-size:.72rem;font-weight:800}.contact-item.active{border-color:#0f766e;background:#def4ef}.contact-main{min-width:0}.contact-main strong,.contact-main small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.contact-main strong{font-size:.98rem;line-height:1.2}.contact-main small{color:#567086;font-size:.86rem;line-height:1.2;font-weight:400}.contact-tag-chip{margin-top:.22rem;display:inline-flex;align-items:center;color:#fff;border-radius:999px;padding:.1rem .48rem;font-size:.7rem;line-height:1.2;font-weight:700}.avatar{width:42px;aspect-ratio:1;border-radius:50%;display:grid;place-items:center;font-weight:700;color:#fff;background:linear-gradient(135deg,#0f766e,#2563eb)}.chat-panel{display:flex;flex-direction:column;position:relative;min-height:0;overflow:hidden;background:radial-gradient(circle at 20% 5%,rgba(255,255,255,.6),transparent 35%),linear-gradient(180deg,#e5eef5,#d2e4eb)}.chat-contact-tag{margin-top:.15rem}.chat-tag-select-wrap{margin-left:auto;flex-shrink:0}.chat-tag-select{border:1px solid #87a7bf;border-radius:.6rem;padding:.35rem .55rem;background:#fff;color:#16384f;font-size:.86rem;width:100%}.archive-contact-button{background:#b45309;color:#fff}.archive-contact-button:hover{box-shadow:0 10px 18px #b4530940}.block-contact-button{background:#b91c1c;color:#fff}.block-contact-button:hover{box-shadow:0 10px 18px #b91c1c40}.chat-options-popover{width:220px;gap:.45rem}.chat-options-label{font-size:.78rem;color:#446078;font-weight:700;padding:.1rem .1rem 0}.chat-menu-section-label{display:block;font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:#8aa5b8;padding:.55rem 0 .2rem;border-top:1px solid rgba(18,43,63,.1);margin-top:.3rem}.chat-menu-section-label:first-child{border-top:none;margin-top:0;padding-top:.1rem}.chat-bot-assign-row{display:grid;grid-template-columns:1fr auto;gap:.35rem;align-items:center}.settings-tabs{display:flex;gap:.45rem;padding:.8rem 1rem 0;flex-wrap:wrap}.settings-tab-button{background:#dceaf0;color:#16384f;border:1px solid rgba(18,43,63,.16);border-radius:999px;padding:.35rem .75rem;font-size:.82rem;box-shadow:none;transform:none}.settings-tab-button:hover{background:#d0e2ea;box-shadow:none;transform:none}.settings-tab-button.active{background:#145f76;border-color:#145f76;color:#fff}.settings-layout{flex:1;min-height:0;overflow-y:auto;padding:1rem;display:grid;grid-template-columns:1.2fr 1fr;gap:1rem;align-items:start}.users-card,.settings-card{background:#ffffffc2;border:1px solid rgba(18,43,63,.15);border-radius:1rem;padding:1rem;box-shadow:0 14px 35px #122b3f1f}.settings-span-all{grid-column:1 / -1}.contact-assigned-chip{display:inline-flex;align-items:center;margin-top:.22rem;border-radius:999px;padding:.1rem .48rem;font-size:.7rem;line-height:1.2;font-weight:700;background:#145f761f;color:#145f76;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.chat-assigned-label{display:block;color:#145f76;font-size:.78rem;font-weight:600;margin-top:.1rem}.settings-hint{font-size:.84rem;color:#4e6f87;line-height:1.45;margin:0 0 .85rem}.assignment-defaults-form{display:grid;gap:.75rem;max-width:480px}.assignment-defaults-form select{border:1px solid #87a7bf;border-radius:.6rem;padding:.5rem .65rem;font-size:.88rem;background:#fff}.users-card h3,.settings-card h3{margin:0 0 .8rem}.users-toolbar{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.8rem;padding:.65rem .75rem;border-radius:.8rem;border:1px solid rgba(18,43,63,.12);background:#ecf5f9e6}.users-toolbar-title{min-width:0}.users-toolbar-title h3{margin:0}.users-toolbar-title small{margin-top:.22rem;display:block;color:#4e6f87;font-size:.78rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.users-group-filter-chips{display:flex;gap:.35rem;flex-wrap:wrap;justify-content:flex-end}.user-group-chip{background:#eef5f8;color:#173b53;border:1px solid rgba(18,43,63,.16);border-radius:999px;padding:.25rem .55rem;font-size:.74rem;line-height:1.2;font-weight:700;white-space:nowrap;box-shadow:none;transform:none}.user-group-chip:hover{background:#e1eef4;box-shadow:none;transform:none}.user-group-chip.active{background:#145f76;border-color:#145f76;color:#fff}.users-list,.labels-list{display:grid;gap:.5rem;align-content:start;grid-auto-rows:max-content}.hidden-contacts-list{display:grid;gap:.55rem;align-content:start;grid-auto-rows:max-content}.hidden-contact-item{display:grid;grid-template-columns:42px 1fr auto;gap:.6rem;align-items:center;background:#f8fcfd;border:1px solid rgba(18,43,63,.12);border-radius:.8rem;padding:.55rem}.hidden-contact-main{min-width:0}.hidden-contact-main strong,.hidden-contact-main small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hidden-contact-main small{color:#567086}.hidden-contact-flags{margin-top:.25rem;display:flex;gap:.35rem;flex-wrap:wrap}.hidden-flag{font-size:.7rem;font-weight:700;border-radius:999px;padding:.1rem .45rem;background:#f7e1be;color:#854d0e}.hidden-flag.blocked{background:#fee2e2;color:#991b1b}.hidden-contact-actions{display:grid;gap:.35rem;justify-items:end}.secondary-action-button{background:#145f76;font-size:.76rem;padding:.35rem .55rem;border-radius:.5rem}.entity-actions{display:grid;gap:.32rem;justify-items:end}.mini-action-button{background:#145f76;font-size:.72rem;padding:.28rem .52rem;border-radius:.45rem;color:#f8fffe;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;line-height:1}.mini-action-button:hover{color:#f8fffe;transform:translateY(-1px);box-shadow:0 10px 20px #145f7647}.mini-action-button:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}.mini-action-button.danger{background:#b91c1c}.edit-form-actions{display:flex;gap:.45rem;flex-wrap:wrap}.label-item{display:grid;grid-template-columns:14px 1fr auto;gap:.55rem;align-items:center;background:#f8fcfd;border:1px solid rgba(18,43,63,.12);border-radius:.8rem;padding:.5rem .55rem}.label-color-dot{width:12px;height:12px;border-radius:999px}.label-main strong,.label-main small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.label-main small{color:#567086}.template-item{grid-template-columns:minmax(0,1fr) auto}.template-item .label-main{min-width:0}.template-item .label-main strong,.template-item .label-main small{white-space:normal;overflow:visible;text-overflow:clip;word-break:break-word}.template-content-preview{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.catalog-groups-list{display:grid;gap:.75rem}.catalog-group-card{background:#f8fcfd;border:1px solid rgba(18,43,63,.12);border-radius:.9rem;padding:.7rem}.catalog-group-header{display:flex;align-items:flex-start;justify-content:space-between;gap:.65rem;margin-bottom:.6rem}.catalog-group-header strong,.catalog-group-header small{display:block}.catalog-group-header small{color:#567086}.catalog-count-chip{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:#145f761f;color:#145f76;border:1px solid rgba(20,95,118,.24);padding:.18rem .55rem;font-size:.72rem;font-weight:700;white-space:nowrap}.catalog-products-grid{display:grid;gap:.6rem;grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}.catalog-product-item{display:grid;grid-template-columns:72px 1fr;gap:.55rem;border:1px solid rgba(18,43,63,.1);border-radius:.72rem;padding:.45rem;background:#fff}.catalog-product-media{width:72px;height:72px;border-radius:.55rem;background:#e6f0f4;display:grid;place-items:center;overflow:hidden;color:#567086;font-size:.7rem;text-align:center}.catalog-product-media img{width:100%;height:100%;object-fit:cover}.catalog-product-main{min-width:0}.catalog-product-main strong,.catalog-product-main small{display:block}.catalog-product-main small{color:#567086;line-height:1.25}.catalog-product-description{margin-top:.22rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.catalog-product-link{display:inline-block;margin-top:.32rem;font-size:.8rem;color:#145f76;font-weight:700;text-decoration:none}.catalog-product-link:hover{text-decoration:underline}.bot-status-active{color:#0f766e;font-weight:700}.bot-status-inactive{color:#64748b;font-weight:700}.label-color-field{display:grid;gap:.35rem;color:#31556f;font-size:.88rem}.label-color-field input[type=color]{width:100%;height:36px;border:1px solid #87a7bf;border-radius:.5rem;background:#fff;padding:.2rem}.user-item{display:grid;grid-template-columns:42px 1fr auto;gap:.6rem;align-items:center;background:#f8fcfd;border:1px solid rgba(18,43,63,.12);border-radius:.8rem;padding:.55rem}.user-main{min-width:0}.user-main strong,.user-main small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-main small{color:#567086}.messages-area{flex:1;overflow-y:auto;padding:1.2rem;display:grid;gap:.6rem;align-content:start;grid-auto-rows:max-content}.messages-loader{justify-self:center;display:inline-flex;align-items:center;gap:.55rem;padding:.45rem .75rem;border-radius:999px;background:#145f761f;color:#1a455a;font-weight:700}.loader-dot{width:10px;height:10px;border-radius:999px;background:#145f76;animation:pulse-loader .9s ease-in-out infinite}.message-bubble{max-width:min(70ch,70%);border-radius:1rem;padding:.65rem .9rem;display:grid;gap:.4rem;box-shadow:0 8px 20px #122b3f1f}.message-bubble p{margin:0}.message-image{display:block;max-width:min(300px,100%);max-height:300px;border-radius:.7rem;object-fit:cover}.media-link{color:#145f76;text-decoration:none}.message-document-link{display:inline-flex;align-items:flex-start;flex-direction:column;gap:.4rem;font-weight:700;text-decoration:underline}.message-document-link small{font-weight:600;color:#315a74;text-decoration:none}.message-bubble footer{display:flex;flex-direction:column;align-items:flex-end;gap:.12rem;color:#4a677f}.message-meta-row{display:flex;gap:.5rem;justify-content:flex-end}.message-sender-name{opacity:.72;font-size:.68rem;line-height:1.1}.message-bubble.mine{justify-self:end;background:#c6f4df}.message-bubble.theirs{justify-self:start;background:#f9fdff}.message-bubble.template.mine{background:#dbeafe;border:1px solid #60a5fa}.message-bubble.template.theirs{background:#eff6ff;border:1px solid #93c5fd}.message-bubble.mine.failed,.message-bubble.mine.template.failed{background:#fee2e2;border:1px solid #f87171}.message-delivery-error{color:#b91c1c;font-size:.72rem;line-height:1.2;font-weight:700}.message-type-chip{border-radius:999px;padding:.08rem .45rem;font-size:.66rem;font-weight:800;letter-spacing:.02em;text-transform:uppercase}.message-type-chip.template{background:#2563eb29;color:#1e3a8a;border:1px solid rgba(37,99,235,.38)}.message-inline-template-label{color:#1e3a8a;font-weight:700}.date-separator{justify-self:center;padding:.28rem .65rem;border-radius:999px;background:#122b3f1f;color:#294b64;font-size:.78rem;font-weight:700;letter-spacing:.01em;position:relative;z-index:1;margin:.2rem 0}.status-check{font-weight:800;letter-spacing:-.08em}.status-sent,.status-delivered{color:#4a677f}.status-read{color:#0a84ff}.scroll-to-bottom{position:absolute;right:1rem;bottom:5.2rem;width:40px;height:40px;border-radius:999px;padding:0;display:grid;place-items:center;background:#145f76;font-size:1.1rem;z-index:4;box-shadow:0 10px 24px #122b3f3d}.send-box{border-top:1px solid rgba(18,43,63,.15);display:grid;grid-template-columns:auto 1fr auto auto;gap:.75rem;padding:.65rem .75rem;background:#e7f2f8;box-sizing:border-box}.attach-button{border:none;border-radius:.8rem;padding:.7rem .9rem;background:#145f76;color:#f8fffe;font-weight:700;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.attach-button.icon-only{width:42px;height:42px;padding:0}.attach-icon{width:20px;height:20px}.attach-button input{display:none}.product-send-button{flex-shrink:0;width:42px;height:42px;padding:0;background:#145f76;color:#f8fffe;border-radius:.8rem;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border:none;transition:background .18s}.product-send-button:disabled{opacity:.38;cursor:not-allowed;transform:none;box-shadow:none}.product-send-button svg{width:20px;height:20px}.send-message-button{display:inline-flex;align-items:center;justify-content:center;gap:.45rem}.send-message-button svg{width:18px;height:18px}.send-message-button .send-label{display:inline}.order-bubble{max-width:min(340px,88vw);background:#fff;border:1.5px solid #dde8ef;border-radius:0 1rem 1rem;padding:0;overflow:hidden;box-shadow:0 2px 8px #122b3f14}.order-bubble-header{display:flex;align-items:center;gap:.5rem;background:#145f76;color:#f8fffe;padding:.6rem .85rem}.order-bubble-icon{width:18px;height:18px;flex-shrink:0;opacity:.9}.order-bubble-title{font-weight:700;font-size:.82rem;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.order-status-badge{font-size:.68rem;font-weight:700;padding:.2em .55em;border-radius:999px;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.order-status-pending{background:#fff4cc;color:#7a5200}.order-status-confirmed{background:#d4edda;color:#155724}.order-status-completed{background:#cce5ff;color:#004085}.order-status-cancelled{background:#f8d7da;color:#721c24}.order-bubble-items{list-style:none;margin:0;padding:.5rem .85rem;display:flex;flex-direction:column;gap:.3rem;border-bottom:1px solid #eef3f7}.order-bubble-item{display:flex;align-items:baseline;gap:.4rem;font-size:.82rem;color:#1a3a4a}.order-item-id{flex:1;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.order-item-qty{color:#6b8a9a;font-size:.78rem;white-space:nowrap}.order-item-price{font-weight:600;white-space:nowrap;color:#145f76}.order-bubble-total{display:flex;justify-content:space-between;align-items:center;padding:.45rem .85rem;font-size:.85rem;color:#1a3a4a;border-bottom:1px solid #eef3f7}.order-bubble-total strong{color:#145f76;font-size:.95rem}.order-bubble-actions{display:flex;gap:.4rem;padding:.55rem .85rem}.order-action-btn{flex:1;padding:.35rem .5rem;font-size:.75rem;font-weight:700;border:none;border-radius:.5rem;cursor:pointer;transition:opacity .15s,filter .15s;white-space:nowrap}.order-action-btn:disabled{opacity:.5;cursor:not-allowed}.order-action-btn.confirm{background:#28a745;color:#fff}.order-action-btn.complete{background:#0d6efd;color:#fff}.order-action-btn.cancel{background:#dc3545;color:#fff}.order-action-btn:not(:disabled):hover{filter:brightness(.88)}.order-bubble footer{padding:.3rem .85rem .45rem}.product-send-modal{width:min(540px,100%);max-height:88vh;display:flex;flex-direction:column;gap:0;padding:0;overflow:hidden}.product-modal-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.1rem .75rem;border-bottom:1px solid rgba(18,43,63,.12)}.product-modal-header h3{margin:0;font-size:1.05rem}.product-modal-close{background:none;border:none;color:#4e6f87;font-size:1rem;cursor:pointer;padding:.2rem .4rem;border-radius:.4rem;box-shadow:none;transform:none}.product-modal-close:hover{background:#eef5f8;transform:none;box-shadow:none}.product-modal-search{margin:.7rem 1.1rem 0;border:1px solid #87a7bf;border-radius:.65rem;padding:.48rem .65rem;font-size:.88rem;background:#fff;color:#16384f;width:calc(100% - 2.2rem);box-sizing:border-box}.product-modal-search:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.product-modal-list{flex:1;overflow-y:auto;padding:.7rem 1.1rem;display:flex;flex-direction:column;gap:.85rem}.product-modal-catalog-group{display:flex;flex-direction:column;gap:.45rem}.product-modal-catalog-name{font-size:.74rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#4e6f87;padding:.1rem 0}.product-modal-item{display:grid;grid-template-columns:20px 52px 1fr;gap:.6rem;align-items:center;padding:.5rem .6rem;border:1px solid rgba(18,43,63,.1);border-radius:.75rem;background:#f8fcfd;cursor:pointer;transition:background .12s,border-color .12s}.product-modal-item:hover{background:#eef5f8}.product-modal-item.selected{border-color:#145f76;background:#e5f4f9}.product-modal-item input[type=checkbox]{width:16px;height:16px;cursor:pointer;accent-color:#145f76}.product-modal-thumb{width:52px;height:52px;border-radius:.5rem;background:#dde8ef;display:grid;place-items:center;overflow:hidden;font-size:1.4rem}.product-modal-thumb img{width:100%;height:100%;object-fit:cover}.product-modal-info{min-width:0}.product-modal-info strong,.product-modal-info small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.product-modal-info small{color:#567086}.product-modal-footer{padding:.75rem 1.1rem;border-top:1px solid rgba(18,43,63,.12);display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}.product-modal-count{font-size:.84rem;color:#4e6f87;font-weight:600}.product-modal-actions{display:flex;gap:.5rem}.selected-attachment-row{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:0 1rem .8rem;color:#20465e}.send-box-wrapper{position:relative}.send-box-blocked .send-box{filter:blur(3px);pointer-events:none;-webkit-user-select:none;user-select:none}.window-closed-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;z-index:5}.window-closed-overlay span{background:#fff8ebf2;border:1px solid #e8a040;color:#7a3d00;font-weight:700;font-size:.9rem;border-radius:.6rem;padding:.45rem 1rem;box-shadow:0 4px 14px #96500026}.window-closed-overlay-content{display:grid;gap:.5rem;justify-items:center}.template-send-modal{display:grid;gap:.7rem;width:100%;min-width:0}.template-send-modal select,.template-send-modal input[type=text],.template-send-modal input[type=tel],.template-send-modal input[type=url]{width:100%;min-width:0;box-sizing:border-box}.template-send-preview{background:#f2f8fb;border:1px solid rgba(18,43,63,.15);border-radius:.65rem;padding:.55rem .65rem}.template-send-preview small{color:#31556f;white-space:pre-wrap;word-break:break-word}.template-variable-grid{display:grid;gap:.55rem}.template-button-row{display:grid;grid-template-columns:140px 1fr auto;gap:.45rem;align-items:start;margin-top:.4rem}.template-button-row input[type=url]{grid-column:2;margin-top:.3rem}.template-button-row:has(input[type=url]){grid-template-columns:140px 1fr auto;grid-template-rows:auto auto}.template-button-row:has(input[type=url]) input[type=url]{grid-column:1 / -1;margin-top:0}.template-button-add-row{display:flex;gap:.45rem;flex-wrap:wrap;margin-top:.45rem}.template-filter-wrap{display:grid;gap:.5rem;margin:.6rem 0 .85rem}.template-filter-group{display:flex;flex-wrap:wrap;gap:.45rem}.template-filter-chip{border:1px solid rgba(22,56,79,.22);background:#f4f8fb;color:#28506a;border-radius:999px;padding:.25rem .7rem;font-size:.8rem;font-weight:600;cursor:pointer}.template-filter-chip.active{background:#0f5f8f;border-color:#0f5f8f;color:#fff}.template-status-note{margin:.35rem 0 0;color:#3d5f77;font-size:.9rem}.template-placeholder-missing{background:#fde68a;color:#7c2d12;border:1px solid #f59e0b;border-radius:.3rem;padding:0 .2rem;font-weight:700}.template-missing-variables{margin-top:.45rem;display:block;color:#9a3412;font-weight:700}.empty-state,.empty-chat,.error-text{margin:0;color:#3d5f77}.empty-chat{margin:auto;font-size:1.15rem}.panel-error{padding:0 1rem 1rem;color:#9f1d1d}.ios-pwa-banner{position:fixed;bottom:0;left:0;right:0;z-index:9999;padding:.75rem 1rem;background:#145f76;box-shadow:0 -4px 16px #00000040;padding-bottom:calc(.75rem + env(safe-area-inset-bottom))}.ios-pwa-banner-content{display:flex;align-items:center;gap:.65rem;max-width:560px;margin:0 auto}.ios-pwa-banner-icon{font-size:1.6rem;flex-shrink:0}.ios-pwa-banner-text{flex:1;display:flex;flex-direction:column;gap:.15rem;color:#fff;font-size:.88rem;line-height:1.35}.ios-pwa-banner-text strong{font-size:.95rem}.ios-pwa-share-icon{display:inline-block;font-size:1rem;vertical-align:middle}.ios-pwa-banner-close{background:#ffffff2e;color:#fff;border-radius:999px;width:28px;height:28px;padding:0;font-size:.8rem;flex-shrink:0;display:grid;place-items:center}.ios-pwa-banner-close:hover{background:#ffffff4d;transform:none;box-shadow:none}.ios-pwa-banner-enable{background:#ffffffeb;color:#145f76;font-weight:700;border-radius:.55rem;padding:.3rem .75rem;font-size:.82rem;flex-shrink:0}.ios-pwa-banner-enable:hover{background:#fff;transform:none;box-shadow:none}.confirm-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;background:#0a1c2859;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:grid;place-items:center;align-content:center;z-index:60;padding:max(1rem,env(safe-area-inset-top)) max(1rem,env(safe-area-inset-right)) max(1rem,env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left));box-sizing:border-box;overflow:auto;overscroll-behavior:contain}.confirm-modal-card{width:min(440px,100%);max-height:calc(100dvh - 2rem);overflow:auto;background:#fffffffa;border:1px solid rgba(18,43,63,.15);border-radius:1rem;box-shadow:0 18px 42px #122b3f47;padding:1rem;box-sizing:border-box;overflow-x:hidden}.confirm-modal-card h3{margin:0;color:#16384f}.confirm-modal-card p{margin:.55rem 0 0;color:#3d5f77;line-height:1.4}.chat-files-modal{width:min(680px,100%);max-height:calc(100dvh - 2rem);display:flex;flex-direction:column;padding:0;overflow:hidden}.chat-files-header{display:flex;align-items:center;justify-content:space-between;padding:.9rem 1rem;border-bottom:1px solid rgba(18,43,63,.12)}.chat-files-header h3{margin:0}.chat-files-list{padding:.75rem 1rem 1rem;overflow:auto;display:grid;gap:.55rem}.chat-file-item{display:flex;align-items:center;justify-content:space-between;gap:.75rem;border:1px solid rgba(18,43,63,.15);border-radius:.7rem;padding:.65rem .75rem;background:#f8fcff;min-width:0;overflow:hidden}.chat-file-content{min-width:0;flex:1;overflow:hidden;display:flex;align-items:center;gap:.65rem}.chat-file-thumb{width:56px;height:56px;flex-shrink:0;border-radius:.55rem;overflow:hidden;border:1px solid rgba(18,43,63,.18);display:block;background:#e4edf3}.chat-file-thumb img{width:100%;height:100%;object-fit:cover;display:block}.chat-file-ext{display:grid;place-items:center;color:#fff;font-size:.66rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.chat-file-ext span{display:inline-block;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-file-ext.ext-pdf{background:linear-gradient(140deg,#dc2626,#b91c1c)}.chat-file-ext.ext-doc{background:linear-gradient(140deg,#2563eb,#1d4ed8)}.chat-file-ext.ext-xls{background:linear-gradient(140deg,#15803d,#166534)}.chat-file-ext.ext-ppt{background:linear-gradient(140deg,#ea580c,#c2410c)}.chat-file-ext.ext-txt{background:linear-gradient(140deg,#4b5563,#374151)}.chat-file-ext.ext-zip{background:linear-gradient(140deg,#7c3aed,#6d28d9)}.chat-file-ext.ext-code{background:linear-gradient(140deg,#0f766e,#0f5f58)}.chat-file-ext.ext-file{background:linear-gradient(140deg,#334155,#1e293b)}.chat-file-main{min-width:0;flex:1;overflow:hidden;display:flex;flex-direction:column;gap:.2rem}.chat-file-main strong,.chat-file-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.confirm-modal-actions{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.95rem}.error-text{color:#9f1d1d}@keyframes fade-up{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@keyframes pulse-loader{0%,to{opacity:.35;transform:scale(.78)}50%{opacity:1;transform:scale(1)}}@media (max-width: 900px){.message-bubble{max-width:84%}.header-actions{flex-wrap:wrap;justify-content:flex-end}.settings-layout{grid-template-columns:1fr}.users-toolbar{flex-direction:column;align-items:stretch}.users-group-filter-chips{justify-content:flex-start}}@media (max-width: 700px){.chat-shell{grid-template-columns:1fr;grid-template-rows:1fr}.chat-shell.settings-view{grid-template-rows:auto 1fr}.contacts-panel,.chat-panel{height:100%}.send-message-button{width:42px;height:42px;min-width:42px;padding:0;border-radius:.8rem}.send-message-button .send-label{display:none}}.orders-panel{display:flex;flex-direction:column;height:100%;background:#fff;border-left:1px solid #e5e7eb}.orders-header{padding:16px;border-bottom:1px solid #e5e7eb;background:linear-gradient(135deg,#145f76,#0d4563);color:#fff}.orders-header h2{margin:0;font-size:18px;font-weight:600}.orders-controls{display:flex;flex-direction:column;gap:8px;padding:12px;border-bottom:1px solid #e5e7eb;background:#f9fafb}.orders-search,.orders-filter,.orders-sort{padding:8px 12px;border:1px solid #d1d5db;border-radius:6px;font-size:13px;background:#fff;font-family:inherit}.orders-search:focus,.orders-filter:focus,.orders-sort:focus{outline:none;border-color:#145f76;box-shadow:0 0 0 2px #145f761a}.orders-list{flex:1;overflow-y:auto;padding:8px}.orders-loading,.orders-empty{display:flex;align-items:center;justify-content:center;height:200px;color:#9ca3af;font-size:14px}.order-item{background:#fff;border:1px solid #e5e7eb;border-radius:8px;margin-bottom:8px;padding:12px;transition:box-shadow .2s}.order-item:hover{box-shadow:0 2px 8px #00000014}.order-item-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;gap:8px}.order-item-contact{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.order-contact-name{font-size:13px;font-weight:600;color:#1f2937;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.order-contact-phone{font-size:11px;color:#6b7280}.order-item-status{padding:4px 8px;border-radius:4px;font-size:11px;font-weight:600;color:#fff;white-space:nowrap;text-transform:uppercase}.order-item-details{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px;padding:8px;background:#f9fafb;border-radius:4px;font-size:12px}.order-detail{display:flex;justify-content:space-between;gap:4px}.order-label{font-weight:600;color:#6b7280}.order-value{color:#1f2937;text-align:right;word-break:break-word}.order-products{margin-bottom:8px;padding:8px;background:#f3f4f6;border-radius:4px;font-size:12px}.order-products-title{display:block;font-weight:600;color:#4b5563;margin-bottom:4px}.order-products-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:3px}.order-products-list li{display:flex;align-items:center;gap:6px;color:#374151;font-size:11px}.product-id{font-weight:600;color:#145f76}.product-qty{color:#6b7280}.product-price{margin-left:auto;font-weight:600;color:#10b981}.order-text{margin-bottom:8px;padding:6px 8px;background:#fffbeb;border-left:3px solid #fbbf24;border-radius:2px;color:#78350f}.order-actions{display:flex;gap:4px;flex-wrap:wrap}.status-btn{flex:1;min-width:65px;padding:6px 8px;border:1.5px solid;border-radius:4px;font-size:10px;font-weight:600;text-transform:uppercase;cursor:pointer;transition:all .2s;background:#fff}.status-btn:disabled{cursor:not-allowed;opacity:1}.status-btn:not(:disabled):hover{opacity:.8;transform:translateY(-1px)}.status-btn.active{box-shadow:0 2px 4px #0000001a}.orders-footer{padding:8px 12px;border-top:1px solid #e5e7eb;background:#f9fafb;text-align:center;color:#6b7280;font-size:12px}
