/* ============================================================================
   «Рабочий стол» — ПК-версия панели (макет C, по просьбе):
     • меню — вертикальная панель СЛЕВА;
     • карточки клиента/заказа выезжают СПРАВА; уведомления — справа сверху;
     • полоса с цифрами сверху, плотные таблицы, уведомления.
   Телефон/Mini App (< 1024px) НЕ меняется: всё новое там скрыто, кроме
   стопки уведомлений (она работает и на телефоне).
   ============================================================================ */

/* ---------- по умолчанию (телефон / узкий экран): новое скрыто ---------- */
.desk-only, .bn-desk, #desk-strip, #desk-dash, .desk-filters, #users-table-wrap,
.desk-search, th.dc, td.dc, .bn-count { display: none; }
#bell-btn { display: none; }

/* ---------- уведомления (везде) ---------- */
#toast-stack {
  position: fixed; z-index: 70; top: 70px; right: 16px; width: min(380px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
#toast-stack > * { pointer-events: auto; }
.tst-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px;
  font-size: 12px; font-weight: 700; color: var(--text-secondary);
}
.tst-head button, .bp-head button.mini-btn {
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-primary);
  border-radius: 8px; height: 26px; padding: 0 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.tst-head button:hover { background: var(--surface-3); }
.tst {
  display: grid; grid-template-columns: 34px 1fr 24px; gap: 10px; align-items: start; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 14px; padding: 10px 10px 10px 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,.55); animation: tstIn .25s var(--ease);
}
.tst.fresh { border-color: color-mix(in srgb, var(--accent-a) 65%, transparent); }
@keyframes tstIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.tst .ti, .bp-row .ti {
  width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.tst .tt, .bp-row .tt { font-size: 13px; font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tst .ts, .bp-row .ts { font-size: 12px; color: var(--text-secondary); overflow-wrap: anywhere; }
.tst .tm, .bp-row .tm { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.tst .x, .bp-row .x {
  width: 24px; height: 24px; border-radius: 8px; border: 0; background: transparent; color: var(--text-muted);
  font-size: 13px; cursor: pointer; font-family: inherit;
}
.tst .x:hover, .bp-row .x:hover { background: var(--surface-3); color: var(--text-primary); }
.new-badge {
  background: var(--accent-a); color: #fff; font-size: 9.5px; font-weight: 800; padding: 1px 6px;
  border-radius: 99px; letter-spacing: .05em;
}
#bell-btn { position: relative; }
#bell-btn .bell-count {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px;
  background: var(--status-critical); color: #fff; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--page);
}
#bell-btn .bell-count:empty { display: none; }

/* панель-колокольчик */
#bell-panel {
  display: none; position: fixed; z-index: 65; top: 62px; right: 16px; width: 400px; max-height: 70vh; overflow: auto;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
#bell-panel.visible { display: block; animation: tstIn .2s var(--ease); }
.bp-head {
  position: sticky; top: 0; background: var(--surface-2); z-index: 1; display: flex; align-items: center;
  justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 700;
}
.bp-row { display: grid; grid-template-columns: 34px 1fr 24px; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--grid); cursor: pointer; }
.bp-row:hover { background: color-mix(in srgb, var(--surface-3) 60%, transparent); }
.bp-row.fresh { background: color-mix(in srgb, var(--accent-a) 9%, transparent); }
.bp-empty { padding: 28px 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ---------- кнопки действий в строках ---------- */
.dbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; min-width: 28px; padding: 0 9px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-primary);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s;
}
.dbtn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.dbtn.ok { color: var(--status-good); border-color: color-mix(in srgb, var(--status-good) 40%, var(--border)); background: color-mix(in srgb, var(--status-good) 10%, var(--surface-2)); }
.dbtn.bad { color: var(--status-critical); border-color: color-mix(in srgb, var(--status-critical) 40%, var(--border)); background: color-mix(in srgb, var(--status-critical) 9%, var(--surface-2)); }
.dbtn.pri { color: #fff; border: 0; background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); }
.dbtn.warn { color: var(--status-warning); border-color: color-mix(in srgb, var(--status-warning) 40%, var(--border)); background: color-mix(in srgb, var(--status-warning) 9%, var(--surface-2)); }
.dbtn.lg { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.dbtn.ic { padding: 0; width: 28px; }
.row-actions { display: inline-flex; gap: 4px; }
.mut { color: var(--text-muted); }
.sec { color: var(--text-secondary); }
.pos { color: var(--status-good); } .neg { color: var(--status-critical); }

/* ============================================================================
   ПК: от 1024px
   ============================================================================ */
@media (min-width: 1024px) {
  :root { --sidebar-w: 0px; --rnav-w: 224px; --topbar-h: 56px; }
  .desk-only { display: block; }
  #desk-strip { display: flex; }
  #bell-btn { display: flex; }
  .desk-search { display: flex; }
  .bn-desk { display: flex; }
  th.dc, td.dc { display: table-cell; }
  .bn-count { display: inline-flex; }
  #app { display: none; } #app.visible { display: block; }

  /* --- верхняя панель --- */
  .appbar {
    margin: 0; padding: 0 20px; height: var(--topbar-h); min-height: var(--topbar-h);
    position: sticky; top: 0; z-index: 40; gap: 14px;
  }
  .appbar .brand { gap: 0; }
  .appbar .brand .tg-logo { display: none; }
  .appbar .brand::before {
    content: "SIM Shop"; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; margin-right: 12px; padding-right: 14px;
    border-right: 1px solid var(--border-strong); line-height: 1.6;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .appbar h2 { font-size: 15px; font-weight: 700; color: var(--text-secondary); }
  .desk-search {
    align-items: center; gap: 9px; height: 36px; width: min(340px, 28vw); margin-left: 8px; padding: 0 12px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted); font-size: 13px; cursor: pointer;
    white-space: nowrap; overflow: hidden; font-family: inherit; text-align: left;
  }
  .desk-search:hover { border-color: var(--border-strong); }
  .desk-search kbd { margin-left: auto; font: inherit; font-size: 11px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 1px 6px; }
  .appbar .brand { flex: 0 0 auto; }
  .appbar > .brand + .desk-search { flex: 0 1 auto; }
  .appbar { justify-content: flex-start; }
  .appbar-right { margin-left: auto; gap: 8px; }
  .top-toggle { height: 36px; padding: 0 12px; }
  .icon-btn { width: 36px; height: 36px; }
  .admin-chip { padding: 0 4px; }
  .appbar-right > .icon-btn[title="Управление"] { display: none; }

  /* --- меню справа --- */
  .bottom-nav {
    left: 0; right: auto; top: var(--topbar-h); bottom: 0; transform: none; width: var(--rnav-w); max-width: none;
    flex-direction: column; justify-content: flex-start; gap: 3px; padding: 14px 12px 14px;
    border: none; border-right: 1px solid var(--border); border-radius: 0; background: var(--surface-1);
    backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; overflow-y: auto; z-index: 30;
  }
  .bottom-nav::before { content: "РАЗДЕЛЫ"; position: static; display: block; padding: 2px 12px 8px; font-size: 10px; letter-spacing: .1em; font-weight: 800; color: var(--text-muted); -webkit-text-fill-color: currentColor; background: none; }
  .bottom-nav::after { content: none; display: none; }
  .bn-indicator { display: none; }
  .bn-item {
    flex: none; flex-direction: row; justify-content: flex-start; align-items: center; gap: 11px; width: 100%;
    padding: 10px 12px; border-radius: var(--r-md); color: var(--text-secondary); position: relative;
  }
  .bn-item .bn-icon { width: 22px; height: 22px; font-size: 17px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .bn-item .bn-label { font-size: 13.5px; font-weight: 600; max-width: none; }
  .bn-item:not(.active):hover { background: var(--surface-2); color: var(--text-primary); }
  .bn-item.active { background: color-mix(in srgb, var(--accent-a) 16%, transparent); color: var(--text-primary); box-shadow: inset 3px 0 0 var(--accent-a); }
  .bn-item.active .bn-icon { transform: none; color: var(--accent-a); }
  .bn-item[data-more] { display: none; }
  .bn-sep { display: block; height: 1px; background: var(--grid); margin: 8px 6px; }
  .bn-count { margin-left: auto; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 7px; border-radius: 99px; background: var(--surface-3); color: var(--text-secondary); font-size: 11px; font-weight: 700; }
  .bn-count.hot { background: var(--status-critical); color: #fff; }
  .bn-count:empty { display: none; }
  .bn-foot {
    display: block; margin-top: auto; border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px;
    padding: 10px 12px; font-size: 11.5px; color: var(--text-muted); line-height: 1.5;
  }
  .bn-foot b { color: var(--text-primary); font-size: 12px; }

  /* --- контент --- */
  .content { margin: 0 0 0 var(--rnav-w); width: auto; max-width: none; padding: 0 clamp(18px, 2vw, 32px) 56px; }
  .content > .banner { display: none !important; }
  #toast-stack { right: 16px; top: calc(var(--topbar-h) + 16px); }
  body.bell-open #toast-stack { display: none; }
  #desk-strip .strip-btns { display: none; }
  #order-modal-actions > button:last-child { display: none; }
  #orders-table th:nth-child(8), #orders-table td[data-label="Аккаунт"] { display: none; }
  .content > .tab { max-width: 1500px; margin-left: auto; margin-right: auto; }

  /* --- полоса с цифрами --- */
  #desk-strip {
    position: sticky; top: var(--topbar-h); z-index: 20; align-items: center; gap: 18px; flex-wrap: wrap;
    margin: 0 calc(-1 * clamp(18px, 2vw, 32px)) 18px; padding: 9px clamp(18px, 2vw, 32px);
    background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border); font-size: 12.5px;
  }
  #desk-strip .sg { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
  #desk-strip .sg > span { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
  #desk-strip .sg > b { font-size: 14.5px; font-variant-numeric: tabular-nums; }
  #desk-strip .sg > i { font-style: normal; font-size: 11.5px; font-weight: 700; }
  #desk-strip .sg > i.up { color: var(--status-good); } #desk-strip .sg > i.dn { color: var(--status-critical); }
  #desk-strip .sg + .sg { padding-left: 18px; border-left: 1px solid var(--border); }
  #desk-strip .hot b { color: var(--status-warning); }
  #desk-strip .grow { flex: 1; }

  /* --- дашборд --- */
  #tab-dashboard > :not(#desk-dash) { display: none !important; }
  #desk-dash { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
  .dd-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .dd-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .dd-kpi {
    background: var(--surface-1); border: 1px solid var(--border); border-radius: 14px; padding: 14px 14px 8px; position: relative; overflow: hidden;
  }
  .dd-kpi::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--k, var(--accent-a)); }
  .dd-kpi .l { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
  .dd-kpi .v { font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
  .dd-kpi .d { font-size: 11.5px; font-weight: 700; color: var(--text-muted); min-height: 16px; }
  .dd-kpi .d.up { color: var(--status-good); } .dd-kpi .d.dn { color: var(--status-critical); }
  .dd-kpi svg { display: block; margin-top: 2px; max-width: 100%; }
  .dd-row2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
  .dd-row3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .dd-bars { display: flex; gap: 12px; align-items: flex-end; height: 170px; padding-top: 6px; }
  .dd-bars > div { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
  .dd-bars .bv { font-size: 11.5px; font-weight: 700; color: var(--text-secondary); }
  .dd-bars .bx { width: 100%; border-radius: 8px 8px 3px 3px; background: var(--surface-3); min-height: 3px; }
  .dd-bars .bx.today { background: linear-gradient(180deg, var(--accent-b), var(--accent-a)); }
  .dd-bars .bl { font-size: 11px; color: var(--text-muted); }
  .dd-line { display: grid; grid-template-columns: minmax(0, 1fr) 110px 38px; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
  .dd-line .nm { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dd-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; } .dd-bar > i { display: block; height: 100%; border-radius: 99px; }
  .dd-line .pc { text-align: right; font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
  .dd-card-empty { padding: 18px 0; text-align: center; color: var(--text-muted); font-size: 13px; }
  .dd-rail { position: sticky; top: calc(var(--topbar-h) + 62px); max-height: calc(100vh - var(--topbar-h) - 80px); overflow: auto; }
  .feed-it { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; padding: 8px 6px; border-radius: 10px; align-items: center; cursor: pointer; }
  .feed-it:hover { background: var(--surface-2); }
  .feed-it.fresh { background: color-mix(in srgb, var(--accent-a) 9%, transparent); }
  .feed-it .ti { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-size: 14px; }
  .feed-it b { font-size: 13px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  .feed-it .ts { font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
  .feed-it time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
  .dd-top { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--grid); cursor: pointer; }
  .dd-top:last-child { border-bottom: 0; }
  .dd-top .rk { width: 16px; font-size: 11px; color: var(--text-muted); }
  .dd-top b { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tbl-plain { min-width: 0; font-size: 13px; }
  .tbl-plain th { background: transparent; }
  .tbl-plain td { white-space: nowrap; }
  .tbl-plain tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }

  /* --- заказы --- */
  #tab-orders .desk-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
  #tab-orders .desk-filters select, #tab-users .desk-filters select {
    height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-primary);
    padding: 0 10px; font: inherit; font-size: 12.5px;
  }
  #orders-table { min-width: 0; table-layout: auto; }
  #orders-table th, #orders-table td { padding: 10px 9px; white-space: nowrap; }
  #orders-table th[data-col="uid"], #orders-table td[data-label="User ID"] { display: none; }
  #orders-table td .row-quick-actions { display: none; }
  #orders-table td[data-label="Аккаунт"] { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
  #orders-table td.dc-time { color: var(--text-muted); }
  #orders-table td[data-label="Статус"] { min-width: 150px; }
  #tab-orders .card > div:first-child button.btn-secondary { display: none; }
  #orders-table tbody tr.attn td:first-child { box-shadow: inset 3px 0 0 var(--status-warning); }

  /* --- клиенты: таблица вместо карточек --- */
  #tab-users #users-body { display: none; }
  #users-table-wrap { display: block; }
  #users-table .un { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
  #users-table th, #users-table td { padding: 10px 12px; white-space: nowrap; }
  #users-table tbody tr { cursor: pointer; }
  #users-table { min-width: 0; }

  /* --- новые вкладки --- */
  .tabbar-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
  .tabbar-row .grow { flex: 1; }
  .kpi-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
  .kpi-mini > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
  .kpi-mini .l { font-size: 11.5px; color: var(--text-muted); } .kpi-mini .v { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }

  /* ============ ЛЕВЫЕ ВЫЕЗЖАЮЩИЕ ПАНЕЛИ: клиент и заказ ============ */
  .slide-panel-overlay.modal-overlay, #user-modal.modal-overlay { justify-content: flex-end; align-items: stretch; padding: 0; z-index: 55; }
  .slide-panel { width: 680px; max-width: 100vw; border-right: 0; border-left: 1px solid var(--border-strong); animation: panelInRight .22s var(--ease); padding: 22px 26px 26px; }
  @keyframes panelInRight { from { transform: translateX(100%); } to { transform: none; } }
  #user-modal .modal-card {
    height: 100%; max-height: none; width: 680px; max-width: 100vw; border-radius: 0; border: 0; border-left: 1px solid var(--border-strong);
    padding: 0; display: flex; flex-direction: column; overflow: hidden; animation: panelInRight .22s var(--ease);
  }
  #user-modal .modal-card { position: relative; }
  #user-modal .modal-card > h3 { margin: 0; padding: 20px 26px 0; display: block; }
  #user-modal .modal-card > .modal-close, .slide-panel > .modal-close { position: absolute; top: 16px; right: 18px; float: none; width: 30px; height: 30px; z-index: 3; }
  .slide-panel { position: relative; }
  #user-modal-body { flex: 1; overflow: auto; padding: 0 26px 26px; }

  /* карточка заказа: кнопки действий — наверх вкладки «Обзор» */
  #order-panel-tab-overview.active { display: flex; flex-direction: column; }
  #order-panel-tab-overview #order-modal-actions { order: -1; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
  #order-panel-tab-overview .chat-paste-hint { order: 5; }
  #order-modal-actions .btn-secondary, #order-modal-actions .action-btn { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
  #order-modal-actions .hint-note { display: none; }

  /* --- содержимое карточки клиента --- */
  .ud-head { display: flex; align-items: center; gap: 14px; padding-right: 40px; }
  .ud-head .nm { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
  .ud-head .sb { font-size: 12px; color: var(--text-muted); }
  .ud-head .bal { margin-left: auto; text-align: right; }
  .ud-head .bal .l { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
  .ud-head .bal .v { font-size: 28px; font-weight: 800; color: var(--status-good); letter-spacing: -.02em; }
  .ud-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; align-items: center; }
  .ud-amount { display: inline-flex; align-items: center; height: 34px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-2); overflow: hidden; }
  .ud-amount span { padding: 0 4px 0 10px; color: var(--text-muted); }
  .ud-amount input { width: 70px; border: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 13px; padding: 0 8px 0 0; outline: none; }
  .ud-quick { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
  .ud-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 12px 0 14px; }
  .ud-tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 14px; color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; gap: 6px; align-items: center; }
  .ud-tab.on { color: var(--text-primary); border-color: var(--accent-a); }
  .ud-tab i { font-style: normal; font-size: 11px; padding: 0 7px; border-radius: 99px; background: var(--surface-3); color: var(--text-secondary); }
  .ud-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
  .ud-stats > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; }
  .ud-stats .l { font-size: 11.5px; color: var(--text-muted); } .ud-stats .v { font-size: 19px; font-weight: 800; }
  .ud-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
  .ud-chip { height: 28px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-secondary); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
  .ud-chip.on { background: color-mix(in srgb, var(--accent-a) 20%, transparent); border-color: color-mix(in srgb, var(--accent-a) 55%, transparent); color: var(--text-primary); }
  .ud-table { min-width: 0; }
  .ud-table th { background: transparent; } .ud-table td { white-space: nowrap; }
  .ud-sec { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); margin: 18px 0 6px; display: flex; gap: 8px; align-items: center; }
  .ud-sec::after { content: ""; flex: 1; height: 1px; background: var(--grid); }
  .ud-kv { display: grid; grid-template-columns: 170px 1fr; }
  .ud-kv > div { padding: 9px 0; border-bottom: 1px solid var(--grid); font-size: 13px; }
  .ud-kv > div:nth-child(odd) { color: var(--text-muted); } .ud-kv > div:nth-child(even) { text-align: right; font-weight: 600; word-break: break-word; }
  .ud-hist { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--grid); font-size: 13px; align-items: start; }
  .ud-hist time { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
  .ud-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 8px; margin: 0 -8px; border-bottom: 1px solid var(--grid); cursor: pointer; border-radius: 8px; font-size: 13px; }
  .ud-row:hover { background: var(--surface-2); }
  .ud-row .r { color: var(--accent-a); font-weight: 600; white-space: nowrap; }
}

@media (min-width: 1500px) {
  #desk-strip .strip-btns { display: inline-flex; gap: 8px; }
  #orders-table th:nth-child(8) { display: table-cell; }
  #orders-table td[data-label="Аккаунт"] { display: table-cell; }
  .dd-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .dd-kpi .v { font-size: 22px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  #desk-dash { grid-template-columns: minmax(0, 1fr); }
  .dd-rail { position: static; max-height: none; }
  #desk-strip { gap: 12px; } #desk-strip .sg + .sg { padding-left: 12px; }
  .desk-search { width: 180px; }
  #bell-panel { right: 16px; }
}

/* ---------- телефон: новые ячейки таблицы заказов не показываем ---------- */
@media (max-width: 700px) {
  #orders-table td.dc, #orders-table th.dc { display: none !important; }
  #toast-stack { top: 64px; right: 12px; left: 12px; width: auto; }
}

/* поле поиска в журнале */
#journal-search {
  height: 34px; width: 100%; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-primary); padding: 0 12px; font: inherit; font-size: 13px; outline: none;
}
#journal-search:focus { border-color: var(--border-strong); }
