/* v8.8.13.15 chat-to-order navigation — intentionally last in the cascade */

.telegram-order-chip {
  appearance: none;
  font: inherit;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

/* Customer CRM v2: strong, unambiguous state and audit signals. */
.hub-customer-status{padding:7px 9px;border-radius:999px;background:#dff5e7;color:#087744;font-size:10px;font-weight:900;white-space:nowrap}
.hub-customer-badges{display:flex;align-items:flex-end;justify-content:center;flex-direction:column;gap:5px}
.hub-customer-status.vip{background:#eee4ff;color:#673da8}
.hub-customer-status.refused{background:#fff0d4;color:#925500}
.hub-customer-status.blocked{background:#ffe1e5;color:#ae2434}
.hub-customer-refusal{display:grid;gap:3px;margin:0 0 10px;padding:12px 14px;border:1px solid #efc46e;border-radius:15px;background:#fff8e8;color:#7d4b00}
.hub-customer-refusal.blocked{border-color:#f0aab3;background:#fff0f2;color:#a22031}
.hub-customer-refusal strong{font-size:13px}.hub-customer-refusal span{font-size:11px;font-weight:700}
.hub-customer-refusal p{margin:5px 0 0;font-size:12px;line-height:1.45;white-space:pre-wrap}
.hub-customer-preference{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:11px 13px;border:1px solid #cfe5d8;border-radius:14px;background:#f6fbf8}
.hub-customer-preference span{font-size:11px;color:var(--muted)}.hub-customer-preference strong{font-size:12px;color:#087744}
.hub-customer-audit{display:grid}.hub-customer-audit>div{display:grid;grid-template-columns:10px minmax(0,1fr);gap:9px;padding:10px 12px;border-bottom:1px solid #edf2ef}
.hub-customer-audit>div:last-child{border-bottom:0}.hub-customer-audit>div>span{width:8px;height:8px;margin-top:4px;border-radius:50%;background:#16a464;box-shadow:0 0 0 3px #e0f5e9}
.hub-customer-audit p{display:grid;gap:2px;margin:0}.hub-customer-audit strong{font-size:11px}.hub-customer-audit small{font-size:9px;color:var(--muted)}
@media(max-width:760px){.hub-customer-badges{grid-column:2;align-items:flex-start}}
.telegram-order-chip:active { background: #ccefdc; }
.telegram-order-chip:focus-visible { outline: 3px solid rgba(10,159,88,.24); outline-offset: 2px; }
.telegram-order-chip:disabled { cursor: wait; opacity: .72; }
.telegram-order-chip i {
  flex: 0 0 auto;
  color: var(--primary-dark);
  font-size: 24px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

@media (min-width: 1180px) {
  #appView {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    grid-template-rows: 66px minmax(0, 1fr);
    height: 100dvh;
    overflow: hidden;
    background: #f6f4ee;
  }
  #appView > .hub-sidebar {
    grid-column: 1;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 16px 9px 12px;
    background: #102d22;
    color: #fff;
  }
  #appView > .topbar {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    inset: auto;
    min-height: 66px;
    padding: 0 18px;
    border-bottom: 1px solid #dfe7e1;
    background: rgba(255,255,255,.94);
    box-shadow: none;
  }
  #appView > .workspace,
  #appView > .telegram-workspace {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
  }
  .hub-sidebar-brand { display: flex; align-items: center; gap: 8px; padding: 3px 7px 20px; }
  .hub-sidebar-logo {
    display: grid; place-items: center; width: 36px; height: 36px;
    flex: 0 0 36px; border-radius: 11px; background: linear-gradient(145deg,#19bb70,#087440);
    box-shadow: 0 7px 16px rgba(0,0,0,.18); font-size: 18px;
  }
  .hub-sidebar-brand strong { display: block; font-size: 16px; }
  .hub-sidebar-brand span { display: block; margin-top: 1px; color: rgba(255,255,255,.58); font-size: 10px; letter-spacing: .12em; }
  .hub-sidebar .main-navigation {
    display: flex; flex: 1 1 auto; flex-direction: column; gap: 7px;
    padding: 0; border: 0; background: transparent; backdrop-filter: none;
  }
  .hub-sidebar .main-navigation-button {
    display: grid; grid-template-columns: 23px minmax(0,1fr) auto; align-items: center;
    width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 12px;
    color: rgba(255,255,255,.68); text-align: left; box-shadow: none;
  }
  .hub-sidebar .main-navigation-button > span:first-child { font-size: 18px; }
  .hub-sidebar .main-navigation-button b { font-size: 14px; }
  .hub-sidebar .nav-unread { min-width: 21px; height: 21px; padding-inline: 4px; font-size: 10px; }
  .hub-sidebar #ordersTabButton.active,
  .hub-sidebar #telegramTabButton.active,
  .hub-sidebar #bankingTabButton.active {
    background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 #25cf7d;
  }
  .hub-sidebar-foot { padding: 10px; border-radius: 12px; background: rgba(255,255,255,.07); }
  .hub-sidebar-foot strong { display: block; font-size: 12px; }
  .hub-sidebar-foot small { color: rgba(255,255,255,.52); font-size: 10px; }
  .hub-user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 6px; border: 1px solid #dfe7e1; border-radius: 14px; background: #fff; }
  .hub-user-chip > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #dff5e8; color: #08723f; font-weight: 900; }
  .hub-user-chip small { display: block; color: #748078; font-size: 11px; }
  .hub-user-chip strong { display: block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; font-size: 14px; white-space: nowrap; }
  #ordersWorkspace {
    display: grid;
    grid-template-columns: clamp(380px, 34%, 460px) minmax(560px, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px 12px;
    overflow: hidden;
    background: #f6f4ee;
  }
  #ordersWorkspace .orders-overview { grid-column: 1 / -1; grid-row: 1; }
  #ordersWorkspace .orders-pane {
    grid-column: 1; grid-row: 2; position: relative; inset: auto; width: auto; height: auto;
    padding: 8px; overflow: auto; border: 1px solid #dfe7e1; border-radius: 17px;
    background: #fff; box-shadow: 0 10px 30px rgba(20,54,37,.05);
  }
  #ordersWorkspace .detail-pane {
    grid-column: 2; grid-row: 2; position: relative; inset: auto; display: block;
    min-width: 0; min-height: 0; width: auto; height: auto; overflow: auto;
    transform: none; transition: none; border: 1px solid #dfe7e1; border-radius: 17px;
    padding: 8px 10px 12px; background: #fff; box-shadow: 0 10px 30px rgba(20,54,37,.05);
  }
  #ordersWorkspace .detail-pane[hidden] { display: block; }
  #ordersWorkspace .detail-backdrop { display: none !important; }
  #ordersWorkspace .order-detail-header { position: sticky; top: 0; z-index: 4; background: rgba(255,255,255,.96); }
  #ordersWorkspace .order-detail-back { display: none; }
  #ordersWorkspace .orders-header { padding: 5px 5px 8px; }
  #ordersWorkspace .orders-search { margin: 0 1px 6px; }
  #ordersWorkspace .order-list { gap: 5px; }
  #ordersWorkspace .order-card { padding: 9px 10px; border-radius: 12px; box-shadow: none; }
  #ordersWorkspace .order-card.active { border-color: #7fd6aa; background: #eefaf3; box-shadow: inset 3px 0 #0b9f59; }
  .topbar-brand strong { font-size: 25px; }
  .topbar-brand small { font-size: 13px; }
  #ordersWorkspace .orders-pane .search-wrap input { font-size: 16px; }
  #ordersWorkspace .list-meta { font-size: 14px; }
  #ordersWorkspace .list-meta strong { font-size: 18px; }
  #ordersWorkspace .load-more { font-size: 16px; }
  #ordersWorkspace .order-card.order-row-card { min-height: 82px; gap: 3px 10px; padding: 8px 10px; }
  #ordersWorkspace .order-row-number strong { font-size: 16px; }
  #ordersWorkspace .order-row-number time { font-size: 11px; }
  #ordersWorkspace .order-row-customer strong { font-size: 16px; }
  #ordersWorkspace .order-row-status .order-status-badge { font-size: 11px; }
  #ordersWorkspace .order-row-total b { font-size: 16px; }
  #ordersWorkspace .order-row-open { font-size: 25px; }
  #ordersWorkspace .order-detail { width: 100%; max-width: none; margin: 0; }
  #ordersWorkspace .order-detail-body { max-width: none; margin: 0; padding: 8px 10px 12px; }
  #ordersWorkspace .detail-card { border-color: #e1e8e3; border-radius: 16px; box-shadow: none; }
  #ordersWorkspace .detail-title small { font-size: 14px; }
  #ordersWorkspace .detail-title h1 { font-size: 30px; }
  #ordersWorkspace .detail-total small { font-size: 13px; }
  #ordersWorkspace .detail-total strong { font-size: 25px; }
  #ordersWorkspace .customer-card h2 { font-size: 19px; }
  #ordersWorkspace .customer-card p { font-size: 15px; }
  #ordersWorkspace .workflow-info-cell small,
  #ordersWorkspace .workflow-responsible small { font-size: 12px; }
  #ordersWorkspace .workflow-responsible strong { font-size: 17px; }
  #ordersWorkspace .workflow-responsible em { font-size: 13px; }
  #ordersWorkspace .message-send-summary strong { font-size: 15px; }
  #ordersWorkspace .message-send-summary small { font-size: 12px; }
  #ordersWorkspace .next-action-card small { font-size: 13px; }
  #ordersWorkspace .next-action-card strong { font-size: 19px; }
  #ordersWorkspace .next-action-card span { font-size: 14px; }
  #ordersWorkspace .next-action-card > button,
  #ordersWorkspace .workflow-button-stack > button { font-size: 14px; }
  #ordersWorkspace .pick-launch-copy strong { font-size: 19px; }
  #ordersWorkspace .pick-launch-copy span { font-size: 13px; }
  #ordersWorkspace .pick-launch button { font-size: 14px; }
  #ordersWorkspace .orders-overview { gap: 9px; }
  #ordersWorkspace .overview-card {
    grid-template-columns: 40px minmax(0,1fr); gap: 9px; min-height: 68px;
    padding: 9px 12px; border-radius: 15px;
  }
  #ordersWorkspace .overview-card > span { width: 40px; height: 40px; border-radius: 11px; font-size: 18px; }
  #ordersWorkspace .overview-card small { font-size: 13px; }
  #ordersWorkspace .overview-card strong { font-size: 27px; }
  #ordersWorkspace .receipt-head { padding: 10px 12px; }
  #ordersWorkspace .receipt-head h2 { font-size: 20px; }
  #ordersWorkspace .receipt-head span { margin-top: 2px; font-size: 13px; }
  #ordersWorkspace .add-item-button { min-height: 40px; padding-inline: 13px; border-radius: 11px; font-size: 14px; }
  #ordersWorkspace .receipt-row {
    grid-template-columns: 42px minmax(0,1fr) auto;
    gap: 8px; min-height: 56px; padding: 6px 10px;
  }
  #ordersWorkspace .receipt-thumb { width: 42px; height: 42px; border-radius: 9px; }
  #ordersWorkspace .receipt-thumb img { padding: 3px; }
  #ordersWorkspace .receipt-copy strong { font-size: 16px; line-height: 1.15; }
  #ordersWorkspace .receipt-copy small,
  #ordersWorkspace .receipt-copy em { margin-top: 2px; font-size: 12px; line-height: 1.2; }
  #ordersWorkspace .receipt-value { min-width: 92px; }
  #ordersWorkspace .receipt-value b { font-size: 16px; }
  #ordersWorkspace .item-state { margin-top: 3px; padding: 2px 6px; font-size: 11px; }
  #ordersWorkspace .receipt-total { padding: 11px 13px; }
  #ordersWorkspace .receipt-total-main { font-size: 17px; }
  #ordersWorkspace .receipt-total-main strong { font-size: 29px; }
  #ordersWorkspace .receipt-total > small { display: none; }
  #telegramWorkspace {
    display: grid;
    grid-template-columns: clamp(370px, 25vw, 410px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    padding: 14px 18px 18px;
    overflow: hidden;
    background: #f6f4ee;
  }
  #telegramWorkspace .telegram-list-pane {
    grid-column: 1; position: relative; inset: auto; width: auto; height: auto;
    padding: 10px; overflow: auto; border: 1px solid #dfe7e1; border-radius: 20px 0 0 20px;
    background: #fff; transform: none;
  }
  #telegramWorkspace .telegram-chat-pane {
    grid-column: 2; position: relative; inset: auto; min-width: 0; min-height: 0;
    border: 1px solid #dfe7e1; border-left: 0; border-radius: 0 20px 20px 0;
    background: #edf5f0; transform: none; box-shadow: none;
  }
  #telegramWorkspace .telegram-back-button { display: none; }
  #telegramWorkspace .telegram-list-toolbar .search-wrap input { font-size: 16px; }
  #telegramWorkspace .telegram-list-meta strong { font-size: 18px; }
  #telegramWorkspace .telegram-connection-badge { font-size: 11px; }
  #telegramWorkspace .telegram-chat-card-top strong { font-size: 16px; }
  #telegramWorkspace .telegram-chat-card-top time { font-size: 11px; }
  #telegramWorkspace .telegram-chat-card-identity { font-size: 12px; }
  #telegramWorkspace .telegram-chat-card-preview { font-size: 14px; }
  #telegramWorkspace .telegram-chat-card-meta em { font-size: 10px; }
  #telegramWorkspace .telegram-chat-card-meta small { font-size: 11px; }
  #telegramWorkspace .telegram-chat-heading strong { font-size: 18px; }
  #telegramWorkspace .telegram-chat-heading small { font-size: 12px; }
  #telegramWorkspace .telegram-linked-order > div strong,
  #telegramWorkspace .telegram-order-chip strong,
  #telegramWorkspace .telegram-order-chip b { font-size: 14px; }
  #telegramWorkspace .telegram-linked-order > div small,
  #telegramWorkspace .telegram-order-chip small { font-size: 11px; }
  #telegramWorkspace .telegram-open-native { font-size: 12px; }
  #telegramWorkspace .telegram-quick-actions button { font-size: 14px; }
  #telegramWorkspace .telegram-message-text { font-size: 16px; line-height: 1.45; }
  #telegramWorkspace .telegram-message-foot time { font-size: 11px; }
  #telegramWorkspace .telegram-composer textarea { font-size: 16px; }
  #telegramWorkspace .telegram-messages { padding-inline: max(18px, calc((100% - 900px) / 2)); }
  #telegramWorkspace .telegram-composer { padding-inline: max(18px, calc((100% - 900px) / 2)); }
}

/* v8.8.13.15 — richer chat palette, scoped to Chats only. */
#telegramWorkspace .telegram-list-pane {
  background: linear-gradient(180deg, #f2fbf6 0%, #e5f4eb 100%);
}
#telegramWorkspace .telegram-chat-pane { background: #dfeee5; }
#telegramWorkspace .telegram-messages {
  background:
    radial-gradient(circle at 15% 10%, rgba(255,255,255,.74), transparent 34%),
    linear-gradient(160deg, #e6f5ec 0%, #dcece2 100%);
}
#telegramWorkspace .telegram-connection-badge.connected {
  background: #c9f0da;
  color: #056b3b;
}
#telegramWorkspace .telegram-chat-card {
  border-color: #c4d9cc;
  box-shadow: 0 3px 12px rgba(13,88,50,.06);
}
#telegramWorkspace .telegram-chat-card::before { width: 5px; background: #90aa99; }
#telegramWorkspace .telegram-chat-card.state-needs-reply {
  border-color: #ee9da5;
  background: linear-gradient(90deg, #ffe1e4 0%, #fff2f3 58%, #fff 100%);
}
#telegramWorkspace .telegram-chat-card.state-needs-reply::before { background: #d92d3f; }
#telegramWorkspace .telegram-chat-card.state-answered {
  border-color: #76c99d;
  background: linear-gradient(90deg, #d0f2df 0%, #ecfaf3 58%, #fff 100%);
}
#telegramWorkspace .telegram-chat-card.state-answered::before { background: #079b5a; }
#telegramWorkspace .telegram-reply-state-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
#telegramWorkspace .telegram-reply-state-badge.needs-reply { background: #ffd6db; color: #bd1f32; }
#telegramWorkspace .telegram-reply-state-badge.answered { background: #c8eed8; color: #057742; }
#telegramWorkspace .telegram-chat-card.channel-telegram.active {
  border-color: #0877a8;
  box-shadow: 0 0 0 3px rgba(8,119,168,.17);
}
#telegramWorkspace .telegram-chat-card.channel-instagram.active {
  border-color: #a41365;
  box-shadow: 0 0 0 3px rgba(164,19,101,.17);
}
#telegramWorkspace .telegram-chat-card.channel-messenger.active {
  border-color: #0866ff;
  box-shadow: 0 0 0 3px rgba(8,102,255,.16);
}
#telegramWorkspace .telegram-chat-card.channel-viber.active {
  border-color: #6650a4;
  box-shadow: 0 0 0 3px rgba(102,80,164,.17);
}
#telegramWorkspace .messenger-channel-badge { color: #fff; box-shadow: 0 2px 7px rgba(20,35,27,.10); }
#telegramWorkspace .messenger-channel-badge.telegram { background: #0877a8; color: #fff; }
#telegramWorkspace .messenger-channel-badge.instagram { background: linear-gradient(135deg, #833ab4, #a41365); color: #fff; }
#telegramWorkspace .messenger-channel-badge.messenger { background: #0866ff; color: #fff; }
#telegramWorkspace .messenger-channel-badge.viber { background: #6650a4; color: #fff; }
#telegramWorkspace .telegram-chat-card-identity { border-radius: 999px; background: #ffe1ee; color: #9f155d; }
#telegramWorkspace .telegram-unread {
  background: #d92d3f;
  box-shadow: 0 3px 9px rgba(217,45,63,.25);
}
#telegramWorkspace .telegram-message.incoming {
  border: 1px solid #cbdad1;
  background: #fff;
}
#telegramWorkspace .telegram-message.outgoing {
  border: 1px solid #78c99d;
  background: #c9f1dc;
}
#telegramWorkspace .telegram-order-bar { border-bottom-color: #c4ddce; background: #f1fbf5; }
#telegramWorkspace .telegram-order-chip {
  border-color: #63bd8c;
  background: #ccefdc;
  color: #103229;
}
#telegramWorkspace .telegram-order-chip:active { background: #addfc2; }
#telegramWorkspace .telegram-quick-actions button {
  border-color: #72c79b;
  background: #d7f3e4;
  color: #075e36;
}
#telegramWorkspace .telegram-quick-actions button.is-sent:disabled { border-color: #58b883; background: #bfeacf; color: #075e36; }
#telegramWorkspace .telegram-quick-actions button.is-repeat { border-color: #3dae75; background: #effaf4; color: #075e36; }
#telegramWorkspace .telegram-quick-actions button.is-pending:disabled { border-color: #d5a73f; background: #ffedbd; color: #704b00; }
#telegramWorkspace #telegramSendButton {
  background: #079b55;
  box-shadow: 0 6px 16px rgba(7,155,85,.20);
}
@media (hover: hover) and (pointer: fine) {
  #telegramWorkspace .telegram-chat-card:hover { border-color: #72be98; background: #f3fcf7; box-shadow: 0 8px 22px rgba(13,88,50,.10); }
  #telegramWorkspace .telegram-order-chip:hover { border-color: #43ad75; background: #bde8cf; box-shadow: 0 5px 14px rgba(12,112,63,.12); }
  #telegramWorkspace .telegram-quick-actions button:not(:disabled):hover { border-color: #46ad79; background: #c3ebd5; }
}

/* v8.8.13.16 — side-by-side order creation and richer Orders palette. */
#ordersWorkspace {
  background:
    radial-gradient(circle at 92% 5%, rgba(255,214,111,.18), transparent 28%),
    linear-gradient(150deg, #f4faf6 0%, #f8f4e9 100%);
}
#ordersWorkspace .overview-card { border-width: 1px; box-shadow: 0 7px 20px rgba(25,69,46,.07); }
#ordersWorkspace .overview-card.neutral { border-color: #8dd4ad; background: linear-gradient(135deg,#e0f7e9,#f5fcf8); }
#ordersWorkspace .overview-card.neutral > span { background: #bcebd0; color: #057947; }
#ordersWorkspace .overview-card.warning { border-color: #edbd59; background: linear-gradient(135deg,#ffedc6,#fff9eb); }
#ordersWorkspace .overview-card.warning > span { background: #ffd987; color: #925800; }
#ordersWorkspace .overview-card.payment { border-color: #e7a93c; background: linear-gradient(135deg,#ffe4aa,#fff6df); }
#ordersWorkspace .overview-card.payment > span { background: #ffce68; color: #7d4b00; }
#ordersWorkspace .overview-card.shipping { border-color: #a995e7; background: linear-gradient(135deg,#e9e0ff,#f8f5ff); }
#ordersWorkspace .overview-card.shipping > span { background: #d8c9ff; color: #5730a7; }

#ordersWorkspace .order-card.order-row-card { border-color: #c9ddd0; }
#ordersWorkspace .order-card.order-row-card.tone-neutral { background: linear-gradient(90deg,#edf9f2,#fff 55%); border-left-color: #22a866; }
#ordersWorkspace .order-card.order-row-card.tone-warning { background: linear-gradient(90deg,#fff0cf,#fff 58%); border-left-color: #e69200; }
#ordersWorkspace .order-card.order-row-card.tone-ready { background: linear-gradient(90deg,#e3f3ff,#fff 58%); border-left-color: #1678c6; }
#ordersWorkspace .order-card.order-row-card.tone-payment { background: linear-gradient(90deg,#ffe7b5,#fff 58%); border-left-color: #d88400; }
#ordersWorkspace .order-card.order-row-card.tone-paid { background: linear-gradient(90deg,#d8f5e5,#fff 58%); border-left-color: #05945a; }
#ordersWorkspace .order-card.order-row-card.tone-shipping { background: linear-gradient(90deg,#e9e1ff,#fff 58%); border-left-color: #7353c9; }
#ordersWorkspace .order-card.order-row-card.tone-success { background: linear-gradient(90deg,#d5f3e2,#fff 58%); border-left-color: #078b50; }
#ordersWorkspace .order-card.order-row-card.tone-danger { background: linear-gradient(90deg,#ffe1e4,#fff 58%); border-left-color: #d92d3f; }
#ordersWorkspace .order-card.order-row-card.active {
  border-color: #35ad73;
  background: linear-gradient(90deg,#c9f1da,#effbf4 60%,#fff);
  box-shadow: inset 4px 0 #078e50, 0 0 0 2px rgba(7,142,80,.13);
}
#ordersWorkspace .order-status-badge.warning { background: #ffd88a; color: #704200; }
#ordersWorkspace .order-status-badge.ready { background: #cceaff; color: #075c96; }
#ordersWorkspace .order-status-badge.payment { background: #ffd77e; color: #704100; }
#ordersWorkspace .order-status-badge.paid { background: #bdebd1; color: #05683c; }
#ordersWorkspace .order-status-badge.shipping { background: #d9ccff; color: #4f2b9d; }
#ordersWorkspace .order-status-badge.success { background: #bce9cf; color: #05683c; }
#ordersWorkspace .order-status-badge.danger { background: #ffcbd0; color: #a51427; }
#ordersWorkspace .customer-card { border-color: #b8ddc8; background: linear-gradient(110deg,#e9f8f0,#fff 70%); }

/* v8.8.13.20 — OS customer card bridge */
.customer-card-button,.telegram-customer-button{border:1px solid #77c99d;background:#d8f3e5;color:#075e36;font:inherit;font-weight:850;cursor:pointer}.customer-card-button{min-height:44px;padding:0 14px;border-radius:14px}.telegram-customer-button{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;font-size:18px;flex:0 0 auto}.customer-card-button:hover,.telegram-customer-button:hover{background:#bfeacf;border-color:#45ae78}.customer-card-backdrop{align-items:stretch;justify-content:flex-end;padding:0}.customer-card-sheet{width:min(560px,100%);max-height:100dvh;height:100dvh;border-radius:24px 0 0 24px;padding-bottom:0;box-shadow:-24px 0 70px rgba(5,34,19,.24)}.customer-card-sheet-header{background:linear-gradient(120deg,#eefaf3,#fff)}.customer-card-sheet-body{min-height:0;overflow:auto;padding:16px 18px 26px}.customer-sync-note{padding:10px 12px;margin-bottom:12px;border-radius:13px;background:#fff1cf;color:#755006;font-size:12px;font-weight:750}.customer-sync-note.ready{background:#dff5e7;color:#087744}.hub-customer-loading{min-height:240px;display:grid;place-items:center;align-content:center;gap:12px;color:var(--muted)}.hub-customer-hero{display:grid;grid-template-columns:58px minmax(0,1fr) auto;gap:13px;align-items:center;padding:16px;border-radius:19px;background:linear-gradient(125deg,#dff5e8,#f7fcf9);border:1px solid #c2e4d0;margin-bottom:10px}.hub-customer-avatar{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(145deg,#13ad66,#087b47);color:#fff;font-size:18px;font-weight:950}.hub-customer-hero>div{min-width:0}.hub-customer-hero small{font-size:9px;color:#39805c;font-weight:900;letter-spacing:.08em}.hub-customer-hero h2{margin:3px 0 0;font-size:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hub-customer-hero p{margin:5px 0 0;color:#607168;font-size:12px;overflow-wrap:anywhere}.hub-customer-warning,.hub-customer-vip{padding:7px 9px;border-radius:999px;font-size:10px;white-space:nowrap}.hub-customer-warning{background:#ffe1e5;color:#ae2434}.hub-customer-vip{background:#eee4ff;color:#673da8}.hub-customer-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:10px}.hub-customer-metrics>div{display:grid;gap:3px;padding:11px;border:1px solid #d9e8df;border-radius:14px;background:#fbfdfc}.hub-customer-metrics small{font-size:9px;color:var(--muted);text-transform:uppercase;font-weight:800}.hub-customer-metrics strong{font-size:16px;color:#075f37}.hub-customer-section{border:1px solid var(--line);border-radius:16px;overflow:hidden;margin-bottom:10px;background:#fff}.hub-customer-section h3{margin:0;padding:11px 13px;background:#f4f8f5;border-bottom:1px solid var(--line);font-size:13px}.hub-customer-notes{margin:0;padding:13px;white-space:pre-wrap;line-height:1.5;color:#44574c;font-size:13px}.hub-customer-tags{display:flex;gap:6px;flex-wrap:wrap;padding:12px}.hub-customer-tags span{padding:6px 9px;border-radius:999px;background:#e8f4ed;color:#087744;font-size:10px;font-weight:850}.hub-customer-identities{display:grid}.hub-customer-identities>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:10px;padding:10px 12px;border-bottom:1px solid #edf2ef}.hub-customer-identities>div:last-child{border-bottom:0}.hub-customer-identities b{font-size:11px;color:#087744}.hub-customer-identities span{font-size:11px;overflow-wrap:anywhere}.hub-customer-addresses p{margin:0;padding:10px 12px;border-bottom:1px solid #edf2ef;font-size:12px;line-height:1.45}.hub-customer-addresses p:last-child{border-bottom:0}.hub-customer-orders{display:grid}.hub-customer-orders button{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:11px 12px;border:0;border-bottom:1px solid #edf2ef;background:#fff;color:var(--ink);font:inherit;text-align:left;cursor:pointer}.hub-customer-orders button:hover{background:#f1faf5}.hub-customer-orders button:last-child{border-bottom:0}.hub-customer-orders button span{display:grid;gap:3px}.hub-customer-orders strong,.hub-customer-orders b{font-size:12px}.hub-customer-orders small{font-size:10px;color:var(--muted)}.hub-customer-orders b{color:#087744}.hub-customer-orders i{font-size:20px;font-style:normal;color:#829087}.hub-customer-empty{margin:0;padding:15px;color:var(--muted);font-size:11px;text-align:center}.hub-customer-os-link{min-height:48px;display:flex;align-items:center;justify-content:center;border-radius:14px;background:#0aa45c;color:#fff;font-weight:900;font-size:13px;box-shadow:0 8px 18px rgba(10,164,92,.18)}.hub-customer-error{min-height:260px;display:grid;align-content:center;justify-items:center;text-align:center;gap:9px}.hub-customer-error span{color:var(--muted)}.hub-customer-error button{min-height:42px;border:0;border-radius:12px;padding:0 16px;background:#0aa45c;color:#fff;font-weight:850}
@media(max-width:760px){.customer-card-sheet{height:min(92dvh,860px);max-height:92dvh;border-radius:25px 25px 0 0}.customer-card-backdrop{align-items:flex-end}.customer-card-sheet-body{padding:13px 14px 22px}.hub-customer-hero{grid-template-columns:50px minmax(0,1fr)}.hub-customer-avatar{width:48px;height:48px;border-radius:16px}.hub-customer-warning,.hub-customer-vip{grid-column:2}.hub-customer-metrics{grid-template-columns:1fr 1fr}.hub-customer-metrics>div:last-child{grid-column:1/-1}.telegram-customer-button{width:42px;height:42px}.customer-card-button{min-height:42px}}
#ordersWorkspace .workflow-info-cell { border-color: #bedfcd; background: #f0faf4; }
#ordersWorkspace .workflow-responsible { border-color: #d6cbed; background: #f7f3ff; }
#ordersWorkspace .receipt-card { border-color: #b9d8c7; box-shadow: 0 8px 24px rgba(20,72,45,.06); }
#ordersWorkspace .receipt-head { background: linear-gradient(90deg,#edf9f2,#fff); }
#ordersWorkspace .receipt-total { background: linear-gradient(90deg,#eef8f2,#f9fcfa); }
#ordersWorkspace .add-item-button { border-color: #62bd8b; background: #ccefdc; color: #05673b; }
#ordersWorkspace .pick-launch { background: linear-gradient(120deg,#0d4b34,#087b4a); box-shadow: 0 10px 26px rgba(4,91,51,.18); }
#ordersWorkspace .next-action-card.ready { border-color: #83bfe9; background: #eaf6ff; }
#ordersWorkspace .next-action-card.payment { border-color: #e4b454; background: #fff1d1; }
#ordersWorkspace .next-action-card.paid { border-color: #7ac69b; background: #e4f7ec; }
#ordersWorkspace .next-action-card.shipping { border-color: #ae9ae8; background: #eee9ff; }
#ordersWorkspace .next-action-card.shipped { border-color: #72c394; background: #ddf4e7; }
#ordersWorkspace .receipt-row.is-locked:disabled { cursor: default; opacity: 1; }

.admin-order-controls,
.order-cancelled-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 15px 16px;
  border: 1px solid #e7a4ac;
  border-radius: 18px;
  background: linear-gradient(110deg,#fff0f1,#fff 72%);
}
.admin-order-controls small,
.order-cancelled-card small { display: block; color: #9b5961; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.admin-order-controls strong,
.order-cancelled-card strong { display: block; margin-top: 3px; color: #7f1623; font-size: 17px; }
.admin-order-controls span { display: block; margin-top: 4px; color: #7e696b; font-size: 12px; }
.admin-order-controls button {
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid #d34a5a;
  border-radius: 14px;
  background: #fff;
  color: #b32133;
  font-weight: 850;
  white-space: nowrap;
}
.order-cancelled-card { grid-template-columns: 46px minmax(0,1fr); border-color: #df7884; background: linear-gradient(110deg,#ffdfe2,#fff4f5); }
.order-cancelled-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #d92d3f; color: #fff; font-size: 28px; line-height: 1; }
.order-cancelled-card p { margin: 5px 0 0; color: #5d3035; font-size: 14px; }
.order-cancelled-card em { display: block; margin-top: 5px; color: #8e6870; font-size: 11px; font-style: normal; }
.cancel-order-warning { display: block; margin-bottom: 13px; color: #81424a; font-size: 13px; line-height: 1.42; }
.cancel-order-field { display: grid; gap: 6px; margin-top: 10px; text-align: left; }
.cancel-order-field > span { color: #4e3d3f; font-size: 12px; font-weight: 850; }
.cancel-order-field select,
.cancel-order-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #ddb4ba;
  border-radius: 13px;
  background: #fffafa;
  color: #1a211d;
  font: inherit;
}
.cancel-order-field select { height: 47px; }
.cancel-order-field textarea { min-height: 80px; resize: vertical; }

@media (min-width: 1180px) {
  #telegramOrderSheet {
    align-items: flex-start;
    padding: 76px 16px 18px;
  }
  #telegramOrderSheet .telegram-order-sheet {
    max-height: calc(100dvh - 94px);
    border-radius: 22px;
    box-shadow: 0 18px 52px rgba(12,52,34,.24);
  }
  #telegramCreateOrderSheet {
    align-items: stretch;
    justify-content: flex-start;
    /* v8.8.13.17: cover the sidebar too, leaving more of the conversation visible. */
    padding: 76px 16px 14px;
    background: rgba(10,35,25,.10);
    backdrop-filter: none;
  }
  #telegramCreateOrderSheet .telegram-create-order-sheet {
    width: min(720px,55vw);
    height: 100%;
    max-height: none;
    border: 1px solid #a9d6bd;
    border-radius: 22px;
    box-shadow: 18px 18px 48px rgba(12,52,34,.22);
  }
  #telegramCreateOrderSheet .sheet-header { background: linear-gradient(90deg,#e5f7ed,#fff); }
  #telegramCreateOrderSheet .telegram-create-order-footer { border-radius: 0 0 22px 22px; }
}

@media (max-width: 760px) {
  .admin-order-controls { grid-template-columns: 1fr; }
  .admin-order-controls button { width: 100%; }
}

/* v8.8.13.36 — quick replies are a centered dialog, never a bottom sheet. */
#telegramQuickReplySheet.sheet-backdrop {
  align-items: center !important;
  justify-content: center !important;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)) !important;
  overflow: hidden !important;
}

#telegramQuickReplySheet > .telegram-quickreply-sheet {
  position: relative !important;
  inset: auto !important;
  display: flex !important;
  flex-direction: column !important;
  width: min(650px, 100%) !important;
  height: auto !important;
  max-height: min(78dvh, 680px) !important;
  margin: 0 !important;
  transform: none !important;
  border-radius: 22px !important;
  overflow: hidden !important;
}

#telegramQuickReplySheet .sheet-header {
  flex: 0 0 auto;
}

#telegramQuickReplySheet .telegram-quickreply-list {
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 760px) {
  #telegramQuickReplySheet.sheet-backdrop {
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)) !important;
  }
  #telegramQuickReplySheet > .telegram-quickreply-sheet {
    width: 100% !important;
    max-height: min(84dvh, 680px) !important;
    border-radius: 20px !important;
  }
}

/* v8.8.13.34 — control centre, SLA timers, picking barcode and order history. */
.system-control-button { position: relative; }
.system-control-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #db3042;
  color: #fff;
  font-size: 9px;
  font-weight: 950;
}
.system-control-backdrop { align-items: stretch; justify-content: flex-end; padding: 0; }
.system-control-sheet {
  width: min(760px, 100%);
  height: 100dvh;
  max-height: 100dvh;
  padding-bottom: 0;
  border-radius: 24px 0 0 24px;
  box-shadow: -24px 0 70px rgba(5,34,19,.24);
}
.system-control-header { background: linear-gradient(120deg,#e8f8ef,#fff); }
.system-control-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7faf8;
}
.system-control-summary { color: #42564b; font-size: 12px; font-weight: 800; }
.system-control-toolbar button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #8bcdaa;
  border-radius: 12px;
  background: #e3f6eb;
  color: #07683c;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.system-control-body { min-height: 0; overflow: auto; padding: 16px 18px 28px; }
.system-control-loading { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); }
.system-check-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.system-check {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border: 1px solid #cee4d7;
  border-radius: 16px;
  background: #f4fbf7;
}
.system-check > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #cdeedb; color: #077044; font-size: 18px; font-weight: 950; }
.system-check > div { display: grid; gap: 4px; min-width: 0; }
.system-check strong { font-size: 13px; }
.system-check small { color: #6b7b72; font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.system-check.warning { border-color: #efc66c; background: #fff8e8; }
.system-check.warning > span { background: #ffe4a6; color: #925b00; }
.system-check.error { border-color: #e59ba4; background: #fff0f2; }
.system-check.error > span { background: #ffd3d8; color: #b12033; }
.system-order-issues { margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.system-order-issues > header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: #f3f7f5; }
.system-order-issues > header strong { font-size: 13px; }
.system-order-issues > header span { display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 6px; border-radius: 999px; background: #dfeae4; color: #496056; font-size: 10px; font-weight: 900; }
.system-order-issue { width: 100%; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; border: 0; border-top: 1px solid #edf2ef; background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.system-order-issue > span { font-size: 18px; }
.system-order-issue > div { display: grid; gap: 3px; min-width: 0; }
.system-order-issue strong { font-size: 12px; }
.system-order-issue small { color: var(--muted); font-size: 10px; }
.system-order-issue > b { color: #718078; font-size: 20px; }
.system-order-issue.warning { background: #fffbf1; }
.system-order-issue.critical { background: #fff0f2; }
.system-control-empty { grid-column: 1/-1; padding: 24px; color: var(--muted); text-align: center; }
.system-control-empty.success { color: #087744; font-weight: 800; }

/* v8.8.13.54 — основний статус і додаткові відмітки стоять поруч. */
#ordersWorkspace .order-row-status {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 5px 7px;
  min-width: 0;
}
#ordersWorkspace .order-row-status > .order-status-badge,
#ordersWorkspace .order-row-status > .order-probable-payment,
#ordersWorkspace .order-row-status > .order-recipient-data-warning {
  flex: 0 0 auto;
  white-space: nowrap;
}
#ordersWorkspace .order-sla { font-size: 9px; font-weight: 850; color: #64756b; white-space: nowrap; }
#ordersWorkspace .order-sla.warning { color: #a06300; }
#ordersWorkspace .order-sla.critical { color: #bd2033; }

.order-history-card { margin: 10px 0; overflow: hidden; border: 1px solid #d9e7df; border-radius: 16px; background: #fff; }
.order-history-card > summary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.order-history-card > summary::-webkit-details-marker { display: none; }
.order-history-card > summary > span { display: grid; gap: 3px; min-width: 0; }
.order-history-card > summary strong { font-size: 13px; }
.order-history-card > summary small { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-history-card > summary > b { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px; background: #dff3e8; color: #087744; font-size: 10px; }
.order-history-list { max-height: 300px; overflow: auto; border-top: 1px solid #edf2ef; padding: 5px 14px 10px; }
.order-history-list article { display: grid; grid-template-columns: 10px minmax(0,1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid #edf2ef; }
.order-history-list article:last-child { border-bottom: 0; }
.order-history-list i { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #13a961; box-shadow: 0 0 0 3px #e0f5e9; }
.order-history-list article > div { display: grid; gap: 3px; }
.order-history-list strong { font-size: 11px; }
.order-history-list small { color: var(--muted); font-size: 9px; }

#pickingView .picking-header-row { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(230px,330px); align-items: center; gap: 10px; }
#pickingView .picking-scan-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
#pickingView .picking-scan-form input { min-width: 0; height: 38px; padding: 0 11px; border: 1px solid #bddbca; border-radius: 11px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; }
#pickingView .picking-scan-form button { min-height: 38px; padding: 0 13px; border: 0; border-radius: 11px; background: #0aa45c; color: #fff; font: inherit; font-size: 11px; font-weight: 900; }
#pickingView .picking-scan-status { min-height: 14px; margin: 2px 0 0; color: #6c7b73; font-size: 10px; font-weight: 750; text-align: center; }
#pickingView .picking-scan-status.success { color: #087744; }
#pickingView .picking-scan-status.error { color: #bd2033; }

@media (max-width: 760px) {
  .system-control-sheet { border-radius: 0; }
  .system-check-grid { grid-template-columns: 1fr; }
  .system-control-toolbar { align-items: stretch; flex-direction: column; }
  #pickingView .picking-header-row { grid-template-columns: auto minmax(0,1fr); }
  #pickingView .picking-scan-form { grid-column: 1/-1; }
  #pickingView .picking-scan-form input,
  #pickingView .picking-scan-form button { height: 34px; min-height: 34px; }
  #pickingView .picking-scan-status { display: none; }
}

/* v8.8.13.18 — reliable phone scrolling for the main Orders list. */
@media (max-width: 760px) {
  #appView {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    overflow: hidden;
  }
  #appView > .topbar,
  #appView > .hub-sidebar > .main-navigation {
    flex: 0 0 auto;
  }
  #ordersWorkspace {
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    overflow: hidden;
  }
  #ordersWorkspace .orders-pane {
    min-height: 0;
    height: auto;
    overflow: hidden;
  }
  #ordersWorkspace .orders-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding-bottom: calc(30px + var(--safe-bottom));
    scroll-padding-bottom: calc(30px + var(--safe-bottom));
  }
  #ordersWorkspace .load-more { flex: 0 0 auto; }

  #ordersTabButton > span:first-child,
  #telegramTabButton > span:first-child:not(.nav-unread) {
    display: none;
  }
}

/* v8.8.13.23 — one-tap return to the chat list and a larger touch target. */
@media (max-width: 1179px) {
  #telegramWorkspace .telegram-back-button {
    position: relative;
    z-index: 6;
    width: 48px;
    min-width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 15px;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
}

/* v8.8.13.24 — compact mobile order actions and composer without the extra bottom gap. */
@media (max-width: 760px) {
  #telegramWorkspace .telegram-order-bar.is-unlinked {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    flex-wrap: nowrap;
  }

  #telegramWorkspace .telegram-order-bar.is-unlinked .telegram-linked-order {
    width: 100%;
    min-width: 0;
    flex: none;
  }

  #telegramWorkspace .telegram-order-bar.is-unlinked .telegram-create-order-inline,
  #telegramWorkspace .telegram-order-bar.is-unlinked #telegramLinkOrderButton {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    height: auto;
    padding: 8px 7px;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
  }

  #telegramWorkspace .telegram-compose-dock .telegram-composer {
    padding-bottom: 8px;
  }
}

/* v8.8.13.25 — keep the product search fully visible and centered on desktop. */
@media (min-width: 761px) {
  #productSheet.sheet-backdrop {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  #productSheet > .sheet {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    width: min(900px, calc(100vw - 48px));
    height: auto;
    max-height: calc(100dvh - 48px);
    margin: 0;
    transform: none;
    box-sizing: border-box;
    border-radius: 24px;
    overflow: hidden;
  }

  #productSheet .product-results {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
}

/* v8.8.13.26 — Woo product identity with fresh Upanuntsi OS stock overlay. */
.product-stock-label {
  font-weight: 750;
}

.product-stock-label.is-os {
  color: #087c51;
}

.product-stock-label.is-warning {
  color: #a86100;
}

.product-stock-label.is-site {
  color: #66736c;
}

#productSheet .product-result[data-catalog-source="os"] {
  background: #fffaf0;
  border-color: #edcf91;
}

#productSheet .product-result:disabled {
  opacity: .82;
}

/* v8.8.13.29 — exact gram input for products sold by kilogram. */
.telegram-weight-controls {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) auto;
  gap: 8px;
  align-items: end;
  min-width: 230px;
}
.telegram-weight-controls > label { display: grid; gap: 4px; }
.telegram-weight-controls > label > span { color: #687970; font-size: 10px; font-weight: 800; }
.telegram-weight-controls > label > div {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto;
  align-items: center;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid #b7dcca;
  border-radius: 14px;
  background: #fff;
}
.telegram-weight-controls input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 8px 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #17231d;
  font: inherit;
  font-weight: 850;
}
.telegram-weight-controls label b { padding-right: 11px; color: #087744; }
.telegram-weight-controls > strong { align-self: center; color: #087744; white-space: nowrap; }
.telegram-weight-controls > button,
.telegram-weight-presets button {
  min-height: 40px;
  border: 1px solid #9fd4b7;
  border-radius: 12px;
  background: #e6f7ee;
  color: #076b3d;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}
.telegram-weight-controls > button { min-height: 46px; padding: 0 14px; background: #0aa45c; color: #fff; }
.telegram-weight-presets { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.telegram-weight-presets button { min-height: 34px; padding: 0 6px; }
.telegram-weight-controls.is-selected { grid-template-columns: minmax(120px, 1fr) auto; }
.telegram-weight-controls .telegram-weight-remove { background: #fff0f1; border-color: #ffd0d4; color: #bd2434; }
.telegram-create-selected-item.is-weighted { align-items: center; }

@media (max-width: 760px) {
  .telegram-weight-controls { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .telegram-create-selected-item.is-weighted .telegram-weight-controls { grid-column: 1 / -1; }
  .telegram-weight-presets { gap: 4px; }
}

/* v8.8.13.30 — automatic seven-day order archive. */
#ordersWorkspace .orders-view-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
  padding: 4px;
  border: 1px solid #d6e4dc;
  border-radius: 14px;
  background: #f2f7f4;
}
#ordersWorkspace .orders-view-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #617069;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
}
#ordersWorkspace .orders-view-switch button span {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e1eae5;
  color: #526159;
  font-size: 11px;
  font-weight: 900;
}
#ordersWorkspace .orders-view-switch button.active {
  border-color: #8fd2ae;
  background: #fff;
  color: #076a3d;
  box-shadow: 0 4px 12px rgba(17, 91, 53, .10);
}
#ordersWorkspace .orders-view-switch button.active span {
  background: #ccefdc;
  color: #05683b;
}
#ordersWorkspace .order-card.order-row-card.is-archived {
  border-color: #d6ddd9;
  background: linear-gradient(90deg, #f0f3f1, #fff 58%);
  border-left-color: #87968e;
}
#ordersWorkspace .order-card.order-row-card.is-archived.active {
  border-color: #76bb98;
  background: linear-gradient(90deg, #dcefe4, #fff 68%);
  box-shadow: inset 4px 0 #4c8f6d, 0 0 0 2px rgba(76, 143, 109, .12);
}

@media (max-width: 760px) {
  #ordersWorkspace .orders-view-switch { flex: 0 0 auto; }
  #ordersWorkspace .orders-view-switch button { min-height: 44px; font-size: 14px; }
}

/* v8.8.13.31 — compact order status and assignee in the detail header. */
#ordersWorkspace .detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
#ordersWorkspace .detail-title { flex: 0 0 auto; }
#ordersWorkspace .detail-workflow-summary {
  display: grid;
  grid-template-columns: minmax(132px, .8fr) minmax(176px, 1.2fr);
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 8px;
}
#ordersWorkspace .detail-workflow-status,
#ordersWorkspace .detail-workflow-responsible {
  box-sizing: border-box;
  min-width: 0;
  min-height: 58px;
  padding: 8px 12px;
  border: 1px solid #bedfcd;
  border-radius: 14px;
  background: #f0faf4;
}
#ordersWorkspace .detail-workflow-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
}
#ordersWorkspace .detail-workflow-responsible {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 2px 8px;
  border-color: #d6cbed;
  background: #f7f3ff;
  color: #18221d;
  font: inherit;
  text-align: left;
}
#ordersWorkspace .detail-workflow-summary small {
  color: #7a817d;
  font-size: 10px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .04em;
}
#ordersWorkspace .detail-workflow-responsible small { grid-column: 1 / -1; }
#ordersWorkspace .detail-workflow-responsible strong {
  min-width: 0;
  overflow: hidden;
  color: #18221d;
  font-size: 15px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#ordersWorkspace .detail-workflow-responsible em {
  align-self: center;
  color: #078447;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}
#ordersWorkspace .detail-workflow-responsible.can-change {
  cursor: pointer;
  touch-action: manipulation;
}
#ordersWorkspace .detail-workflow-responsible.can-change:hover { border-color: #a994d4; background: #f0eaff; }
#ordersWorkspace .detail-workflow-responsible:disabled { opacity: 1; }
#ordersWorkspace .detail-workflow-status .order-status-badge.large {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#ordersWorkspace .detail-total { flex: 0 0 auto; margin-left: auto; }

@media (max-width: 760px) {
  #ordersWorkspace .detail-header { flex-wrap: wrap; gap: 8px; }
  #ordersWorkspace .detail-title { min-width: 0; }
  #ordersWorkspace .detail-total { margin-left: auto; }
  #ordersWorkspace .detail-workflow-summary {
    order: 3;
    flex: 1 0 100%;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    width: 100%;
    margin: 0;
  }
  #ordersWorkspace .detail-workflow-status,
  #ordersWorkspace .detail-workflow-responsible { min-height: 52px; padding: 7px 9px; }
  #ordersWorkspace .detail-workflow-responsible strong { font-size: 14px; }
}

/* v8.8.13.32 — one-screen picking: product image left, controls right. */
body.picking-open { overflow: hidden !important; }
#pickingView.picking-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
#pickingView.picking-view.hidden { display: none; }
#pickingView .picking-header {
  padding: 10px 18px 8px;
}
#pickingView .picking-header-row {
  min-height: 42px;
}
#pickingView .picking-title strong { font-size: 18px; }
#pickingView .picking-title span { font-size: 12px; }
#pickingView .picking-progress-row { margin-top: 4px; font-size: 12px; }
#pickingView .progress-track { height: 8px; margin-top: 5px; }
#pickingView .picking-body {
  display: grid;
  min-width: 0;
  min-height: 0;
  padding: 12px 24px;
  overflow: hidden;
  place-items: center;
}
#pickingView .picking-card {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(240px, 38%) minmax(360px, 1fr);
  grid-template-rows: auto auto auto auto;
  align-content: center;
  align-items: center;
  column-gap: clamp(24px, 4vw, 58px);
  row-gap: 10px;
  width: min(1120px, 100%);
  max-width: 1120px;
  min-height: 0;
  max-height: 100%;
  margin: 0 auto;
  padding: clamp(16px, 2.2vh, 24px);
  overflow: hidden;
}
#pickingView .product-image-button {
  display: grid;
  place-items: center;
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  width: 100%;
  height: min(48dvh, 420px);
  min-height: 220px;
  max-height: 420px;
  margin: 0;
  padding: 14px;
}
#pickingView .product-image-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
#pickingView .picking-product {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  text-align: left;
}
#pickingView .picking-product h1 {
  display: -webkit-box;
  margin: 0 0 7px;
  overflow: hidden;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.12;
  text-align: left;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
#pickingView .picking-codes,
#pickingView .picking-price { justify-content: flex-start; text-align: left; }
#pickingView .picking-note {
  display: -webkit-box;
  max-height: 44px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
#pickingView .need-box {
  justify-content: flex-start;
  margin: 10px 0 0;
}
#pickingView .need-box strong { font-size: clamp(28px, 3vw, 42px); }
#pickingView .quantity-caption {
  grid-column: 2;
  grid-row: 2;
  margin: 2px 0 -3px;
  text-align: left;
}
#pickingView .quantity-stepper {
  grid-column: 2;
  grid-row: 3;
  width: min(420px, 100%);
  margin: 0;
}
#pickingView .quantity-stepper button,
#pickingView .quantity-stepper input { min-height: 52px; }
#pickingView .pick-actions {
  grid-column: 2;
  grid-row: 4;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(150px, .75fr);
  gap: 10px;
  width: 100%;
  margin: 0;
}
#pickingView .pick-actions button {
  min-height: 54px;
  padding: 10px 14px;
  font-size: 15px;
}
#pickingView .pick-actions-inline {
  grid-row: 2 / 5;
  align-self: end;
}
#pickingView .pick-state-panel {
  grid-column: 2;
  grid-row: 2 / 5;
  width: 100%;
  margin: 0;
}
#pickingView .picking-footer {
  min-height: 72px;
  padding: 8px 18px max(8px, env(safe-area-inset-bottom));
}
#pickingView .picking-footer > button {
  width: 54px;
  height: 54px;
}
#pickingView .picking-footer-total strong { font-size: 20px; }

@media (max-width: 760px) {
  #pickingView .picking-header { padding: 6px 10px 5px; }
  #pickingView .picking-header-row { min-height: 36px; }
  #pickingView .picking-title strong { font-size: 15px; }
  #pickingView .picking-progress-row { margin-top: 2px; }
  #pickingView .progress-track { height: 6px; margin-top: 3px; }
  #pickingView .picking-body { padding: 6px 9px; }
  #pickingView .picking-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
    align-content: center;
    gap: 5px;
    width: 100%;
    height: 100%;
    padding: 8px 10px;
  }
  #pickingView .product-image-button {
    grid-column: 1;
    grid-row: 1;
    width: min(100%, 360px);
    height: min(24dvh, 210px);
    min-height: 110px;
    margin: 0 auto;
    padding: 7px;
  }
  #pickingView .picking-product {
    grid-column: 1;
    grid-row: 2;
    text-align: center;
  }
  #pickingView .picking-product h1 {
    margin-bottom: 3px;
    font-size: clamp(18px, 5.2vw, 24px);
    line-height: 1.08;
    text-align: center;
  }
  #pickingView .picking-codes,
  #pickingView .picking-price { justify-content: center; text-align: center; font-size: 11px; }
  #pickingView .picking-note { max-height: 32px; font-size: 11px; }
  #pickingView .need-box { justify-content: center; margin-top: 4px; }
  #pickingView .need-box strong { font-size: 28px; }
  #pickingView .quantity-caption { grid-column: 1; grid-row: 3; margin: 0; text-align: center; font-size: 11px; }
  #pickingView .quantity-stepper { grid-column: 1; grid-row: 4; width: min(330px, 100%); margin: 0 auto; }
  #pickingView .quantity-stepper button,
  #pickingView .quantity-stepper input { min-height: 44px; height: 44px; }
  #pickingView .pick-actions {
    grid-column: 1;
    grid-row: 5;
    grid-template-columns: minmax(0, 1.35fr) minmax(112px, .65fr);
    gap: 7px;
  }
  #pickingView .pick-actions button { min-height: 46px; padding: 7px 8px; font-size: 12px; }
  #pickingView .pick-actions-inline { grid-row: 3 / 6; align-self: center; }
  #pickingView .pick-state-panel { grid-column: 1; grid-row: 3 / 6; }
  #pickingView .picking-footer { min-height: 58px; padding: 5px 10px max(5px, env(safe-area-inset-bottom)); }
  #pickingView .picking-footer > button { width: 46px; height: 46px; }
  #pickingView .picking-footer-total span,
  #pickingView .picking-footer-total small { font-size: 10px; }
  #pickingView .picking-footer-total strong { font-size: 17px; }
}

@media (max-height: 700px) and (min-width: 761px) {
  #pickingView .picking-header { padding-block: 6px 5px; }
  #pickingView .picking-body { padding-block: 7px; }
  #pickingView .picking-card { padding-block: 10px; row-gap: 6px; }
  #pickingView .product-image-button { height: min(42dvh, 310px); min-height: 180px; }
  #pickingView .picking-product h1 { font-size: 24px; }
  #pickingView .quantity-stepper button,
  #pickingView .quantity-stepper input,
  #pickingView .pick-actions button { min-height: 46px; }
  #pickingView .picking-footer { min-height: 60px; }
}

/* v8.8.13.33 — force the complete product image into the exact centre. */
#pickingView .product-image-button {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  justify-self: center;
  width: min(100%, 48dvh, 420px) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: min(48dvh, 420px) !important;
  aspect-ratio: 1 / 1;
  overflow: hidden !important;
  padding: 16px !important;
  background: #fff !important;
}
#pickingView .product-image-button > img {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: calc(100% - 32px) !important;
  max-height: calc(100% - 32px) !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: 50% 50% !important;
  transform: translate(-50%, -50%) !important;
  transform-origin: center center !important;
}

/* The order timestamp stays visible beside the number in both lists and detail. */
#ordersWorkspace .detail-title .detail-order-created {
  display: block;
  margin-top: 2px;
  color: #718078;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 760px) {
  #pickingView .product-image-button {
    width: min(100%, 24dvh, 210px) !important;
    max-height: min(24dvh, 210px) !important;
    padding: 8px !important;
  }
  #pickingView .product-image-button > img {
    max-width: calc(100% - 16px) !important;
    max-height: calc(100% - 16px) !important;
  }
}

/* v8.8.13.35 — explicit audited removal from the WooCommerce order while picking. */
#pickingView .pick-delete-item {
  border: 1px solid #ef9da5;
  background: #fff1f2;
  color: #b51f31;
  font-weight: 900;
}
#pickingView .pick-actions:not(.pick-actions-inline) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#pickingView .pick-actions:not(.pick-actions-inline) .pick-primary {
  grid-column: 1 / -1;
}
#pickingView .pick-actions-inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#pickingView .pick-state-panel .pick-delete-item {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border-radius: 13px;
}

@media (max-width: 760px) {
  #pickingView .pick-actions-inline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #pickingView .pick-actions-inline .pick-delete-item {
    font-size: 0;
  }
  #pickingView .pick-actions-inline .pick-delete-item::before {
    content: "🗑";
    font-size: 18px;
  }
}

/* v8.8.13.38 — the completed-picking screen fits without routine scrolling. */
#pickingView .picking-body.completion-mode {
  box-sizing: border-box;
  padding: clamp(7px, 1.4vh, 14px) 18px;
  overflow-x: hidden;
  overflow-y: auto;
  place-items: center;
}
#pickingView .completion-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: min(640px, 100%);
  max-width: 640px;
  max-height: 100%;
  margin: 0 auto;
  padding: clamp(14px, 2vh, 20px) 22px;
  overflow-x: hidden;
  overflow-y: auto;
}
#pickingView .completion-icon {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  margin: 0 auto 2px;
  font-size: 34px;
  line-height: 58px;
}
#pickingView .completion-card h1 {
  margin: 0;
  font-size: clamp(23px, 2.1vw, 28px);
  line-height: 1.1;
  text-align: center;
}
#pickingView .completion-card > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
}
#pickingView .completion-summary {
  display: grid;
  gap: 3px;
  margin: 4px 0 0;
  padding: 10px 15px;
  border-radius: 16px;
}
#pickingView .completion-summary > div {
  min-height: 25px;
  line-height: 1.2;
}
#pickingView .completion-summary .grand {
  min-height: 34px;
  margin-top: 3px;
  padding-top: 7px;
}
#pickingView .completion-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}
#pickingView .completion-actions > button,
#pickingView .completion-ttn-actions > button {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 8px 11px;
  font-size: 14px;
  line-height: 1.15;
}
#pickingView .completion-actions .completion-stage-print-button {
  border: 1px solid #087b4a;
  background: #fff;
  color: #087b4a;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(8, 123, 74, .18);
}
#pickingView .completion-actions .completion-stage-print-button:hover,
#pickingView .completion-actions .completion-stage-print-button.is-paid {
  background: #087b4a;
  color: #fff;
}
#pickingView .completion-actions .completion-back-button,
#pickingView .completion-actions .completion-ttn-actions,
#pickingView .completion-actions .completion-shipped {
  grid-column: 1 / -1;
}
#pickingView .completion-ttn-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (max-height: 700px) and (min-width: 421px) {
  #pickingView .picking-body.completion-mode { padding-block: 5px; }
  #pickingView .completion-card { gap: 5px; padding: 10px 18px; }
  #pickingView .completion-icon { width: 46px; height: 46px; font-size: 28px; line-height: 46px; }
  #pickingView .completion-card h1 { font-size: 22px; }
  #pickingView .completion-summary { margin-top: 2px; padding: 7px 13px; }
  #pickingView .completion-summary > div { min-height: 22px; }
  #pickingView .completion-summary .grand { min-height: 29px; padding-top: 5px; }
  #pickingView .completion-actions { gap: 6px; margin-top: 2px; }
  #pickingView .completion-actions > button,
  #pickingView .completion-ttn-actions > button { min-height: 42px; padding-block: 6px; }
}

@media (max-width: 760px) {
  #pickingView .picking-body.completion-mode { padding: 5px 8px; }
  #pickingView .completion-card { gap: 6px; width: min(480px, 100%); padding: 10px 12px; }
  #pickingView .completion-icon { width: 48px; height: 48px; font-size: 28px; line-height: 48px; }
  #pickingView .completion-card h1 { font-size: 21px; }
  #pickingView .completion-card > p { font-size: 12px; }
  #pickingView .completion-summary { padding: 7px 11px; }
  #pickingView .completion-summary > div { min-height: 22px; font-size: 13px; }
  #pickingView .completion-summary .grand { min-height: 28px; }
  #pickingView .completion-actions { gap: 6px; }
  #pickingView .completion-actions > button,
  #pickingView .completion-ttn-actions > button { min-height: 42px; padding: 6px 8px; font-size: 12px; }
}

@media (max-width: 420px) {
  #pickingView .completion-actions { grid-template-columns: 1fr; }
  #pickingView .completion-actions .completion-back-button,
  #pickingView .completion-actions .completion-ttn-actions,
  #pickingView .completion-actions .completion-shipped { grid-column: 1; }
  #pickingView .completion-ttn-actions { grid-template-columns: 1fr; }
}

/* v8.8.13.44 — stage-aware 80 mm receipts after payment details and payment confirmation. */
#ordersWorkspace .receipt-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
#ordersWorkspace .print-items-button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #9ec8b2;
  border-radius: 11px;
  background: #fff;
  color: #075f39;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}
#ordersWorkspace .print-items-button:hover {
  background: #e8f7ef;
  border-color: #62bd8b;
}
@media (max-width: 520px) {
  #ordersWorkspace .receipt-head { align-items: flex-start; }
  #ordersWorkspace .receipt-head-actions { gap: 6px; }
  #ordersWorkspace .print-items-button,
  #ordersWorkspace .add-item-button { min-height: 38px; padding-inline: 10px; font-size: 12px; }
}

/* v8.8.13.46 — PrivatBank probable-payment review. */
#ordersWorkspace .order-probable-payment {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid #e1b74f;
  border-radius: 999px;
  background: #fff0bd;
  color: #795000;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
#ordersWorkspace .privat-payment-card {
  margin: 12px 0 14px;
  overflow: hidden;
  border: 1px solid #e1b34c;
  border-radius: 18px;
  background: linear-gradient(120deg,#fff5cf,#fffdf5 72%);
  box-shadow: 0 8px 24px rgba(126,86,0,.08);
}
#ordersWorkspace .privat-payment-card > header {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  gap: 11px;
  align-items: center;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(180,133,25,.20);
}
#ordersWorkspace .privat-payment-card > header > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #ffd867;
  color: #714800;
  font-size: 22px;
  font-weight: 950;
}
#ordersWorkspace .privat-payment-card > header > div { min-width: 0; }
#ordersWorkspace .privat-payment-card > header small {
  display: block;
  color: #8b6718;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
#ordersWorkspace .privat-payment-card > header strong {
  display: block;
  margin-top: 2px;
  color: #5f4300;
  font-size: 18px;
}
#ordersWorkspace .privat-payment-card > header em {
  display: block;
  margin-top: 3px;
  color: #8b7440;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}
#ordersWorkspace .privat-payment-list { display: grid; }
#ordersWorkspace .privat-payment-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 15px;
  border-top: 1px solid rgba(180,133,25,.16);
}
#ordersWorkspace .privat-payment-row:first-child { border-top: 0; }
#ordersWorkspace .privat-payment-main { min-width: 0; }
#ordersWorkspace .privat-payment-row b {
  display: block;
  color: #24472f;
  font-size: 20px;
}
#ordersWorkspace .privat-payment-row span {
  display: block;
  margin-top: 3px;
  color: #43594a;
  font-size: 13px;
  font-weight: 800;
}
#ordersWorkspace .privat-payment-row small,
#ordersWorkspace .privat-payment-row em {
  display: block;
  margin-top: 3px;
  color: #7a806f;
  font-size: 10px;
  font-style: normal;
}
#ordersWorkspace .privat-payment-row p {
  margin: 6px 0 0;
  color: #6e654b;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
#ordersWorkspace .privat-payment-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}
#ordersWorkspace .privat-payment-actions button {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #13925a;
  border-radius: 12px;
  background: #0a9d59;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
#ordersWorkspace .privat-payment-actions button.secondary {
  border-color: #d6c796;
  background: #fff;
  color: #715c22;
}
#ordersWorkspace .privat-payment-card.confirmed {
  border-color: #75c596;
  background: linear-gradient(120deg,#e4f7eb,#f9fdfb 72%);
}
#ordersWorkspace .privat-payment-card.confirmed > header { border-bottom-color: rgba(14,126,72,.15); }
#ordersWorkspace .privat-payment-card.confirmed > header > span { background: #bdebd0; color: #087844; }
#ordersWorkspace .privat-payment-card.confirmed > header small { color: #448364; }
#ordersWorkspace .privat-payment-card.confirmed > header strong { color: #087844; }
@media(max-width:760px){
  #ordersWorkspace .privat-payment-row { grid-template-columns: 1fr; }
  #ordersWorkspace .privat-payment-actions { width: 100%; }
  #ordersWorkspace .privat-payment-actions button { flex: 1; }
  #ordersWorkspace .order-probable-payment { white-space: normal; line-height: 1.15; }
}


/* v8.8.13.47 — Banking workspace + scrollable tall receipt/photo viewer. */
@media (min-width: 1180px) {
  #appView > .banking-workspace { grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; }
}

#bankingWorkspace.banking-workspace {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  padding: 12px;
  overflow: hidden;
  background: #f6f4ee;
}
.banking-shell {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dfe7e1;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20,54,37,.05);
}
.banking-header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.banking-header small { display:block; color:#34805d; font-size:11px; font-weight:850; text-transform:uppercase; letter-spacing:.04em; }
.banking-header h1 { margin:2px 0 0; font-size:27px; line-height:1.1; }
.banking-header p { margin:5px 0 0; color:#66766d; font-size:12px; }
.banking-refresh { min-height:42px; padding:0 15px; border:1px solid #79cfa5; border-radius:12px; background:#e7f7ee; color:#087744; font:inherit; font-weight:900; cursor:pointer; }
.banking-refresh:disabled { opacity:.6; cursor:wait; }
.banking-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.banking-metrics article { display:grid; gap:3px; padding:11px 13px; border:1px solid #dfe7e1; border-radius:14px; background:#f8fbf9; }
.banking-metrics small { color:#697970; font-size:10px; font-weight:850; text-transform:uppercase; }
.banking-metrics strong { font-size:22px; color:#173e2e; }
.banking-metrics article.money { background:#f3faf6; border-color:#cfe7d9; }
.banking-metrics article.probable { background:#fff7df; border-color:#edd797; }
.banking-metrics article.probable strong { color:#9a6500; }
.banking-metrics article.confirmed { background:#eaf8f0; border-color:#bfe3cd; }
.banking-metrics article.confirmed strong { color:#087844; }
.banking-toolbar { display:flex; align-items:center; gap:12px; }
.banking-search-wrap { flex:1 1 auto; margin:0 !important; }
.banking-updated { flex:0 0 auto; color:#76847c; font-size:11px; }
.banking-list { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; border:1px solid #e2eae5; border-radius:15px; background:#fff; }
.banking-payment-row { display:grid; grid-template-columns:145px minmax(260px,1.2fr) minmax(210px,.9fr) 150px; gap:12px; align-items:center; padding:12px 14px; border-bottom:1px solid #edf2ef; }
.banking-payment-row:last-child { border-bottom:0; }
.banking-payment-row.probable { background:linear-gradient(90deg,#fff9e9,#fff 44%); }
.banking-payment-row.confirmed { background:linear-gradient(90deg,#edf9f2,#fff 44%); }
.banking-payment-amount { display:grid; gap:4px; }
.banking-payment-amount strong { font-size:20px; color:#0b5d36; }
.banking-payment-amount span { color:#6d7c73; font-size:11px; }
.banking-payment-copy { min-width:0; display:grid; gap:3px; }
.banking-payment-copy > strong { font-size:14px; }
.banking-payment-copy .banking-account { color:#7a8980; font-size:10px; overflow-wrap:anywhere; }
.banking-payment-copy p { margin:3px 0 0; color:#42564a; font-size:11px; line-height:1.4; overflow-wrap:anywhere; }
.banking-payment-copy p.muted { color:#93a098; }
.banking-payment-order { display:grid; gap:5px; }
.banking-order-link { width:100%; min-width:0; display:grid; grid-template-columns:auto minmax(0,1fr); gap:2px 8px; align-items:center; padding:7px 9px; border:1px solid #d7e4dc; border-radius:10px; background:#f8fbf9; color:#173e2e; font:inherit; text-align:left; cursor:pointer; }
.banking-order-link small { font-size:9px; color:#6e7e74; text-transform:uppercase; }
.banking-order-link strong { font-size:12px; }
.banking-order-link span { grid-column:1/-1; font-size:9px; color:#708077; overflow-wrap:anywhere; }
.banking-order-link.confirmed { border-color:#a9d8bc; background:#edf9f2; }
.banking-order-link.probable { border-color:#e6cc7e; background:#fff8e5; }
.banking-no-order { color:#8b9790; font-size:11px; }
.banking-payment-state { display:grid; justify-items:end; gap:5px; text-align:right; }
.banking-payment-state > span { display:inline-flex; align-items:center; min-height:26px; padding:0 9px; border-radius:999px; font-size:10px; font-weight:900; white-space:nowrap; }
.banking-payment-state > span.confirmed { background:#dff5e8; color:#087844; }
.banking-payment-state > span.probable { background:#fff0be; color:#8b5c00; }
.banking-payment-state > span.unmatched { background:#eef1ef; color:#647169; }
.banking-payment-state > span.rejected { background:#f5eded; color:#8a5050; }
.banking-payment-state small { max-width:140px; overflow:hidden; text-overflow:ellipsis; color:#87938c; font-size:9px; white-space:nowrap; }
.banking-empty { min-height:240px; display:grid; place-items:center; align-content:center; gap:6px; padding:30px; color:#718077; text-align:center; }
.banking-empty strong { color:#254837; font-size:17px; }
.banking-empty span { max-width:520px; font-size:12px; line-height:1.45; }
.banking-empty.error strong { color:#a23838; }

/* A tall receipt/photo must scroll inside the viewer instead of being clipped. */
#imageViewer.image-viewer {
  align-items:flex-start !important;
  justify-content:center !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding:72px 12px 36px !important;
  touch-action:pan-y pinch-zoom;
}
#imageViewer.image-viewer > img {
  display:block !important;
  width:auto !important;
  max-width:min(96vw,1600px) !important;
  height:auto !important;
  max-height:none !important;
  flex:0 0 auto !important;
  object-fit:contain !important;
  margin:0 auto 24px !important;
}
#imageViewer.image-viewer .image-close {
  position:fixed !important;
  top:max(10px,var(--safe-top,0px)) !important;
  right:12px !important;
  z-index:3 !important;
}

@media (max-width: 900px) {
  #bankingWorkspace.banking-workspace { padding:7px; overflow:hidden; }
  .banking-shell { padding:10px; border-radius:14px; }
  .banking-header { align-items:stretch; flex-direction:column; gap:9px; }
  .banking-header h1 { font-size:23px; }
  .banking-refresh { width:100%; }
  .banking-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .banking-toolbar { align-items:stretch; flex-direction:column; gap:5px; }
  .banking-updated { align-self:flex-end; }
  .banking-payment-row { grid-template-columns:1fr auto; gap:8px 10px; align-items:start; padding:11px; }
  .banking-payment-copy { grid-column:1/-1; }
  .banking-payment-order { grid-column:1/-1; }
  .banking-payment-state { grid-column:2; grid-row:1; }
  .banking-payment-amount { grid-column:1; grid-row:1; }
  #ordersTabButton > span:first-child,
  #telegramTabButton > span:first-child:not(.nav-unread),
  #bankingTabButton > span:first-child:not(.nav-unread) { display:none; }
}

/* AI is intentionally available only from the active chat. */
#aiHubButton { display:none !important; }

/* v8.8.13.48 — verified recipient details + visible payment/data attention. */
#ordersWorkspace .order-card.order-row-card.has-probable-payment {
  background: linear-gradient(90deg,#fff0b8 0%,#fff9e6 34%,#fff 72%) !important;
  border-color:#e3ba3e !important;
  border-left:5px solid #e29a00 !important;
  box-shadow:0 5px 16px rgba(165,112,0,.11);
}
#ordersWorkspace .order-card.order-row-card.needs-recipient-data:not(.has-probable-payment) {
  border-left:5px solid #d85f45 !important;
}
#ordersWorkspace .order-probable-payment,
#ordersWorkspace .order-recipient-data-warning {
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  line-height:1.1;
}
#ordersWorkspace .order-probable-payment { background:#ffe49a; color:#765000; border:1px solid #e6c35c; }
#ordersWorkspace .order-recipient-data-warning { background:#ffe6df; color:#9a3927; border:1px solid #efb2a3; }

#ordersWorkspace .recipient-details-card {
  margin-top:10px;
  padding:13px;
  border:2px solid #bddcc9;
  border-radius:16px;
  background:#f7fbf8;
  box-shadow:0 8px 24px rgba(18,74,46,.05);
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
#ordersWorkspace .recipient-details-card.incomplete {
  border-color:#e39a81;
  background:linear-gradient(135deg,#fff4ef,#fff 65%);
  box-shadow:0 8px 24px rgba(151,62,32,.08);
}
#ordersWorkspace .recipient-details-card.attention {
  border-color:#e4603d;
  box-shadow:0 0 0 4px rgba(228,96,61,.16),0 12px 30px rgba(151,62,32,.12);
  transform:translateY(-1px);
}
#ordersWorkspace .recipient-details-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
#ordersWorkspace .recipient-details-head > div { min-width:0; display:grid; gap:2px; }
#ordersWorkspace .recipient-details-head small { color:#60756a; font-size:10px; font-weight:850; text-transform:uppercase; letter-spacing:.035em; }
#ordersWorkspace .recipient-details-head strong { color:#173f2d; font-size:17px; }
#ordersWorkspace .recipient-details-head > span { flex:0 0 auto; min-height:28px; display:inline-flex; align-items:center; padding:0 9px; border-radius:999px; background:#dff3e7; color:#087744; font-size:10px; font-weight:900; }
#ordersWorkspace .recipient-details-card.incomplete .recipient-details-head > span { background:#ffe0d6; color:#9d3b25; }
#ordersWorkspace .recipient-details-note { margin:9px 0 10px; padding:8px 10px; border-radius:10px; background:#fff0e9; color:#7b3f2d; font-size:11px; line-height:1.45; }
#ordersWorkspace .recipient-details-note.ok { background:#eaf7ef; color:#276444; }
#ordersWorkspace .recipient-details-fields { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(180px,.85fr); gap:9px; }
#ordersWorkspace .recipient-details-fields label { display:grid; gap:5px; min-width:0; }
#ordersWorkspace .recipient-details-fields label.wide { grid-column:1/-1; }
#ordersWorkspace .recipient-details-fields label > span { color:#50665a; font-size:10px; font-weight:850; }
#ordersWorkspace .recipient-details-fields label > span b { color:#c74a2d; }
#ordersWorkspace .recipient-details-fields input {
  width:100%; min-width:0; height:40px; padding:0 11px;
  border:1px solid #cddbd2; border-radius:10px; background:#fff; color:#18382a;
  font:inherit; font-size:13px; outline:none;
}
#ordersWorkspace .recipient-details-fields input:focus { border-color:#33a96e; box-shadow:0 0 0 3px rgba(51,169,110,.12); }
#ordersWorkspace .recipient-details-card.incomplete .recipient-details-fields input { border-color:#e8c1b5; }
#ordersWorkspace .recipient-details-card footer { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:10px; }
#ordersWorkspace .recipient-details-card footer small { max-width:70%; color:#6c7c73; font-size:10px; line-height:1.35; }
#ordersWorkspace .recipient-details-card footer button,
#ordersWorkspace .next-action-card.delivery-required button {
  min-height:38px; padding:0 13px; border:0; border-radius:10px; background:#0e7a49; color:#fff; font:inherit; font-size:12px; font-weight:900; cursor:pointer;
}
#ordersWorkspace .recipient-details-card footer button:disabled { opacity:.6; cursor:wait; }
#ordersWorkspace .next-action-card.delivery-required { border-color:#efb29e; background:linear-gradient(135deg,#fff0e9,#fff); }
#ordersWorkspace .next-action-card.delivery-required strong { color:#9a3c25; }
#ordersWorkspace .next-action-card.delivery-required button { background:#c95335; }

#telegramWorkspace .telegram-chat-card.has-probable-payment {
  background:linear-gradient(90deg,#fff0b9,#fff9e7 52%,#fff) !important;
  border-color:#e3ba3e !important;
  box-shadow:inset 4px 0 #e29a00,0 4px 14px rgba(151,105,0,.08);
}
#telegramWorkspace .telegram-chat-card.needs-recipient-data:not(.has-probable-payment) {
  box-shadow:inset 4px 0 #d85f45;
}
#telegramWorkspace .telegram-chat-card-foot { display:flex; align-items:center; justify-content:space-between; gap:6px; }
#telegramWorkspace .telegram-chat-card-flags { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:4px; }
#telegramWorkspace .telegram-chat-card-flags b { display:inline-flex; align-items:center; min-height:19px; padding:2px 6px; border-radius:999px; font-size:8px; font-style:normal; font-weight:900; white-space:nowrap; }
#telegramWorkspace .telegram-chat-card-flags b.payment { background:#ffe49a; color:#725000; }
#telegramWorkspace .telegram-chat-card-flags b.data { background:#ffe2d8; color:#943a25; }
#telegramWorkspace .telegram-order-chip.has-probable-payment { border-color:#e0b842; background:linear-gradient(90deg,#fff2c4,#fff); }
#telegramWorkspace .telegram-order-chip.needs-recipient-data:not(.has-probable-payment) { border-color:#e4a18d; background:linear-gradient(90deg,#fff0eb,#fff); }
#telegramWorkspace .telegram-order-attention { display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
#telegramWorkspace .telegram-order-attention.hidden { display:none; }
#telegramWorkspace .telegram-order-attention span { display:inline-flex; align-items:center; min-height:25px; padding:0 8px; border-radius:999px; font-size:9px; font-weight:900; white-space:nowrap; }
#telegramWorkspace .telegram-order-attention span.payment { background:#ffe49a; color:#725000; border:1px solid #dfbd55; }
#telegramWorkspace .telegram-order-attention span.data { background:#ffe3db; color:#953b27; border:1px solid #eab5a6; }

@media (max-width:900px) {
  #ordersWorkspace .recipient-details-fields { grid-template-columns:1fr; }
  #ordersWorkspace .recipient-details-fields label.wide { grid-column:auto; }
  #ordersWorkspace .recipient-details-card footer { align-items:stretch; flex-direction:column; }
  #ordersWorkspace .recipient-details-card footer small { max-width:none; }
  #ordersWorkspace .recipient-details-card footer button { width:100%; min-height:42px; }
  #telegramWorkspace .telegram-order-attention { order:4; width:100%; margin-top:4px; }
}

/* v8.8.13.49 — edit recipient details inside the open chat. */
#telegramWorkspace .telegram-recipient-button {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid #78c79c;
  border-radius: 13px;
  background: #e6f7ed;
  color: #08643c;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
#telegramWorkspace .telegram-recipient-button.hidden { display: none; }
#telegramWorkspace .telegram-recipient-button.needs-data {
  border-color: #e4a15d;
  background: linear-gradient(135deg, #fff0ca, #fff9e8);
  color: #815000;
  box-shadow: 0 4px 12px rgba(168,105,0,.10);
}
#telegramWorkspace .telegram-recipient-button.complete {
  border-color: #67bd8b;
  background: #ddf5e7;
  color: #087244;
}
@media (hover:hover) and (pointer:fine) {
  #telegramWorkspace .telegram-recipient-button:hover { transform: translateY(-1px); border-color: #3da971; background: #ccefdc; }
  #telegramWorkspace .telegram-recipient-button.needs-data:hover { border-color: #cf842e; background: #ffe7ae; }
}

#telegramWorkspace .telegram-order-attention button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}
#telegramWorkspace .telegram-order-attention button.data {
  border: 1px solid #eab5a6;
  background: #ffe3db;
  color: #953b27;
}
#telegramWorkspace .telegram-order-attention button.data:hover { background: #ffd2c6; border-color: #db8e78; }

#telegramWorkspace .telegram-chat-pane { overflow: hidden; }
#telegramWorkspace .telegram-recipient-backdrop {
  position: absolute;
  inset: 0;
  z-index: 54;
  background: rgba(4, 35, 20, .10);
  backdrop-filter: blur(1px);
}
#telegramWorkspace .telegram-recipient-backdrop.hidden { display: none; }
#telegramWorkspace .telegram-recipient-panel {
  position: absolute;
  z-index: 55;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 48%);
  display: flex;
  flex-direction: column;
  min-width: 350px;
  background: #fbfdfb;
  border-left: 1px solid #bddbc9;
  box-shadow: -22px 0 58px rgba(7, 52, 29, .22);
  transform: translateX(104%);
  transition: transform .22s ease;
  pointer-events: none;
  visibility: hidden;
}
#telegramWorkspace .telegram-recipient-panel.open {
  transform: translateX(0);
  pointer-events: auto;
  visibility: visible;
}
#telegramWorkspace .telegram-recipient-panel-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 14px 16px;
  border-bottom: 1px solid #d7e7dd;
  background: linear-gradient(135deg, #e9f8ef, #fffaf0);
}
#telegramWorkspace .telegram-recipient-panel-head > div { min-width: 0; display: grid; gap: 3px; }
#telegramWorkspace .telegram-recipient-panel-head small {
  color: #4c7c62;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#telegramWorkspace .telegram-recipient-panel-head strong { color: #123b29; font-size: 21px; }
#telegramWorkspace .telegram-recipient-panel-head button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid #c9ddd1;
  border-radius: 13px;
  background: #fff;
  color: #53675c;
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
#telegramWorkspace .telegram-recipient-panel-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 15px 16px calc(20px + env(safe-area-inset-bottom));
}
#telegramWorkspace .telegram-recipient-progress {
  display: grid;
  gap: 10px;
  padding: 13px;
  margin-bottom: 12px;
  border: 1px solid #d8e8de;
  border-radius: 16px;
  background: #fff;
}
#telegramWorkspace .telegram-recipient-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#telegramWorkspace .telegram-recipient-progress span { color: #556b5e; font-size: 11px; font-weight: 800; }
#telegramWorkspace .telegram-recipient-progress b {
  padding: 5px 8px;
  border-radius: 999px;
  background: #ffe6d9;
  color: #983d25;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
#telegramWorkspace .telegram-recipient-progress b.complete { background: #d9f3e4; color: #087345; }
#telegramWorkspace .telegram-recipient-progress-track {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eee9;
}
#telegramWorkspace .telegram-recipient-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #efad3f, #0aa55e);
  transition: width .18s ease;
}
#telegramWorkspace .telegram-recipient-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#telegramWorkspace .telegram-recipient-tools button {
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid #80c9a1;
  border-radius: 12px;
  background: #e7f7ee;
  color: #08623b;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
#telegramWorkspace .telegram-recipient-tools button:last-child { border-color: #d9b96a; background: #fff7df; color: #735000; }
#telegramWorkspace .telegram-recipient-tools button:disabled { opacity: .6; cursor: wait; }
#telegramWorkspace .telegram-recipient-extract-note {
  margin: 8px 1px 13px;
  color: #65766c;
  font-size: 10px;
  line-height: 1.45;
}
#telegramWorkspace .telegram-recipient-extract-note.success { color: #087346; }
#telegramWorkspace .telegram-recipient-extract-note.warning { color: #9a4b24; }
#telegramWorkspace .telegram-recipient-form { display: grid; gap: 11px; }
#telegramWorkspace .telegram-recipient-form label {
  display: grid;
  gap: 6px;
  padding: 11px;
  border: 1px solid #dce8e1;
  border-radius: 14px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
#telegramWorkspace .telegram-recipient-form label > span { color: #274b38; font-size: 11px; font-weight: 900; }
#telegramWorkspace .telegram-recipient-form label > span b { color: #c9432d; }
#telegramWorkspace .telegram-recipient-form label > small { color: #7a8980; font-size: 9px; line-height: 1.35; }
#telegramWorkspace .telegram-recipient-form input,
#telegramWorkspace .telegram-recipient-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbdcd2;
  border-radius: 11px;
  background: #fbfdfc;
  color: #173a28;
  font: inherit;
  font-size: 14px;
  outline: none;
}
#telegramWorkspace .telegram-recipient-form input { min-height: 43px; padding: 0 11px; }
#telegramWorkspace .telegram-recipient-form textarea { min-height: 92px; padding: 10px 11px; resize: vertical; line-height: 1.4; }
#telegramWorkspace .telegram-recipient-form input:focus,
#telegramWorkspace .telegram-recipient-form textarea:focus { border-color: #43ad75; box-shadow: 0 0 0 3px rgba(67,173,117,.13); background: #fff; }
#telegramWorkspace .telegram-recipient-form label.is-complete { border-color: #a9d9bd; background: #f6fcf8; }
#telegramWorkspace .telegram-recipient-form label.is-invalid { border-color: #e6917c; background: #fff7f4; box-shadow: 0 0 0 2px rgba(218,83,51,.08); }
#telegramWorkspace .telegram-recipient-form-error { min-height: 16px; color: #bb3825; font-size: 10px; font-weight: 800; line-height: 1.35; }
#telegramWorkspace .telegram-recipient-form-actions {
  position: sticky;
  bottom: -1px;
  display: grid;
  grid-template-columns: minmax(92px,.65fr) 1.35fr;
  gap: 8px;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(251,253,251,0), #fbfdfb 25%);
}
#telegramWorkspace .telegram-recipient-form-actions button {
  min-height: 46px;
  border: 1px solid #cbdcd2;
  border-radius: 13px;
  background: #fff;
  color: #4a5f53;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
#telegramWorkspace .telegram-recipient-form-actions button[type="submit"] {
  border-color: #079b58;
  background: #079b58;
  color: #fff;
  box-shadow: 0 7px 17px rgba(7,155,88,.18);
}
#telegramWorkspace .telegram-recipient-form-actions button:disabled { opacity: .65; cursor: wait; }

@media (max-width: 900px) {
  #telegramWorkspace .telegram-recipient-button { min-height: 38px; padding: 0 9px; font-size: 10px; border-radius: 11px; }
  #telegramWorkspace .telegram-recipient-panel { width: min(420px, 72%); min-width: 320px; }
}

@media (max-width: 760px) {
  #telegramWorkspace .telegram-recipient-backdrop { position: fixed; z-index: 214; background: rgba(3, 27, 15, .28); backdrop-filter: blur(2px); }
  #telegramWorkspace .telegram-recipient-panel {
    position: fixed;
    z-index: 215;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-width: 0;
    height: min(80dvh, 760px);
    border: 0;
    border-top: 1px solid #bddbc9;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -22px 58px rgba(4, 39, 21, .25);
    transform: translateY(104%);
  }
  #telegramWorkspace .telegram-recipient-panel.open { transform: translateY(0); }
  #telegramWorkspace .telegram-recipient-panel-head { min-height: 68px; padding: 11px 14px; border-radius: 24px 24px 0 0; }
  #telegramWorkspace .telegram-recipient-panel-head strong { font-size: 19px; }
  #telegramWorkspace .telegram-recipient-panel-body { padding: 12px 13px calc(14px + env(safe-area-inset-bottom)); }
  #telegramWorkspace .telegram-recipient-tools { grid-template-columns: 1fr; }
  #telegramWorkspace .telegram-recipient-form input,
  #telegramWorkspace .telegram-recipient-form textarea { font-size: 16px; }
  #telegramWorkspace .telegram-order-bar:not(.is-unlinked) { flex-wrap: wrap; }
  #telegramWorkspace .telegram-order-bar:not(.is-unlinked) .telegram-linked-order { flex: 1 1 100%; width: 100%; }
  #telegramWorkspace .telegram-order-bar:not(.is-unlinked) #telegramLinkOrderButton,
  #telegramWorkspace .telegram-order-bar:not(.is-unlinked) .telegram-recipient-button { flex: 1 1 calc(50% - 5px); min-width: 0; }
}


/* v8.8.13.51 — Nova Poshta recipient picker; chat stays sharp and readable. */
#telegramWorkspace .telegram-recipient-backdrop {
  display: none !important;
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  pointer-events: none !important;
}
#telegramWorkspace .telegram-recipient-panel {
  box-shadow: -10px 0 28px rgba(7,52,29,.12);
}
@media (min-width: 1101px) {
  #telegramWorkspace .telegram-chat-detail {
    --recipient-panel-width: min(470px, 46%);
    transition: padding-right .22s ease;
  }
  #telegramWorkspace .telegram-chat-detail.recipient-panel-open {
    padding-right: var(--recipient-panel-width);
  }
  #telegramWorkspace .telegram-recipient-panel {
    width: var(--recipient-panel-width);
    min-width: 370px;
  }
}
@media (max-width: 1100px) {
  #telegramWorkspace .telegram-chat-detail.recipient-panel-open { padding-right: 0; }
  #telegramWorkspace .telegram-recipient-panel { box-shadow: -8px 0 22px rgba(7,52,29,.14); }
}
@media (max-width: 760px) {
  #telegramWorkspace .telegram-recipient-backdrop {
    display: none !important;
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  #telegramWorkspace .telegram-recipient-panel {
    height: min(82dvh, 780px);
    box-shadow: 0 -10px 28px rgba(4,39,21,.16);
  }
}

#telegramWorkspace .telegram-recipient-delivery-picker {
  display: grid;
  gap: 11px;
}
#telegramWorkspace .telegram-recipient-delivery-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid #d8e6dd;
  border-radius: 13px;
  background: #edf4ef;
}
#telegramWorkspace .telegram-recipient-delivery-mode button {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #617268;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
#telegramWorkspace .telegram-recipient-delivery-mode button.active {
  background: #fff;
  color: #086c41;
  box-shadow: 0 2px 8px rgba(6,63,34,.10);
}
#telegramWorkspace .telegram-recipient-nova-field.hidden,
#telegramWorkspace #telegramRecipientManualAddressField.hidden { display: none; }
#telegramWorkspace .telegram-recipient-autocomplete {
  position: relative;
}
#telegramWorkspace .telegram-recipient-autocomplete input[type="search"] {
  padding-right: 34px;
}
#telegramWorkspace .telegram-recipient-autocomplete-results {
  position: absolute;
  z-index: 78;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 235px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 5px;
  border: 1px solid #bcd8c8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(7,52,29,.18);
}
#telegramWorkspace .telegram-recipient-autocomplete-results.hidden { display: none; }
#telegramWorkspace .telegram-recipient-autocomplete-results button {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid #edf3ef;
  border-radius: 8px;
  background: #fff;
  color: #173d2a;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
#telegramWorkspace .telegram-recipient-autocomplete-results button:last-child { border-bottom: 0; }
#telegramWorkspace .telegram-recipient-autocomplete-results button:hover,
#telegramWorkspace .telegram-recipient-autocomplete-results button:focus-visible {
  outline: none;
  background: #eaf8f0;
}
#telegramWorkspace .telegram-recipient-autocomplete-results strong {
  font-size: 11px;
  line-height: 1.35;
}
#telegramWorkspace .telegram-recipient-autocomplete-results small {
  color: #6e8176;
  font-size: 9px;
  line-height: 1.35;
}
#telegramWorkspace .telegram-recipient-autocomplete-empty {
  padding: 12px 10px;
  color: #7b8b82;
  font-size: 10px;
  text-align: center;
}
#telegramWorkspace .telegram-recipient-warehouse-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 1px;
}
#telegramWorkspace .telegram-recipient-warehouse-filters button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #d1dfd6;
  border-radius: 999px;
  background: #f7faf8;
  color: #66786d;
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}
#telegramWorkspace .telegram-recipient-warehouse-filters button.active {
  border-color: #70c294;
  background: #dff5e8;
  color: #087044;
}
#telegramWorkspace .telegram-recipient-address-summary {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border: 1px dashed #d4a64e;
  border-radius: 12px;
  background: #fff9e8;
}
#telegramWorkspace .telegram-recipient-address-summary small {
  color: #8b6b2c;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .035em;
}
#telegramWorkspace .telegram-recipient-address-summary strong {
  color: #765313;
  font-size: 11px;
  line-height: 1.4;
}
#telegramWorkspace .telegram-recipient-address-summary.complete {
  border-color: #8bc9a6;
  background: #eefaf3;
}
#telegramWorkspace .telegram-recipient-address-summary.complete small,
#telegramWorkspace .telegram-recipient-address-summary.complete strong { color: #126a43; }
#telegramWorkspace .telegram-recipient-nova-status {
  margin: -3px 1px 0;
  color: #687a70;
  font-size: 9px;
  line-height: 1.45;
}
#telegramWorkspace .telegram-recipient-nova-status.success { color: #087046; }
#telegramWorkspace .telegram-recipient-nova-status.warning { color: #9b4d28; }
#telegramWorkspace .telegram-recipient-nova-status.loading { color: #77601c; }
#telegramWorkspace .telegram-recipient-form input:disabled {
  background: #eef3f0;
  color: #91a099;
  cursor: not-allowed;
}
