/* Core desk — several cards open at once as windows (see desk.js) */
.dk{position:fixed;right:0;bottom:0;left:0;top:0;z-index:40;display:flex;flex-direction:column;justify-content:flex-end;gap:8px;padding:10px 12px 8px;box-sizing:border-box;pointer-events:none}
.dk[hidden]{display:none}
body.dk-solo.dk-open .dk{background:#dfe3ea;pointer-events:auto}
/* the list stays visible and clickable around the windows */
.dk-area{flex:1 1 auto;min-height:0;position:relative;pointer-events:none}
.dk-win{position:absolute;display:flex;flex-direction:column;min-width:0;min-height:0;background:#fff;border-radius:12px;border:1px solid #d6dbe3;box-shadow:0 6px 24px rgba(29,36,51,.22);overflow:hidden;pointer-events:auto}
.dk-win[hidden]{display:none}
.dk-win.is-focus{border-color:#2457c5;box-shadow:0 0 0 1px #2457c5,0 8px 28px rgba(29,36,51,.28)}
.dk-win.is-max{left:0!important;top:0!important;width:100%!important;height:100%!important}
.dk-head{flex:none;display:flex;align-items:center;gap:6px;min-height:42px;padding:0 6px 0 10px;border-bottom:1px solid #e6e9ef;background:#f6f7f9;border-top:3px solid #c9ced8;cursor:default;user-select:none}
.dk-win:not(.is-max) .dk-head{cursor:move;touch-action:none}
body.dk-solo .dk-win .dk-head{cursor:default;touch-action:auto}
body.dk-moving,body.dk-moving *{user-select:none!important}
.dk-win[data-type="shipment"] .dk-head{border-top-color:#2457c5}
.dk-win[data-type="trip"] .dk-head{border-top-color:#3f7a52}
.dk-win[data-type="request"] .dk-head{border-top-color:#b5432f}
.dk-win[data-type="order"] .dk-head{border-top-color:#b45309}
.dk-win[data-type="party"] .dk-head{border-top-color:#5b4fa8}
.dk-win.is-focus .dk-head{background:#eef3fd}
.dk-ico{flex:none;display:flex;color:#3b4456}
.dk-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;color:#1d2433}
.dk-b{flex:none;width:34px;height:34px;display:flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:transparent;color:#3b4456;cursor:pointer;padding:0}
.dk-b:hover{background:#e3e7ee}
.dk-b:focus-visible,.dk-chip:focus-visible,.dk-tbtn:focus-visible{outline:2px solid #2457c5;outline-offset:1px}
.dk-x:hover{background:#f6dcd7;color:#8f2d22}
.dk-b.is-spin svg{animation:dk-spin .8s linear infinite}
@keyframes dk-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.dk-b.is-spin svg{animation:none;opacity:.45}}
/* resize edges and corners */
.dk-rz{position:absolute;z-index:6;display:block;touch-action:none}
.dk-rz-n{top:0;left:10px;right:10px;height:5px;cursor:ns-resize}
.dk-rz-s{bottom:0;left:16px;right:16px;height:6px;cursor:ns-resize}
.dk-rz-e{top:10px;bottom:16px;right:0;width:6px;cursor:ew-resize}
.dk-rz-w{top:10px;bottom:16px;left:0;width:6px;cursor:ew-resize}
.dk-rz-ne{top:0;right:0;width:10px;height:10px;cursor:nesw-resize}
.dk-rz-nw{top:0;left:0;width:10px;height:10px;cursor:nwse-resize}
.dk-rz-se{bottom:0;right:0;width:16px;height:16px;cursor:nwse-resize}
.dk-rz-sw{bottom:0;left:0;width:16px;height:16px;cursor:nesw-resize}
.dk-rz-se::after{content:"";position:absolute;right:2px;bottom:2px;width:11px;height:11px;background:linear-gradient(135deg,transparent 50%,#8a93a3 50%,#8a93a3 60%,transparent 60%,transparent 74%,#8a93a3 74%,#8a93a3 84%,transparent 84%)}
.dk-win.is-max .dk-rz,body.dk-solo .dk-rz{display:none}
@media (pointer:coarse){.dk-rz-s{height:14px;left:28px;right:28px}.dk-rz-e,.dk-rz-w{width:14px;bottom:28px}.dk-rz-se,.dk-rz-sw{width:28px;height:28px}}
.dk-scroll{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:14px 16px;container-type:inline-size}
.dk-scroll.is-loading{display:grid;place-items:center}
.dk-err{color:#8f2d22;padding:12px}
/* cards drawn inside a narrow window use one column, like on a tablet */
@container (max-width:720px){
  .sv-grid,.sv-docsets,.detail-grid{grid-template-columns:minmax(0,1fr)!important}
  .sv-docsets .sv-tag{display:none}
}
.dk-win.dk-armed::after,.dk-win.dk-busy::after{position:absolute;inset:46px 6px 6px;border:3px dashed #2457c5;border-radius:12px;background:rgba(242,248,255,.88);display:flex;align-items:flex-start;justify-content:center;padding-top:60px;font-size:18px;font-weight:600;color:#1f4fb8;z-index:5}
.dk-win.dk-armed::after{content:"Отпусти — файлы лягут в эту карточку"}
.dk-win.dk-busy::after{content:attr(data-progress)}
/* bottom bar: every open card, minimized ones dimmed */
.dk-tray{flex:none;display:flex;align-items:center;gap:6px;min-height:46px;padding:0 6px;background:rgba(255,255,255,.92);border:1px solid #d6dbe3;border-radius:12px;box-shadow:0 2px 10px rgba(29,36,51,.10);pointer-events:auto}
.dk-chips{flex:1 1 auto;min-width:0;display:flex;gap:6px;overflow-x:auto;scrollbar-width:thin;padding:5px 0}
.dk-chip{flex:none;display:flex;align-items:center;gap:7px;max-width:240px;height:34px;padding:0 12px;border:1px solid #d6dbe3;border-left:4px solid #c9ced8;border-radius:8px;background:#fff;color:#1d2433;font:inherit;font-size:13px;cursor:pointer}
.dk-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dk-chip[data-type="shipment"]{border-left-color:#2457c5}.dk-chip[data-type="trip"]{border-left-color:#3f7a52}.dk-chip[data-type="request"]{border-left-color:#b5432f}.dk-chip[data-type="order"]{border-left-color:#b45309}.dk-chip[data-type="party"]{border-left-color:#5b4fa8}
.dk-chip.is-min{background:#f1f3f6;color:#5b6475}
.dk-chip.is-focus{border-color:#2457c5;background:#eef3fd}
.dk-tbtn{flex:none;width:38px;height:38px;display:flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:transparent;color:#3b4456;cursor:pointer}
.dk-tbtn:hover{background:#e3e7ee}
body.dk-has-tray #app .main{padding-bottom:64px}
/* the table selection bar sits above the open-cards tray instead of under it */
body.dk-has-tray #uiBulk{bottom:80px}
body.dk-solo .dk-tray,body.dk-solo .dk-b[data-a="min"],body.dk-solo .dk-b[data-a="max"],body.dk-solo .dk-b[data-a="out"]{display:none}
/* the old one-card dialog, used off-screen while a company card is drawn into a window */
#partyDialog.dk-offscreen{position:fixed!important;left:-10000px!important;top:0!important;width:1100px!important;visibility:hidden!important;pointer-events:none!important}
.dk-modal-link{display:inline-flex;align-items:center;justify-content:center;min-width:42px;margin-left:auto;margin-right:8px}
.dk-modal-reload{margin-left:0}
.detail-title-row:has(.dk-modal-link){align-items:center}
.dk-toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);background:#1d2a44;color:#fff;padding:10px 18px;border-radius:10px;font-size:14px;z-index:10000}
@media (max-width:899px){.dk{display:none!important}body.dk-has-tray #app .main{padding-bottom:0}body.dk-has-tray #uiBulk{bottom:10px}}
@media print{.dk{display:none!important}}
