:root {
  --bg: #0c0d10;
  --bg-2: #13151a;
  --ink: #f4f1ea;
  --muted: #9a958a;
  --card: rgba(255, 255, 255, 0.045);
  --card-solid: #17191f;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #d8f56a;
  --accent-ink: #12140c;
  --hot: #ffb38a;
  --danger: #ff8f8f;
  --radius: 24px;
  --font: "IBM Plex Sans", Roboto, Arial, sans-serif;
  --serif: "IBM Plex Sans", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background: var(--bg);
  letter-spacing: 0;
}
body.app, body.auth { position: relative; overflow-x: hidden; }
a { color: inherit; }
button, input { font: inherit; }

.orb {
  position: fixed;
  z-index: 0;
  width: 42vw;
  height: 42vw;
  pointer-events: none;
  filter: blur(80px);
  opacity: .35;
}
.orb-a { top: -12vw; left: -8vw; background: #2a4630; }
.orb-b { right: -10vw; bottom: -16vw; background: #3a2a12; }

.wrap, .nav { position: relative; z-index: 1; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto 72px; }

.nav {
  width: min(1180px, calc(100% - 32px));
  margin: 20px auto 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.brand strong { font-size: 15px; }
.mark {
  width: 40px; height: 40px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.nav-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
}
.tab {
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.tab.active {
  background: var(--accent);
  color: var(--accent-ink);
}
.tab:hover:not(.active) { color: var(--ink); }
.who { color: var(--muted); font-size: 14px; }

.chip, .pill {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--muted);
}
.chip-live { color: var(--accent); border-color: transparent; background: rgba(216, 245, 106, .12); }
.pill.on { color: var(--accent); background: rgba(216, 245, 106, .12); border-color: transparent; }

.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.stock-block { margin-top: 28px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 8px;
}
h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: .95;
}
h1 em { font-style: italic; color: #e7e0d2; }
h2 { margin: 0; font-size: 18px; font-weight: 600; }

.lede, .muted, .empty, .empty-state p { color: var(--muted); }
.lede { line-height: 1.5; }

button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
button.primary { padding: 14px 22px; }
button:disabled { opacity: .55; cursor: wait; }
button.ozon-promo:disabled { cursor: not-allowed; }
button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
button.mepps-fix, button.ozon-promo {
  margin-top: 8px;
  padding: 6px 12px;
  font-size: 12px;
}
.promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
button.ghost.ozon-promo-add {
  background: #8fd36a;
  color: #12140c;
  border-color: transparent;
}
button.ghost.ozon-promo-add:hover { background: #a3e07e; }
button.ghost.ozon-promo-update {
  background: var(--hot);
  color: #1a120c;
  border-color: transparent;
}
button.ghost.ozon-promo-update:hover { background: #ffc4a3; }
button.ghost.ozon-promo-remove {
  background: rgba(255, 143, 143, .14);
  color: var(--danger);
  border-color: rgba(255, 143, 143, .5);
}
button.ghost.ozon-promo-remove:hover {
  background: var(--danger);
  color: #1a0e0e;
}

input {
  background: #0e1014;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}
input:focus { border-color: rgba(216, 245, 106, .5); }

label { display: grid; gap: 8px; font-size: 13px; color: var(--muted); }

.alert {
  background: rgba(255, 179, 138, .12);
  color: var(--hot);
  padding: 12px 16px;
  border-radius: 16px;
  margin-bottom: 18px;
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.tile, .panel, .note, .log, .login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
}
.tile { padding: 20px; min-height: 150px; }
.tile p, .tile span { margin: 0; color: var(--muted); font-size: 13px; }
.tile strong {
  display: block;
  margin: 18px 0 10px;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.tile strong.when { font-size: 28px; line-height: 1.1; }
.tile-hot strong { color: var(--hot); }
.tile-wide { grid-column: 1 / -1; min-height: auto; }
.tile-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 18px; }
.tile-head .muted { margin: 6px 0 0; font-size: 13px; }

.schedule-form { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.time-field { margin: 0; }
.time-field input { min-width: 150px; color-scheme: dark; }

.switch {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  color: var(--ink);
}
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slider {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: #2a2d34;
  position: relative;
  transition: .2s ease;
}
.slider:before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f4f1ea;
  top: 3px;
  left: 3px;
  transition: .2s ease;
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider:before { transform: translateX(18px); background: var(--accent-ink); }
.switch-label { font-size: 14px; color: var(--ink); }

.note { padding: 14px 16px; color: var(--muted); margin: 0 0 18px; }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel { padding: 8px; min-height: 280px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px 8px;
}
.count {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.06);
  font-size: 13px;
}
.items { list-style: none; padding: 6px; margin: 0; display: grid; gap: 6px; }
.items li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px;
  align-items: center;
  border-radius: 18px;
}
.items li:hover { background: rgba(255,255,255,.04); }
.items img, .ph {
  width: 72px; height: 72px;
  object-fit: contain;
  background: #101217;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.items a { font-weight: 600; text-decoration: none; }
.items a:hover { color: var(--accent); }
.items p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.empty-state { padding: 48px 22px; text-align: center; }
.empty-state p { margin: 0; }

.chapter { margin-top: 48px; }
.chapter-lead { margin: -8px 0 18px; }
.sku {
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 6px;
  word-break: break-all;
}
.log { margin-top: 14px; padding: 12px 16px; }
summary { cursor: pointer; color: var(--muted); }
pre { white-space: pre-wrap; font-size: 12px; color: var(--muted); }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); padding: 36px 32px 32px; }
.login-card .mark { margin-bottom: 22px; }
.login-card h1 { font-size: 42px; margin-bottom: 10px; }
.login-card form { margin-top: 22px; display: grid; gap: 4px; }
.login-card button { width: 100%; margin-top: 10px; padding: 14px; }

.bento-ozon { grid-template-columns: repeat(3, 1fr); }
.sources-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  margin-bottom: 18px;
}
.sources-head {
  display: grid;
  gap: 6px;
}
.sources-head h2 { font-size: 22px; }
.sources-head .muted { max-width: 44em; margin: 0; }
.source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.source-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .18);
  min-width: 0;
}
.source-card.source-ozon {
  background: rgba(216, 245, 106, .05);
}
.source-card.is-ready { border-color: rgba(216, 245, 106, .22); }
.source-card.is-empty { border-style: dashed; }
.source-top {
  display: flex;
  gap: 12px;
  align-items: start;
  min-width: 0;
}
.source-copy { min-width: 0; flex: 1; }
.source-copy h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.source-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.08);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.source-ozon .source-mark { background: var(--accent); color: var(--accent-ink); }
.source-card h3 { margin: 0; font-size: 16px; color: var(--ink); }
.source-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.source-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: var(--muted);
}
.source-card.is-ready .source-status {
  color: var(--accent);
  background: rgba(216, 245, 106, .12);
}
.source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.source-actions .ghost,
.file-pick {
  padding: 8px 14px;
  font-size: 13px;
  margin: 0;
}
.file-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
}
.file-pick-main {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
.file-pick input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  font-size: 0;
}
.source-file-name {
  font-size: 12px;
  max-width: 18em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sources-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.sources-foot .muted { margin: 0; }
.sources-foot .primary { margin: 0; }
.ghost-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
}
.table-wrap { overflow: auto; padding: 8px; }
table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.grid th, table.grid td {
  text-align: left;
  padding: 12px 10px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
table.grid th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.grid td strong { font-size: 13px; }
table.grid tr.bad { background: rgba(255, 143, 143, .06); }
table.grid tr.mixed { background: rgba(255, 179, 138, .05); }
table.grid tr.dim td { opacity: .55; }
table.grid p { margin: 4px 0 0; }
.range { display: grid; gap: 4px; }
.range-line { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.range-k { color: var(--muted); font-size: 11px; min-width: 6.6em; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }
.money.neg { color: var(--danger); }
.money.pos { color: var(--accent); }
.money.zero { color: var(--muted); }
.sku-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  word-break: break-all;
}
.sku-link:hover { text-decoration: underline; }
.rec { color: var(--hot); font-variant-numeric: tabular-nums; }
.ozon-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
  justify-content: space-between;
  margin: 0 0 10px;
}
#ozon-boost .filter-chip { min-width: auto; }
.ozon-filter { margin: 0; min-width: min(320px, 100%); }
.ozon-margin-box { min-width: auto; }
.ozon-margin-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ozon-margin-row input[type="number"] {
  width: 72px;
  padding: 8px 10px;
  border-radius: 12px;
}
.ozon-count { margin: 0 0 12px; }
.ozon-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0 0;
}
.ozon-pager .pager-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
.ozon-pager .pager-btn[disabled] { opacity: .4; cursor: default; }
.filters {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
}
.filters[hidden],
.ozon-margin-box[hidden],
#ozon-reprice[hidden],
.is-hidden {
  display: none !important;
}
.filter-chip {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
}
.filter-chip.active {
  background: var(--accent);
  color: var(--accent-ink);
}
.th-sort {
  white-space: nowrap;
  text-align: left;
}
.th-sort .th-arrows {
  display: flex;
  gap: 2px;
  margin: 4px 0 0;
}
.sort-arrow {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 7px;
  min-width: auto;
  line-height: 1.4;
  font-size: 12px;
}
.sort-arrow.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
.field { display: grid; gap: 8px; }
.user-create {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 16px;
  align-items: end;
  padding: 20px;
  margin-bottom: 18px;
}
.user-create button { white-space: nowrap; }
.access-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  border: 0;
  margin: 0;
  padding: 0;
  align-items: center;
}
.access-picks legend { font-size: 12px; color: var(--muted); width: 100%; margin-bottom: 4px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--accent); }
.user-edit { display: grid; gap: 10px; justify-items: start; }
.user-edit input[type=password] { min-width: 180px; }
.danger { color: var(--danger); }
.users-grid td { vertical-align: middle; }

@media (max-width: 900px) {
  .bento, .bento-ozon { grid-template-columns: 1fr 1fr; }
  .panels { grid-template-columns: 1fr; }
  .user-create { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .nav { align-items: start; flex-direction: column; }
  .tabs { width: 100%; }
  .tab { flex: 1; text-align: center; }
  .source-grid { grid-template-columns: 1fr; }
}

body.site { position: relative; overflow-x: hidden; }
.site-nav, .site-wrap, .site-foot { position: relative; z-index: 1; }
.site-nav, .site-wrap, .site-foot {
  width: min(920px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}
.site-nav {
  margin-top: 22px;
  margin-bottom: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.site-links {
  display: flex;
  gap: 18px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.site-links a { text-decoration: none; }
.site-links a:hover { color: var(--ink); }
.site-login {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
}
.site-hero { margin-bottom: 56px; }
.site-hero h1 { max-width: 12ch; }
.site-hero .lede { max-width: 38em; margin: 16px 0 28px; }
.site-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.site-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.site-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}
.site-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.site-grid article p:first-child {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}
.site-grid h2 { font-size: 18px; margin-bottom: 8px; }
.site-grid article p:last-child { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.site-markets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 56px;
}
.site-markets span {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.site-contact {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 64px;
}
.site-contact h2 { font-size: 28px; margin-bottom: 8px; }
.site-contact ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-contact a { color: var(--ink); font-weight: 600; text-decoration: none; }
.site-contact a:hover { color: var(--accent); }
.site-price {
  margin: 0 0 56px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.site-price h2 { font-size: clamp(28px, 4vw, 40px); margin: 8px 0 10px; }
.site-price .lede { margin: 0; max-width: 36em; }
.site-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px 0 48px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}
.site-foot p { margin: 0 0 4px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }
.site-foot-links { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.legal h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 12px; }
.legal h2 { font-size: 18px; margin: 28px 0 10px; }
.legal p, .legal li { color: var(--muted); line-height: 1.55; }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; margin: 0 0 12px; }
.legal a { color: var(--ink); }
.login-home { margin-bottom: 18px; width: fit-content; }

@media (max-width: 720px) {
  .site-grid, .site-contact { grid-template-columns: 1fr; }
}
