/* Тёмная тема в духе РНП: тёмно-синий фон, строка на модель, размеры раскрываются. */
:root {
  color-scheme: dark;
  --bg: #0a1120;
  --surface: #0d1626;
  --surface-2: #111c30;
  --hover: #14223a;
  --line: #1a2840;
  --line-strong: #24365a;
  --ink: #e6edf7;
  --muted: #8191a9;
  --faint: #4e5e78;
  --yellow: #f5b301;
  --blue: #5b93ff;
  --cut: #f0a54a; /* в производстве */
  --sewn: #3fd28b; /* готово в цеху */
  --stock: #9b8cff; /* на складе ФБС */
  --fbo: #4cc3ff; /* остаток ФБО */
  --red: #f87171;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

/* иначе display у .btn/.toast перебивает скрытие через атрибут hidden */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.muted {
  color: var(--muted);
}

/* ---------- шапка ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(10 17 32 / 92%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
}

.topbar__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #5b93ff, #8b6dff);
  color: #fff;
  flex: none;
}

.brand__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}

.brand__sub {
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.topbar__side {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  background: var(--hover);
}

.btn--primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.btn--primary:hover {
  background: #4a83f0;
}

.btn--ghost {
  height: 40px;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.btn.is-busy svg {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.filters {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 260px;
  max-width: 520px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--blue);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.search input::placeholder {
  color: var(--faint);
}

.select,
.date {
  height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%238191a9' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 12px center/12px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  appearance: none;
}

.date {
  padding-right: 12px;
  background-image: none;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--blue);
}

/* ---------- таблица моделей ---------- */

/* на узком экране таблица листается вбок внутри себя, а не вся страница */
.board {
  margin: 16px 20px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-x: auto;
}

.rnp {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.rnp thead th {
  position: sticky;
  top: 0;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}

.rnp thead .col-name {
  text-align: left;
  padding-left: 18px;
  width: 25%;
}

.rnp thead .col-sewn {
  color: var(--sewn);
}

.rnp thead .col-fbo {
  color: var(--fbo);
}

.rnp thead .col-left {
  color: var(--ink);
}

.placeholder {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
}

.num {
  padding: 0 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.num.is-zero {
  color: var(--faint);
  font-weight: 500;
}

.num.cut {
  color: var(--cut);
}

.num.sewn {
  color: var(--sewn);
}

.num.fbo {
  color: var(--fbo);
}

.model:not(.is-open) .orders-detail {
  display: none;
}

.num.left.is-short {
  color: var(--red);
  background: rgb(239 68 68 / 16%);
  font-weight: 800;
}

.num.deficit:not(.is-zero) {
  color: var(--cut);
}

.num.is-zero.cut,
.num.is-zero.sewn,
.num.is-zero.fbo {
  color: var(--faint);
}

/* название модели остаётся на месте, цифры листаются вбок */
.rnp thead .col-name,
.model__cell,
.size-name {
  position: sticky;
  left: 0;
  z-index: 1;
}

.model__cell {
  /* длинное описание обрезается и не раздвигает таблицу за край экрана */
  max-width: 0;
  background: var(--surface);
}

.rnp thead .col-name {
  z-index: 3;
}

/* ---------- строка модели ---------- */

.model__row {
  cursor: pointer;
}

.model__row > * {
  height: 78px;
  border-top: 1px solid var(--line);
}

.model:first-of-type .model__row > * {
  border-top: 0;
}

.model__row:hover > * {
  background: var(--hover);
}

.model__cell {
  padding: 0 12px 0 14px;
  text-align: left;
  font-weight: 400;
}

.model__head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.model__toggle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.model__toggle svg {
  transition: transform 0.15s;
}

.model.is-open .model__toggle {
  color: var(--blue);
  border-color: var(--blue);
}

.model.is-open .model__toggle svg {
  transform: rotate(90deg);
}

.model__photo {
  width: 46px;
  height: 60px;
  flex: none;
  border-radius: 7px;
  object-fit: cover;
  background: #fff;
}

/* у части карточек WB не отдаёт фото — показываем заглушку, а не пустой квадрат */
.model__photo--empty {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--faint);
  font-size: 9px;
  text-align: center;
}

.model__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.model__name {
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: copy;
  align-self: flex-start;
  max-width: 100%;
}

.model__name:hover {
  color: var(--blue);
}

.model__sub {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.model__link,
.model__hide {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
}

.model__row:hover .model__link,
.model__row:hover .model__hide,
.model.is-hidden .model__hide {
  opacity: 1;
}

.model__link:hover {
  color: var(--blue);
  background: var(--surface-2);
}

.model__hide:hover {
  color: var(--red);
  background: var(--surface-2);
}

.model.is-hidden .model__row {
  opacity: 0.55;
}

@media (hover: none) {
  .model__link,
  .model__hide {
    opacity: 1;
  }
}

/* заказы модели: синяя подсветка тем ярче, чем больше заказов */
.orders--model {
  background: rgb(91 147 255 / var(--heat, 0));
  color: #fff;
  font-size: 17px;
}

.model__row:hover .orders--model {
  background: rgb(91 147 255 / calc(var(--heat, 0) + 0.06));
}

.orders__value {
  display: block;
}

.cab-line {
  display: block;
  margin-top: 2px;
  color: #a9c3f5;
  font-size: 10.5px;
  font-weight: 600;
}

/* ---------- строки размеров ---------- */

.size-row {
  display: none;
}

.model.is-open .size-row {
  display: table-row;
}

.size-row > * {
  height: 46px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.size-row:hover > * {
  background: #0e1830;
}

.size-name {
  padding: 0 12px 0 104px;
  text-align: left;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.size-row .num {
  font-size: 14px;
}

.size-row .orders {
  color: var(--ink);
}

.qty {
  width: 72px;
  height: 32px;
  padding: 0 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.qty--cut {
  color: var(--cut);
}

.qty--sewn {
  color: var(--sewn);
}

.qty.is-zero {
  color: var(--faint);
  font-weight: 500;
}

.qty:hover {
  border-color: var(--muted);
}

.qty:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(91 147 255 / 25%);
  color: #fff;
}

.qty.is-saved {
  animation: saved 0.9s ease-out;
}

@keyframes saved {
  from {
    background: rgb(63 210 139 / 40%);
    border-color: var(--sewn);
  }
  to {
    background: var(--surface);
  }
}

/* ---------- история ---------- */

.page {
  padding: 16px 20px 40px;
}

.panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-x: auto;
}

.log {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.log th,
.log td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.log thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 1;
}

.log td.wrap {
  white-space: normal;
  min-width: 220px;
}

.log tbody tr:hover td {
  background: var(--hover);
}

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.tag--cut {
  background: rgb(240 165 74 / 15%);
  color: var(--cut);
}

.tag--sewn {
  background: rgb(63 210 139 / 15%);
  color: var(--sewn);
}

.tag--target {
  background: rgb(155 140 255 / 15%);
  color: var(--stock);
}

.tag--ozon {
  background: rgb(76 195 255 / 15%);
  color: var(--fbo);
}

.tag--onec {
  background: rgb(245 179 1 / 15%);
  color: var(--yellow);
}

.delta--up {
  color: var(--sewn);
  font-weight: 700;
}

.delta--down {
  color: var(--red);
  font-weight: 700;
}

.log__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}

.filters--light {
  margin-top: 0;
}

.btn--light {
  background: var(--surface-2);
}

/* ---------- окно подтверждения ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(3 7 15 / 70%);
}

.modal__box {
  width: 100%;
  max-width: 400px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: 0 20px 50px rgb(0 0 0 / 45%);
}

.modal__title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.modal__text {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13.5px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.product-dialog {
  box-sizing: border-box;
  width: min(440px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100% - 32px);
  color: var(--text);
  overflow: auto;
}

.product-dialog::backdrop {
  background: rgb(3 7 15 / 70%);
}

.product-form {
  display: grid;
  gap: 12px;
}

.product-form label {
  display: grid;
  gap: 5px;
  font-size: 15px;
}

.product-form .cab__input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  font-size: 16px;
}

.product-form textarea {
  resize: vertical;
}

.product-form__hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.btn--danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.btn--danger:hover {
  background: #b91c1c;
}

.onec-badge {
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgb(245 179 1 / 15%);
  color: var(--yellow);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

/* ---------- период заказов ---------- */

.period__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}

.period__btn:hover,
.period__btn[aria-expanded='true'] {
  border-color: var(--blue);
}

.period__label {
  color: var(--blue);
  text-transform: none;
  letter-spacing: 0.02em;
}

.period__menu {
  position: fixed;
  z-index: 40;
  width: 300px;
  max-width: calc(100vw - 16px);
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: 0 16px 40px rgb(0 0 0 / 45%);
}

.period__presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.period__presets button {
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.period__presets button:hover {
  border-color: var(--blue);
}

.period__presets button.is-active {
  border-color: var(--blue);
  background: rgb(91 147 255 / 18%);
  color: #fff;
  font-weight: 700;
}

.period__custom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.period__custom label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.period__custom input {
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  color-scheme: dark;
}

.period__custom .btn {
  grid-column: 1 / -1;
  justify-content: center;
  height: 34px;
}

.period__hint {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 11px;
}

/* ---------- кабинеты ---------- */

.status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgb(248 113 113 / 18%);
}

.status-dot.is-ok {
  background: var(--sewn);
  box-shadow: 0 0 0 3px rgb(63 210 139 / 18%);
}

.badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

/* экран вместо таблицы, пока подключены не все кабинеты */
.modal__box--wide {
  max-width: 620px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal__close:hover {
  background: var(--hover);
  color: var(--ink);
}

.cabs {
  display: grid;
  gap: 12px;
}

.cab {
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
}

.cab.is-connected {
  border-color: rgb(63 210 139 / 35%);
}

.cab__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cab__logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.cab__logo--wb {
  background: linear-gradient(135deg, #cb11ab, #7e1bd3);
}

.cab__logo--ozon {
  background: #005bff;
}

.cab__title {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.cab__state {
  color: var(--faint);
  font-size: 12.5px;
}

.cab__state.is-ok {
  overflow: hidden;
  color: var(--sewn);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cab__meta {
  color: var(--faint);
  font-size: 11.5px;
}

.cab__row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cab__input {
  flex: 1 1 200px;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.cab__input--wide {
  flex-basis: 100%;
}

.cab .cab__row + .cab__row {
  margin-top: 8px;
}

.cab__logo--onec {
  background: #f5b301;
  color: #3a2a00;
}

.status-dot.is-off {
  background: var(--faint);
  box-shadow: none;
}

.modal__sub {
  margin: 22px 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.cab__input--id {
  flex: 0 1 130px;
}

.cab__input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(91 147 255 / 25%);
}

.cab__help {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 11.5px;
}

.cab__error {
  margin: 8px 0 0;
  color: var(--red);
  font-size: 12.5px;
}

/* ---------- уведомление ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px));
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13.5px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 45%);
  z-index: 50;
}

.toast--error {
  background: #7f1d1d;
  border-color: #b91c1c;
  color: #fff;
}

/* ---------- телефон ---------- */

@media (max-width: 720px) {
  .topbar {
    position: static;
    padding: 12px 16px;
  }

  .topbar__side {
    width: 100%;
    gap: 12px;
  }

  .actions .btn {
    font-size: 12px;
    padding: 0 10px;
  }

  .board {
    margin: 12px 16px 32px;
  }

  .rnp {
    min-width: 700px;
  }

  .size-name {
    padding-left: 44px;
  }

  .rnp thead .col-name {
    width: 160px;
    padding-left: 12px;
  }

  .model__cell {
    max-width: 160px;
    padding: 0 8px;
  }

  .model__head {
    gap: 8px;
  }

  .model__toggle {
    width: 24px;
    height: 24px;
  }

  .model__photo {
    width: 32px;
    height: 42px;
  }

  .model__name {
    font-size: 13px;
  }

  .model__link,
  .model__hide {
    display: none;
  }

  .num {
    padding: 0 6px;
  }

  .qty {
    width: 58px;
  }

  .page {
    padding: 12px 16px;
  }

  .log th,
  .log td {
    padding: 9px 10px;
  }
}


/* ---------- 1С: адрес и токен ---------- */

.onec-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.onec-field__label {
  flex: none;
  width: 52px;
  color: var(--muted);
  font-size: 12.5px;
}

.onec-field__value {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg);
  font: 12.5px Consolas, "Cascadia Mono", monospace;
  overflow-wrap: anywhere;
  user-select: all;
}

.onec-field--token .onec-field__value {
  border-color: var(--yellow);
}

.onec-warn {
  margin: 10px 0 8px;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 600;
}

.onec-actions {
  margin-top: 4px;
}

.login-page {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: min(100%, 430px);
}

.login-card .modal__title {
  font-size: 24px;
}

.profile-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.profile-cabinet {
  max-width: min(240px, 60vw);
  min-height: 36px;
}

.profile-menu {
  position: relative;
}

.profile-menu summary {
  list-style: none;
  cursor: pointer;
}

.profile-menu summary::-webkit-details-marker {
  display: none;
}

.profile-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: grid;
  gap: 6px;
  width: max-content;
  max-width: 85vw;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 8px;
}

.empty-profile {
  width: min(100% - 32px, 480px);
  margin: clamp(32px, 12vh, 128px) auto;
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-profile h2 {
  margin: 0 0 10px;
  font-size: 23px;
}

.empty-profile p {
  margin: 0 0 22px;
  color: var(--muted);
}

.initial-sync {
  margin: 14px 20px;
  color: var(--muted);
}

.rnp thead .col-supply {
  padding-inline-end: 20px;
}

.supply-help {
  position: absolute;
  top: 0;
  right: 2px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.supply-help span {
  display: grid;
  width: 11px;
  height: 11px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 8px;
  line-height: 1;
}

.supply-help:hover,
.supply-help:focus-visible {
  color: var(--ink);
}

.supply-help:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
  border-radius: 5px;
}

.supply-help__popover {
  position: fixed;
  inset: auto;
  box-sizing: border-box;
  width: min(285px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: 0 10px 24px rgb(0 0 0 / 35%);
  font-size: 14px;
  line-height: 1.45;
}

.supply-help__popover h2 {
  margin: 0 0 6px;
  font-size: 15px;
}

.supply-help__popover p {
  margin: 0;
}

.supply-help__popover ul {
  margin: 8px 0;
  padding-left: 20px;
}
