.cabinet-dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  padding: clamp(20px, 5vw, 32px);
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: #141a2b;
  box-shadow: 0 16px 48px #141a2b26;
}
.cabinet-dialog::backdrop { background: #141a2b66; }
.cabinet-dialog h2 { margin: 0 0 12px; font-size: 24px; }
.cabinet-dialog p { margin: 0 0 16px; }
.cabinet-dialog label { display: grid; gap: 6px; margin-bottom: 12px; }
.cabinet-dialog input, .cabinet-dialog textarea, .cabinet-dialog select {
  width: 100%; min-height: 44px; padding: 8px 12px; box-sizing: border-box;
  border: 1px solid #83899b; border-radius: 10px; font: inherit; color: inherit; background: #fff;
}
.cabinet-dialog textarea { min-height: 96px; resize: vertical; }
.cabinet-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cabinet-button {
  font: inherit; font-weight: 700; min-height: 40px; padding: 8px 14px; border: 0;
  border-radius: 12px; background: #2502cd; color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.cabinet-button.secondary { background: #f0f2f5; color: #161c2d; }
.cabinet-button:disabled { opacity: .6; cursor: wait; }
.cabinet-error { color: #982030; }
.cabinet-error:empty { display: none; }
.cabinet-empty { padding: 16px; margin: 0; color: #545d70; }
.cabinet-placed { position: absolute; box-sizing: border-box; }
.cabinet-slot { display: grid; gap: 12px; overflow: auto; align-content: start; }
.cabinet-slot article { padding: 14px 16px; border-radius: 14px; background: #f4f6f8; overflow-wrap: anywhere; }
.cabinet-slot p { margin: 0 0 8px; }
.cabinet-slot p:last-child { margin-bottom: 0; }
.cabinet-message-list { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 14px; }
.cabinet-message-list p { max-width: 82%; margin: 0; align-self: flex-start; background: #fff; border-radius: 14px; padding: 10px 12px; overflow-wrap: anywhere; }
.cabinet-message-list p[data-own] { align-self: flex-end; background: #e6f8fe; }
.cabinet-input { position: absolute; background: transparent; border: 0; color: #141a2b; font: inherit; padding: 0; min-width: 0; }
.cabinet-as-text { background: transparent; border: 0; text-align: left; font: inherit; padding: 0; cursor: pointer; color: inherit; }
.cabinet-value > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cabinet-static [hidden] { display: none !important; }

.cabinet-dialog form { display: grid; gap: 12px; margin-bottom: 12px; }
.cabinet-dialog form label { display: grid; gap: 5px; }
.cabinet-dialog form button { justify-self: start; }

.cabinet-offer-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
}
.cabinet-offer-card {
  position: relative;
  top: 0 !important;
  flex: none;
}
.cabinet-offer-list > .cabinet-buttons,
.cabinet-offer-list > .cabinet-empty { margin-inline: var(--offer-inset); }
.cabinet-offer-card .offer-line > span {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cabinet-offer-card .offer-comment { overflow: hidden; overflow-wrap: anywhere; }
.cabinet-offer-data { overflow-wrap: anywhere; white-space: pre-wrap; }
.cabinet-offer-data dt { font-weight: 700; }
.cabinet-offer-data dd { margin: 0 0 .75em; }

.cabinet-sort { width: 100%; min-width: 100px; appearance: none; background: transparent; padding: 0; border: 0; font: inherit; color: inherit; cursor: pointer; }
