:root {
  --bg: #0f1419;
  --panel: #1a222c;
  --line: #2c3845;
  --text: #e8eef4;
  --muted: #8b9aab;
  --accent: #e85d04;
  --ok: #2a9d8f;
  --warn: #e9c46a;
  --bad: #e76f51;
  --radius: 14px;
  font-family: "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, #0f1419 0%, #1a2836 50%, #121820 100%);
  color: var(--text);
}
a { color: #7eb8ff; }
.wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }
.topbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  justify-content: space-between; margin-bottom: 24px;
}
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.02em; }
.brand span { color: var(--accent); }
.nav a { margin-right: 12px; text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
h1 { font-size: 1.5rem; margin: 0 0 8px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 0.92rem; }
label { display: block; font-size: 0.85rem; color: var(--muted); margin: 12px 0 6px; }
.pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pass-wrap input {
  padding-right: 44px;
}
.pass-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 36px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted);
  box-shadow: none;
}
.pass-toggle:hover { color: var(--text); }
.pass-toggle svg { display: block; pointer-events: none; }
input, textarea, select, button {
  font: inherit; border-radius: 10px; border: 1px solid var(--line);
  background: #0f1419; color: var(--text); padding: 10px 12px; width: 100%;
}
textarea { min-height: 140px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .row { grid-template-columns: 1fr; } }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
button, .btn {
  cursor: pointer; width: auto; background: var(--accent); border: none;
  color: #fff; font-weight: 600; padding: 10px 16px;
  position: relative;
  z-index: 1;
  pointer-events: auto;
  -webkit-tap-highlight-color: rgba(232, 93, 4, 0.35);
  touch-action: manipulation;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease, filter .15s ease, color .15s ease, opacity .15s ease;
}
button:disabled, .btn:disabled {
  opacity: 0.55;
  cursor: wait;
  filter: grayscale(0.15);
  box-shadow: none;
  transform: none;
}
button.secondary, .btn.secondary { background: transparent; border: 1px solid var(--line); color: var(--text); }
button.secondary:hover,
.btn.secondary:hover {
  color: #fff;
  border-color: var(--accent);
  background: rgba(232, 93, 4, 0.18);
  box-shadow: 0 0 0 1px rgba(232, 93, 4, 0.45), 0 0 14px rgba(232, 93, 4, 0.35);
}
button.secondary:active,
.btn.secondary:active {
  color: #fff;
  border-color: #ffb070;
  background: rgba(232, 93, 4, 0.38);
  box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.55), inset 0 0 0 1px rgba(255, 176, 112, 0.35);
  transform: translateY(1px);
}
button.secondary:focus-visible,
.btn.secondary:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.45);
}
button:hover:not(.secondary):not(.list-item-x):not(.thumb-remove):not(.thumb-move-btn):not(.admin-calc-close):not(.admin-calc-rot):not(.pass-toggle):not(.lang-btn):not(.card-wh-copy):not(.mine-toggle),
.btn:hover:not(.secondary) {
  filter: brightness(1.08);
  box-shadow: 0 0 0 1px rgba(255, 176, 112, 0.35), 0 0 16px rgba(232, 93, 4, 0.4);
}
button:active:not(.secondary):not(.list-item-x):not(.thumb-remove):not(.thumb-move-btn):not(.admin-calc-close):not(.admin-calc-rot):not(.pass-toggle):not(.lang-btn):not(.card-wh-copy):not(.mine-toggle),
.btn:active:not(.secondary) {
  filter: brightness(0.92);
  transform: translateY(1px);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
button.ok:hover { filter: brightness(1.08); box-shadow: 0 0 14px rgba(42, 157, 143, 0.45); }
button.ok:active { filter: brightness(0.92); transform: translateY(1px); }
button.bad:hover { filter: brightness(1.08); box-shadow: 0 0 14px rgba(231, 111, 81, 0.45); }
button.bad:active { filter: brightness(0.92); transform: translateY(1px); }
.list-item .actions button,
.review-card .actions button {
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease, filter .15s ease, color .15s ease;
}
button.ok { background: var(--ok); }
button.bad { background: var(--bad); }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 0.75rem; background: #2a3542; color: var(--muted);
}
.badge.pending { background: #3d3420; color: var(--warn); }
.badge.approved, .badge.published { background: #1d3a34; color: #7ddecb; }
.badge.rejected { background: #3a2420; color: #ffb4a2; }
.list-item {
  border-top: 1px solid var(--line); padding: 14px 0;
  display: grid; gap: 8px;
}
.list-item:first-child { border-top: none; }
.mine-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.mine-head h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.mine-toggle {
  flex: 0 0 auto;
  width: 44px !important;
  min-width: 44px;
  height: 40px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  box-shadow: none;
  z-index: 2;
}
.mine-toggle:hover {
  color: #fff;
  border-color: var(--accent);
  background: rgba(232, 93, 4, 0.22);
  filter: none;
  box-shadow: none;
}
.mine-toggle:active {
  transform: translateY(1px);
  filter: none;
}
/* свёрнуто: первая плашка всегда видна, остальное скрыто */
#my.mine-collapsed .list-item:not(.mine-first),
#my2.mine-collapsed .list-item:not(.mine-first),
#my3.mine-collapsed .list-item:not(.mine-first) {
  display: none;
}
.mine-menu-title {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
}
.mine-section { margin-top: 8px; }
.mine-section-title {
  margin: 16px 0 4px;
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 700;
}
.mine-section:first-child .mine-section-title { margin-top: 0; }
.mine-section .list-item:first-of-type { border-top: none; }
/* крестик корзины в списке авто — не наследовать width:100% у button */
.list-item-car {
  position: relative;
  padding-right: 44px;
}
.list-item-x {
  position: absolute;
  top: 12px;
  right: 0;
  width: 34px !important;
  min-width: 34px;
  height: 34px;
  padding: 0 !important;
  border-radius: 10px;
  background: transparent !important;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: none;
}
.list-item-x:hover {
  color: #fff;
  border-color: transparent;
  background: var(--bad) !important;
}
.err { color: #ffb4a2; margin-top: 8px; }
.okmsg { color: #7ddecb; margin-top: 8px; }
.preview {
  display: grid; grid-template-columns: 160px 1fr; gap: 14px; align-items: start;
}
.preview img { width: 160px; height: 110px; object-fit: cover; border-radius: 10px; background: #000; }
button.card-wh-copy,
.card-wh-copy {
  display: inline;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  background: none !important;
  color: inherit !important;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  cursor: copy;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  -webkit-tap-highlight-color: transparent;
}
button.card-wh-copy:hover,
.card-wh-copy:hover,
button.card-wh-copy.is-copied,
.card-wh-copy.is-copied,
button.card-wh-copy:active,
.card-wh-copy:active,
button.card-wh-copy:disabled,
.card-wh-copy:disabled {
  color: var(--ok) !important;
  background: none !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  opacity: 1;
  cursor: copy;
}
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumbs img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; display: block; }
.thumb-item {
  position: relative;
  width: 72px;
  height: 54px;
  flex-shrink: 0;
}
.thumb-item.is-cover { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 8px; }
.thumb-item.is-dragging { opacity: 0.55; }
.thumb-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  z-index: 2;
  max-width: calc(100% - 8px);
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.thumb-item.is-cover .thumb-badge,
.review-photo-item.is-cover .thumb-badge { background: var(--accent); }
.thumb-move {
  display: none;
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  top: auto;
  z-index: 3;
  gap: 2px;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  pointer-events: none;
}
.thumbs.has-moves .thumb-move { display: flex; }
button.thumb-move-btn,
.thumb-move-btn {
  pointer-events: auto;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px;
  height: 18px !important;
  min-height: 18px;
  padding: 0 !important;
  margin: 0;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  color: #fff !important;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button.thumb-move-btn:hover:not(:disabled),
.thumb-move-btn:hover:not(:disabled),
button.thumb-move-btn:focus-visible:not(:disabled),
.thumb-move-btn:focus-visible:not(:disabled) {
  background: var(--accent) !important;
  border-color: rgba(255, 207, 179, 0.85) !important;
  box-shadow: 0 0 8px rgba(232, 93, 4, 0.55);
  outline: none;
}
button.thumb-move-btn:disabled,
.thumb-move-btn:disabled { opacity: 0.35; cursor: default; }
button.thumb-remove,
.thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 4;
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  min-height: 20px;
  padding: 0 !important;
  margin: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35) !important;
  background: #1a222c !important;
  color: #fff !important;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
button.thumb-remove:hover,
.thumb-remove:hover { background: var(--bad) !important; border-color: transparent !important; }

.review-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}
.review-photo-item {
  position: relative;
  width: 72px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: visible;
  background: #0b1018;
}
.review-photo-item.is-cover { outline: 2px solid var(--accent); outline-offset: 1px; }
.review-photo-item.is-dragging { opacity: 0.55; }
.review-photo-item.is-trash {
  height: auto;
  cursor: default;
  opacity: 0.85;
  outline: 1px dashed rgba(255,255,255,.25);
  outline-offset: 1px;
}
.review-photo-item.is-trash img {
  opacity: 0.7;
  filter: grayscale(0.35);
}
.review-photo-item > a {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}
.review-photo-item img {
  display: block;
  width: 72px !important;
  height: 54px !important;
  max-width: 72px !important;
  object-fit: cover;
  border-radius: 8px;
}
.review-photos.has-moves .thumb-move,
.review-photos.has-moves .review-photo-item .thumb-move { display: flex; }
.review-photo-item .thumb-move {
  display: none;
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  top: auto;
  z-index: 3;
  gap: 2px;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  pointer-events: none;
}
.photo-restore {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 4px 6px;
  font-size: 0.72rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #1a222c !important;
  color: #fff !important;
  cursor: pointer;
}
.photo-restore:hover { border-color: var(--accent); color: var(--accent) !important; }

/* Review card — compact, fits viewport */
.review-card.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  max-height: calc(100vh - 52px);
  overflow: auto;
  overscroll-behavior: contain;
}
.review-card .step-title {
  margin: 10px 0 4px;
  font-size: 0.88rem;
}
.review-card > .muted {
  margin: 0 0 4px;
  font-size: 0.82rem;
}
.review-card > .err,
.review-card > .okmsg {
  margin: 0;
  font-size: 0.85rem;
}
.review-head {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.review-head > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}
.review-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}
.review-price {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: flex-start;
  padding-top: 2px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #7ddecb;
  white-space: nowrap;
  line-height: 1.2;
}
.review-price.is-missing { color: #ffb4a2; }
.review-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  line-height: 1.35;
  min-width: 0;
}
.review-pair > div { min-width: 0; }
.review-k {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.review-grid,
.review-card .review-grid-edit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 8px 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}
.review-card .review-field { min-width: 0; }
.review-card input,
.review-card select,
.review-card textarea {
  width: 100%;
  padding: 10px 12px;
  min-height: 42px;
  box-sizing: border-box;
  line-height: 1.3;
}
.review-card textarea {
  min-height: 88px !important;
  max-height: 160px;
  resize: vertical;
}
.review-card .review-price-input {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 42px;
  margin: 0 0 10px;
  padding: 10px 12px;
}
.review-card .bi-head {
  margin: 6px 0 2px;
  font-size: 0.72rem;
}
.review-card .actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 12px;
  padding-top: 10px;
  background: linear-gradient(180deg, transparent, var(--panel) 28%);
  gap: 10px;
  align-items: stretch;
}
.review-card .actions button {
  min-height: 42px;
  padding: 10px 16px;
  font-size: 0.92rem;
  line-height: 1.2;
  box-sizing: border-box;
}
/* Фото в проверке — всегда миниатюры, не на весь экран */
.review-card .review-photos {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px 8px;
  max-height: none;
  min-height: 64px;
  overflow: visible;
  margin: 6px 0 12px;
  padding: 4px 2px 8px;
}
.review-card .review-photos-trash {
  max-height: 140px;
  overflow: auto;
  min-height: 0;
}
.review-card .review-photo-item {
  position: relative;
  width: 96px !important;
  height: 72px !important;
  flex: 0 0 96px;
  border-radius: 8px;
  overflow: visible;
  background: #0b1018;
}
.review-card .review-photo-item > a {
  display: block;
  width: 96px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.review-card .review-photo-item img {
  display: block !important;
  width: 96px !important;
  height: 72px !important;
  max-width: 96px !important;
  max-height: 72px !important;
  object-fit: cover !important;
  border-radius: 8px;
}
.review-card .review-photo-item .thumb-badge {
  left: 4px;
  bottom: 4px;
  z-index: 2;
}
.review-card .review-photo-item .thumb-remove {
  top: -6px;
  right: -6px;
}
.review-card .review-photos.has-moves .review-photo-item {
  margin-bottom: 2px;
}
@media (max-width: 720px) {
  .review-pair,
  .review-grid,
  .review-card .review-grid-edit { grid-template-columns: 1fr; }
  .review-card.card { max-height: calc(100vh - 24px); }
  .review-head { gap: 10px; }
  .review-price { font-size: 1.05rem; }
}

.file-pick {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.file-pick input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.file-pick-btn {
  width: auto;
  min-width: 120px;
  pointer-events: auto;
  cursor: pointer;
}
.file-pick-name {
  color: var(--muted);
  font-size: 0.9rem;
}
.dropzone {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #121820;
  position: relative;
}
.dropzone.is-dragover {
  border-color: var(--accent);
  background: #18202a;
}

/* Admin customs calc modal — compact approved layout */
.admin-calc-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
}
.admin-calc-modal[hidden] { display: none !important; }
.admin-calc-sheet {
  width: min(640px, 100%);
  max-height: min(92vh, 960px);
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #0c1016;
  padding: 18px 18px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.admin-calc-sheet h2 { margin: 0 40px 8px 0; font-size: 1.2rem; }
button.admin-calc-close,
.admin-calc-close {
  float: right;
  width: 36px !important;
  min-width: 36px;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 999px;
  border: 1px solid var(--line) !important;
  background: #151a22 !important;
  color: #fff !important;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}
.admin-calc-close:hover,
.admin-calc-close:focus-visible {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.35);
}
.admin-calc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
@media (max-width: 560px) {
  .admin-calc-fields { grid-template-columns: 1fr; }
}
.admin-calc-fields label,
.admin-calc-price label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}
.admin-calc-fields input,
.admin-calc-fields select,
.admin-calc-price input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #121820;
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  box-sizing: border-box;
}
.admin-calc-ym { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; }
.admin-calc-age {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(61, 214, 140, 0.35);
  background: rgba(61, 214, 140, 0.08);
  color: #3dd68c;
  font-size: 0.84rem;
  font-weight: 700;
}
.admin-calc-age.is-empty {
  border-color: var(--line);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  font-weight: 600;
}
.admin-calc-plate {
  margin: 10px 0 14px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(125, 222, 203, 0.28);
  background: rgba(125, 222, 203, 0.05);
}
.admin-calc-plate[hidden] { display: none !important; }
.admin-calc-plate-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
}
.admin-calc-plate-stage {
  border-radius: 10px;
  background: #000;
  overflow: hidden;
}
.admin-calc-plate a { display: block; }
.admin-calc-plate img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #000;
}
.admin-calc-plate-tools {
  display: grid;
  grid-template-columns: 48px 48px 1fr;
  gap: 8px;
  margin-top: 8px;
}
button.admin-calc-rot,
button.admin-calc-scan,
.admin-calc-rot,
.admin-calc-scan {
  min-height: 42px;
  width: auto !important;
  border-radius: 12px;
  border: 1px solid var(--line) !important;
  background: #151a22 !important;
  color: #fff !important;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}
.admin-calc-rot { font-size: 1.15rem; padding: 0 !important; }
.admin-calc-scan { font-size: 0.92rem; }
.admin-calc-rot:hover,
.admin-calc-rot:focus-visible,
.admin-calc-scan:hover,
.admin-calc-scan:focus-visible {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.35);
  background: rgba(232, 93, 4, 0.12) !important;
}
.admin-calc-scan:disabled,
.admin-calc-rot:disabled {
  opacity: 0.55;
  cursor: wait;
}
.admin-calc-price { margin: 12px 0; display: grid; gap: 6px; }
.admin-calc-price-row {
  display: grid;
  grid-template-columns: 1fr minmax(140px, 1.1fr);
  gap: 10px;
  align-items: center;
}
.admin-calc-price-row:has(#adminCalcRub[hidden]) {
  grid-template-columns: 1fr;
}
@media (max-width: 560px) {
  .admin-calc-price-row { grid-template-columns: 1fr; }
}
.admin-calc-rub {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(125, 222, 203, 0.35);
  background: rgba(125, 222, 203, 0.08);
  color: #7ddecb;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-calc-rub[hidden] { display: none !important; }
.admin-calc-rub.is-preview {
  border-style: dashed;
  color: #ffd7b0;
  border-color: rgba(232, 93, 4, 0.55);
  background: rgba(232, 93, 4, 0.1);
}
.admin-calc-china-cost {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}
.admin-calc-china-cost-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.admin-calc-china-cost input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #121820;
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  box-sizing: border-box;
}
.admin-calc-china-unit {
  min-width: 28px;
  color: var(--text);
  font-weight: 700;
}
.admin-calc-fees {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 12px;
}
@media (max-width: 560px) {
  .admin-calc-fees { grid-template-columns: 1fr; }
}
.admin-calc-fees label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}
.admin-calc-fees input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #121820;
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  box-sizing: border-box;
}
button.admin-calc-run,
.admin-calc-run {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #111;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.admin-calc-run:hover,
.admin-calc-run:focus-visible {
  filter: brightness(1.06);
  box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.4);
}
.admin-calc-run:disabled { opacity: 0.55; cursor: wait; }
.admin-calc-preview {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(232, 93, 4, 0.55);
  background: rgba(232, 93, 4, 0.08);
}
.admin-calc-preview[hidden] { display: none !important; }
.admin-calc-preview-row,
.admin-calc-preview-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 4px 0;
  font-size: 0.9rem;
}
.admin-calc-preview-row span { color: var(--muted); }
.admin-calc-preview-row b { font-weight: 700; }
.admin-calc-preview-total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(232, 93, 4, 0.35);
  font-weight: 800;
}
.admin-calc-preview-total b {
  color: #ffd7b0;
  font-size: 1.05rem;
}
.admin-calc-preview-delta {
  margin: 8px 0 0;
  color: #ffd7b0;
  font-size: 0.85rem;
}
.admin-calc-preview-delta[hidden] { display: none !important; }
.admin-calc-preview-hint {
  margin: 8px 0 0;
  font-size: 0.8rem;
}
.admin-calc-preview-hint[hidden] { display: none !important; }
.admin-calc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.admin-calc-actions button {
  min-height: 46px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}
.admin-calc-actions .ok {
  border: 0;
  background: var(--ok, #3dd68c);
  color: #111;
}
.admin-calc-actions .ok:hover,
.admin-calc-actions .ok:focus-visible {
  filter: brightness(1.06);
  box-shadow: 0 0 0 2px rgba(61, 214, 140, 0.35);
}
.admin-calc-actions .bad {
  border: 1px solid rgba(255, 107, 107, 0.55);
  background: rgba(255, 107, 107, 0.12);
  color: #ffb4a2;
}
.admin-calc-actions .bad:hover,
.admin-calc-actions .bad:focus-visible {
  background: rgba(255, 107, 107, 0.22);
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.3);
}
.admin-calc-status { margin: 10px 0 0; font-size: 0.9rem; color: #7ddecb; }
.admin-calc-status.is-err { color: #ffb4a2; }
.admin-calc-out {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(125, 222, 203, 0.28);
  background: rgba(125, 222, 203, 0.06);
}
.admin-calc-out[hidden] { display: none !important; }
.admin-calc-out-title { font-weight: 800; margin-bottom: 8px; }
.admin-calc-dl { display: grid; gap: 6px; margin: 0; }
.admin-calc-dl > div {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.admin-calc-dl dt { margin: 0; color: var(--muted); }
.admin-calc-dl dd { margin: 0; font-weight: 700; color: #7ddecb; }
.admin-calc-dl .is-grand dt,
.admin-calc-dl .is-grand dd {
  color: #7ddecb;
  font-weight: 800;
}

.bi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bi-grid input.is-auto-ru,
.bi-grid textarea.is-auto-ru {
  opacity: 0.85;
  cursor: default;
}
.bi-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 4px;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.step-title {
  margin: 18px 0 8px;
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 700;
}
.shared-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .bi-grid, .bi-head, .shared-row { grid-template-columns: 1fr; }
}

.lang-btn {
  width: auto; min-width: 44px; padding: 6px 10px; font-size: 0.8rem;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
}
.lang-btn.is-active { color: #fff; border-color: var(--accent); background: rgba(232,93,4,0.2); }

td, th { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; width: 36%; }


/* sold ticker */
.ticker{position:fixed;top:0;left:0;right:0;z-index:70;overflow:hidden;border-bottom:1px solid var(--line);background:#0b1018;color:#a8b4c8;font-size:.78rem;white-space:nowrap;height:34px}
.ticker-track{display:inline-flex;gap:48px;padding:8px 0;animation:ktTicker 40s linear infinite}
@keyframes ktTicker{from{transform:translateX(0)}to{transform:translateX(-50%)}}
body.has-sold-ticker{padding-top:34px}

.wrap-wide { max-width: 1100px; }
.msg-layout {
  --msg-cyan: #66ffe3;
  --msg-cyan-dim: rgba(102,255,227,.55);
  --msg-panel: #0b0e12;
  --msg-line: rgba(255,255,255,.08);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  min-height: 460px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--msg-line);
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 7px),
    radial-gradient(circle at 12% 0%, rgba(102,255,227,.08), transparent 42%),
    linear-gradient(160deg, #0a0c10 0%, #12161c 55%, #080a0d 100%);
}
@media (max-width: 820px) {
  .msg-layout { grid-template-columns: 1fr; }
}
.msg-threads {
  border: 1px solid var(--msg-line);
  border-radius: 14px;
  background: rgba(8,10,14,.88);
  overflow: auto;
  max-height: 560px;
}
.msg-thread {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-top: 1px solid transparent;
  border-bottom: 1px solid var(--msg-line);
  border-radius: 0;
  color: #fff;
  padding: 14px 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.msg-thread:hover {
  background: rgba(102,255,227,.04);
  color: #fff;
}
.msg-thread.is-active {
  background: rgba(102,255,227,.06);
  border-top-color: var(--msg-cyan);
  border-bottom-color: var(--msg-cyan);
  box-shadow:
    0 0 0 1px rgba(102,255,227,.28),
    0 0 10px rgba(102,255,227,.45),
    0 0 22px rgba(102,255,227,.18);
  color: #fff;
}
.msg-thread-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.msg-thread-preview {
  margin-top: 5px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #8a9296;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-unread {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(102,255,227,.18);
  border: 1px solid var(--msg-cyan-dim);
  color: var(--msg-cyan);
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow: 0 0 10px rgba(102,255,227,.25);
}
.msg-section {
  padding: 14px 14px 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a9296;
  border-bottom: none;
  font-weight: 600;
}
.msg-section-empty {
  padding: 8px 14px 14px;
  font-size: 0.82rem;
  margin: 0;
  color: #8a9296;
}
.msg-thread.is-client .msg-thread-top span {
  color: #fff;
}
.msg-pane {
  border: 1px solid var(--msg-line);
  border-radius: 14px;
  background: rgba(8,10,14,.92);
  display: flex;
  flex-direction: column;
  min-height: 460px;
  box-shadow: inset 0 0 40px rgba(102,255,227,.03);
}
.msg-pane-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--msg-line);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.msg-pane-head > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.msg-pane-head strong {
  color: #fff;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}
.msg-pane-head .muted {
  color: #8a9296;
  font-size: 0.82rem;
}
.msg-thread.is-unclaimed:not(.is-active) {
  background: rgba(102,255,227,.03);
}
.msg-thread.is-unclaimed .msg-thread-top span {
  color: var(--msg-cyan);
  text-shadow: 0 0 12px rgba(102,255,227,.25);
}
#msgClaim {
  flex-shrink: 0;
  white-space: nowrap;
  background: transparent;
  color: var(--msg-cyan);
  border: 1px solid rgba(102,255,227,.88);
  border-radius: 10px;
  min-height: 38px;
  padding: 0 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
  box-shadow:
    0 0 0 1px rgba(102,255,227,.28),
    0 0 10px rgba(102,255,227,.4),
    0 0 22px rgba(102,255,227,.16);
}
#msgClaim:hover {
  background: rgba(102,255,227,.08);
  color: #fff;
}
.msg-list {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.012) 0 2px, transparent 2px 8px);
}
.msg-bubble {
  max-width: 85%;
  align-self: flex-start;
  background: rgba(18,22,28,.95);
  border: 1px solid var(--msg-line);
  border-radius: 14px;
  padding: 11px 13px;
}
.msg-bubble.is-mine {
  align-self: flex-end;
  background: rgba(102,255,227,.08);
  border-color: rgba(102,255,227,.35);
  box-shadow: 0 0 14px rgba(102,255,227,.12);
}
.msg-bubble-meta {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  font-size: 0.78rem;
  margin-bottom: 4px;
  color: #8a9296;
}
.msg-bubble-meta strong { color: #fff; }
.msg-bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
  color: #e8eef4;
}
.msg-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--msg-line);
  align-items: end;
  background: rgba(0,0,0,.22);
}
.msg-compose textarea {
  min-height: 64px;
  margin: 0;
  background: #0d1112;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  color: #fff;
}
.msg-compose textarea:focus {
  outline: none;
  border-color: rgba(102,255,227,.7);
  box-shadow: 0 0 0 1px rgba(102,255,227,.25), 0 0 14px rgba(102,255,227,.18);
}
.msg-compose button[type="submit"] {
  background: transparent;
  color: var(--msg-cyan);
  border: 1px solid rgba(102,255,227,.88);
  border-radius: 12px;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 700;
  box-shadow:
    0 0 0 1px rgba(102,255,227,.28),
    0 0 10px rgba(102,255,227,.4);
}
.msg-compose button[type="submit"]:hover {
  background: rgba(102,255,227,.1);
  color: #fff;
}
.msg-layout .err {
  color: #ff8f7a;
  padding: 0 14px 12px;
}
/* org tree — managers → clients → chat */
.org-tree { display: flex; flex-direction: column; gap: 12px; }
.org-tree-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.org-create, .org-add-client, .card-inner {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #121820;
}
.org-create h3 { margin: 0 0 10px; font-size: 1rem; }
.org-node {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f141c;
  padding: 0 10px 10px;
}
.org-node > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.org-node > summary::-webkit-details-marker { display: none; }
.org-node > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--muted, #8b98ab);
}
.org-node[open] > summary::before { content: "▾"; }
.org-sum-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.org-count {
  margin-left: auto;
  min-width: 22px;
  text-align: center;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(232,93,4,0.2);
  color: #ffb088;
}
.org-preview { font-size: 0.82rem; padding-left: 18px; }
.org-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.org-tools .danger, button.danger {
  background: transparent;
  border: 1px solid #a33;
  color: #f88;
}
.org-children { display: flex; flex-direction: column; gap: 8px; margin-left: 8px; }
.org-client { background: #141a24; }
.org-empty { margin: 4px 0 8px; }
.org-chat {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #0b1018;
}
.org-chat-msgs {
  max-height: 240px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.org-msg { padding: 8px 10px; border-radius: 10px; background: #1a2230; }
.org-msg.is-client { background: rgba(232,93,4,0.12); }
.org-msg-meta { font-size: 0.72rem; color: #8b98ab; margin-bottom: 4px; }
.org-chat-form { display: grid; gap: 8px; }
.org-chat-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 56px;
}
.org-add-form { display: grid; gap: 8px; }



/* messenger rich car link cards */
.kt-msg-link {
  color: #7ec8ff;
  text-decoration: underline;
  word-break: break-all;
}
.kt-msg-linkcard {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #121820;
  color: inherit;
  text-decoration: none !important;
  max-width: 320px;
  overflow: hidden;
}
.kt-msg-linkcard:hover { border-color: rgba(232,93,4,0.55); }
.kt-msg-linkcard-site {
  display: block;
  font-size: 0.72rem;
  color: #9aa6b5;
  margin-bottom: 4px;
}
.kt-msg-linkcard-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f2f4f7;
  margin-bottom: 4px;
  line-height: 1.25;
}
.kt-msg-linkcard-desc {
  display: block;
  font-size: 0.78rem;
  color: #a8b4c8;
  line-height: 1.35;
  margin-bottom: 8px;
}
.kt-msg-linkcard-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #0b1018;
}
.kt-msg-linkcard-img.is-empty { min-height: 72px; }
.kt-msg-linkcard.is-loading { opacity: 0.75; }
.msg-bubble-text .kt-msg-linkcard,
.kt-chat-bubble .kt-msg-linkcard,
.org-msg-text .kt-msg-linkcard { margin-top: 8px; }

