/* Айдентика кабинета seller.ggsel.com (сняты стили 14.10.2026): системный шрифт Ant Design,
   зелёный акцент #44CF5E, фон страницы #F5F5F5, белые карточки r=20, кнопки r=12,
   боковое меню 260px с пунктами 40px r=8. Логотип не используем. */
:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: rgba(0, 0, 0, 0.88);
  --muted: #848e9c;
  --line: #f0f0f0;
  --fill: #f0f0f0;          /* серые кнопки и поля */
  --selected: #efefef;      /* выбранный пункт меню */
  --accent: #44cf5e;
  --accent-hover: #3bb852;
  --accent-text: #ffffff;
  --ok: #2ba641;            /* зелёный для текста — темнее акцента, чтобы читался */
  --warn: #d46b08;
  --danger: #ff4d4f;
  --r-card: 20px;
  --r-control: 12px;
  --r-item: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5715 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
h2 { font-size: 16px; font-weight: 600; margin: 24px 0 12px; }

/* Шапка и меню */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; height: 64px;
  padding: 14px 24px; background: var(--surface); }
.product { font-weight: 600; font-size: 16px; color: var(--text); }
.product:hover { text-decoration: none; }
.topbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.layout { display: flex; min-height: calc(100vh - 64px); }
.sider { width: 260px; flex: none; background: var(--surface); padding: 8px 0; }
.menu { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px;
  border-radius: var(--r-item); color: var(--text); white-space: nowrap; }
a.menu-item:hover { background: var(--selected); text-decoration: none; }
.menu-item.active { background: var(--selected); }
.menu-item:not(.active):not(.done) { color: var(--muted); }
.menu-num { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; align-items: center;
  justify-content: center; font-size: 12px; background: var(--fill); color: var(--muted); }
.menu-item.active .menu-num { background: var(--accent); color: var(--accent-text); }
.menu-item.done .menu-num { background: #e3f7e7; color: var(--ok); }

.content { flex: 1; min-width: 0; padding: 16px; }
.no-sider .content { padding-top: 48px; }

/* Карточки */
.card { background: var(--surface); border-radius: var(--r-card); padding: 24px; }
.narrow { max-width: 480px; margin: 0 auto; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar h1 { margin: 0; }
.push-right { margin-left: auto; }

/* Поля и кнопки */
label { display: block; margin: 0 0 16px; color: var(--muted); }
label.check { display: flex; gap: 8px; align-items: center; color: var(--text); }
label.check input { width: auto; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 9px 12px;
  border: 1px solid transparent; border-radius: var(--r-control); background: var(--bg);
  font: inherit; color: var(--text); outline: none; transition: border-color .15s, background .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: var(--surface); }
input[type=checkbox] { display: inline-block; width: 16px; height: 16px; margin: 0;
  accent-color: var(--accent); }
input[type=file] { padding: 7px 12px; }
textarea { resize: vertical; }
button { height: 40px; padding: 0 16px; border: 1px solid var(--accent); border-radius: var(--r-control);
  background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer;
  transition: background .15s; }
button:hover { background: var(--accent-hover); }
button:disabled { opacity: .45; cursor: default; }
button.secondary { background: var(--fill); border-color: var(--fill); color: var(--text); }
button.secondary:hover { background: var(--selected); }
button.small { height: 32px; padding: 0 12px; }
button.link { height: auto; padding: 0; border: 0; background: none; color: var(--accent); font-weight: 400; }
button.link:hover { background: none; text-decoration: underline; }
form.inline { display: flex; gap: 8px; align-items: end; }
form.inline label { margin: 0; }

/* Подсказки «?» и состояния */
.hint { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; background: var(--fill);
  color: var(--muted); font-size: 11px; align-items: center; justify-content: center; cursor: help;
  vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.error { color: var(--danger); }
.warn { color: var(--warn); }
.ok { color: var(--ok); }
.howto { padding-left: 20px; }
.shot { max-width: 100%; border-radius: var(--r-control); margin-bottom: 12px; }
progress { width: 100%; height: 8px; accent-color: var(--accent); }
.notice { background: var(--surface); border-radius: var(--r-card); padding: 16px 20px; margin-bottom: 16px; }

/* Таблицы */
.grid { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface);
  border-radius: var(--r-card); overflow: hidden; }
.grid th, .grid td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left;
  vertical-align: middle; }
.grid th { color: var(--muted); font-weight: 400; font-size: 12px; white-space: nowrap; }
.grid .num { text-align: right; white-space: nowrap; }
.grid tr.group td { background: #fafafa; font-weight: 600; }
.grid tr.note td { border-top: 0; padding-top: 0; font-size: 12px; }
.grid tbody.off td, .grid tr.off td { opacity: .5; }
.grid .title { max-width: 360px; }
.thumb, .nothumb { width: 40px; height: 40px; border-radius: var(--r-item); object-fit: cover;
  display: block; background: var(--bg); }
.tag { display: inline-block; font-size: 11px; padding: 0 8px; border-radius: 6px; background: var(--fill);
  color: var(--muted); margin-left: 4px; }

.status { font-size: 12px; white-space: nowrap; }
.s-ready, .s-created, .s-active { color: var(--ok); }
.s-choose_category, .s-upload_cover, .s-upload_stock, .s-check_link, .s-exists, .s-creating,
.s-created_pending { color: var(--warn); }
.s-error, .s-publish_failed { color: var(--danger); }

.edit-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; padding: 8px 0; }
.edit-grid .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.edit-side form { margin-bottom: 16px; }
.restart { margin-top: 16px; }
.options { margin-bottom: 16px; }
.options h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.options p { margin: 8px 0 4px; }
.variants { margin: 0 0 8px; padding-left: 20px; }
.variant-stock { margin-bottom: 12px; }
.variant-stock label { margin-bottom: 6px; }

.keybox code { display: block; font-size: 16px; padding: 12px; background: var(--bg);
  border-radius: var(--r-control); word-break: break-all; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.publish-progress { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.stat b { display: block; font-size: 24px; font-weight: 600; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sider { width: auto; }
  .menu { flex-direction: row; overflow-x: auto; }
  .edit-grid { grid-template-columns: 1fr; }
  .grid { display: block; overflow-x: auto; }
}
