/* IQElectro Price Monitor — визуальный язык в духе Shopify Admin (Polaris) с фирменным цветом IQElectro */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/static/fonts/inter-400.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/static/fonts/inter-500.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/static/fonts/inter-600.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("/static/fonts/inter-700.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 800; font-style: normal; font-display: swap; src: url("/static/fonts/inter-800.woff") format("woff"); }

:root {
  --brand: #ff4b27;
  --brand-hover: #f03d19;
  --brand-press: #d93412;
  --brand-soft: #fff1ec;
  --brand-ink: #b32e14;
  --navy: #111626;
  --navy-2: #1b2133;
  --navy-3: #2a3248;

  --bg: #f1f1f1;
  --surface: #ffffff;
  --surface-2: #f7f7f7;
  --surface-3: #f1f1f1;
  --surface-hover: #f7f7f7;
  --nav-bg: #ebebeb;
  --border: #e3e3e3;
  --border-2: #ebebeb;
  --border-input: #8a8a8a;
  --text: #303030;
  --text-2: #616161;
  --text-3: #8a8a8a;

  --success: #29845a; --success-bg: #cdfee1; --success-ink: #0c5132;
  --critical: #e51c00; --critical-bg: #fedad9; --critical-ink: #8e1f0b;
  --warning: #ffb800; --warning-bg: #ffef9d; --warning-ink: #4f4700;
  --info: #0094d5; --info-bg: #e0f0ff; --info-ink: #00527c;
  --attention-bg: #ffe2c2; --attention-ink: #7a3b00;
  --neutral-bg: #e9e9e9; --neutral-ink: #4a4a4a;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow-card: 0 1px 0 0 rgba(26,26,26,.07), inset 0 -1px 0 0 rgba(0,0,0,.09), inset 1px 0 0 0 rgba(0,0,0,.05), inset -1px 0 0 0 rgba(0,0,0,.05), inset 0 1px 0 0 rgba(0,0,0,.04);
  --shadow-pop: 0 8px 24px -4px rgba(26,26,26,.22), 0 2px 6px -2px rgba(26,26,26,.12), 0 0 0 1px rgba(0,0,0,.06);
  --ease: cubic-bezier(.2,.8,.2,1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --topbar-h: 56px;
  --nav-w: 240px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 13px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
a { color: #005bd3; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; color: var(--text); letter-spacing: -.01em; }
p { margin: 0 0 8px; }
code, .mono { font-family: var(--mono); font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--border-2); margin: 16px 0; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.strong { font-weight: 650; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------------ icons */
.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-xs { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); z-index: 50;
  background: var(--navy); color: #e3e3e3; display: flex; align-items: center; gap: 16px;
  padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.06);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: calc(var(--nav-w) - 28px); color: #fff; text-decoration: none !important; }
.brand img { height: 26px; width: auto; display: block; }
.brand .wordmark { display: none; font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: #fff; }
.brand .wordmark b { color: var(--brand); }
.brand.no-logo img { display: none; }
.brand.no-logo .wordmark { display: inline; }
.brand .product-tag { font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,.1); color: #cfd3dc; }
.topsearch { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.topsearch input {
  width: 100%; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.08);
  color: #fff; padding: 0 12px 0 36px; font: inherit; transition: background .15s, border-color .15s, box-shadow .15s;
}
.topsearch input::placeholder { color: #aab0bf; }
.topsearch input:focus { outline: none; background: #fff; color: var(--text); border-color: #fff; box-shadow: 0 0 0 3px rgba(255,75,39,.35); }
.topsearch .icon { position: absolute; left: 10px; top: 7px; color: #aab0bf; width: 18px; height: 18px; pointer-events: none; }
.topsearch input:focus + .icon { color: var(--text-2); }
.top-right { display: flex; align-items: center; gap: 10px; }
.run-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: #e7e9ee; font-weight: 550; font-size: 12px; white-space: nowrap; transition: background .2s;
}
.run-pill:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.run-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa1b2; flex: none; }
.run-pill.running .dot { background: #36d27f; animation: pulse 1.6s infinite; }
.run-pill.offline .dot { background: #ff6b5a; }
.run-pill .bar { width: 64px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.run-pill .bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; transition: width .6s var(--ease); }
.avatar {
  width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, #ff7a50, var(--brand));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; cursor: pointer; border: 0;
}
.usermenu { position: relative; }
.usermenu .menu { right: 0; top: 40px; min-width: 220px; }

/* ------------------------------------------------------------------ layout */
.layout { display: flex; padding-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); min-height: 100vh; }
.nav {
  position: fixed; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); bottom: 0; left: 0; width: var(--nav-w); background: var(--nav-bg);
  padding: 12px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; z-index: 40;
  border-right: 1px solid #e1e1e1;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border-radius: 8px; color: var(--text);
  font-weight: 550; text-decoration: none !important; transition: background .12s, color .12s; position: relative;
}
.nav-item .icon { color: #4a4a4a; transition: color .12s; }
.nav-item:hover { background: #f1f1f1; }
.nav-item.active { background: #fafafa; font-weight: 650; box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.nav-item.active .icon { color: var(--brand); }
.nav-item.active::before { content: ""; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-item .count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #dcdcdc; color: #303030;
  font-size: 11px; font-weight: 650; display: inline-grid; place-items: center; transition: transform .2s var(--ease), background .2s;
}
.nav-item .count.hot { background: var(--brand); color: #fff; }
.nav-item .count.bump { animation: bump .5s var(--ease); }
.nav-section { font-size: 11px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 14px 8px 6px; }
.nav-spacer { flex: 1; }
.nav-foot { padding: 10px 8px 4px; font-size: 11px; color: var(--text-3); }
.main { flex: 1; margin-left: var(--nav-w); padding: 20px 24px 64px; min-width: 0; }
.page { max-width: 1240px; margin: 0 auto; }
.page.narrow { max-width: 980px; }
.burger { display: none; background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }

/* ------------------------------------------------------------------ page header */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 4px 0 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; font-weight: 700; line-height: 28px; display: flex; align-items: center; gap: 10px; }
.page-head .sub { color: var(--text-2); margin-top: 2px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; color: var(--text); }
.back:hover { background: #e3e3e3; text-decoration: none; }
.crumbs { font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
.crumbs a { color: var(--text-2); }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 16px;
  animation: fadeUp .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); min-width: 0;
}
.card + .card { margin-top: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card.flush .card-head { padding: 14px 16px 0; margin-bottom: 10px; }
.card-head h2, .card-title { font-size: 14px; font-weight: 650; }
.card-head .hint { color: var(--text-2); font-size: 12px; font-weight: 400; }
.card-foot { border-top: 1px solid var(--border-2); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card.tinted { background: linear-gradient(180deg, #fff 0%, #fffaf8 100%); }
.section-title { font-size: 12px; font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 10px; }

.grid { display: grid; gap: 16px; }
.grid > .card + .card { margin-top: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 320px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > .card + .card { margin-top: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* ------------------------------------------------------------------ metrics */
.metric { position: relative; overflow: hidden; container-type: inline-size; }
/* узкая карточка — без мини-графика, чтобы он не наезжал на цифры */
@container (max-width: 300px) { .metric .spark { display: none; } }
.metric .label { color: var(--text-2); font-weight: 550; display: flex; align-items: center; gap: 6px; }
.metric .value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.metric .value small { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.metric .foot { margin-top: 6px; color: var(--text-2); font-size: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.metric .spark { position: absolute; right: 12px; top: 46px; width: 84px; height: 30px; opacity: .9; pointer-events: none; }
.metric.accent { background: linear-gradient(135deg, #1b2133 0%, #111626 100%); color: #fff; }
.metric.accent .label, .metric.accent .foot { color: #b7bdcc; }
.metric.accent .value { color: #fff; }
.metric.accent .value small { color: #b7bdcc; }
.metric.accent::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,75,39,.55) 0%, rgba(255,75,39,0) 70%); pointer-events: none;
}
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 650; font-size: 12px; }
.delta.down { color: var(--success); }
.delta.up { color: var(--info); }

/* ------------------------------------------------------------------ badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 8px;
  font-size: 12px; font-weight: 550; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral-ink); line-height: 1;
}
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.success { background: var(--success-bg); color: var(--success-ink); }
.badge.critical { background: var(--critical-bg); color: var(--critical-ink); }
.badge.warning { background: var(--warning-bg); color: var(--warning-ink); }
.badge.info { background: var(--info-bg); color: var(--info-ink); }
.badge.attention { background: var(--attention-bg); color: var(--attention-ink); }
.badge.brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge.dark { background: var(--navy); color: #fff; }
.badge.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border); color: var(--text-2); }
.badge.pulse .bdot { animation: pulse 1.4s infinite; }

/* ------------------------------------------------------------------ buttons */
.btn {
  --b-bg: #fff; --b-fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 8px; border: 0; background: var(--b-bg); color: var(--b-fg); font: 600 13px/1 var(--font);
  cursor: pointer; white-space: nowrap; text-decoration: none !important; position: relative; user-select: none;
  box-shadow: inset 0 -1px 0 0 #b5b5b5, inset 0 0 0 1px rgba(0,0,0,.1), inset 0 .5px 0 1.5px #fff;
  transition: background .12s, box-shadow .12s, transform .08s, opacity .12s;
}
.btn:hover { background: #fafafa; }
.btn:active { transform: translateY(1px); box-shadow: inset 0 1px 1px rgba(0,0,0,.18), inset 0 0 0 1px rgba(0,0,0,.12); background: #f3f3f3; }
.btn:focus-visible { outline: 2px solid #005bd3; outline-offset: 2px; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn.primary {
  --b-fg: #fff; background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 55%), var(--brand);
  box-shadow: inset 0 -1px 0 1px rgba(0,0,0,.22), inset 0 0 0 1px var(--brand-press), inset 0 1px 0 1.5px rgba(255,255,255,.28);
}
.btn.primary:hover { background: linear-gradient(180deg, rgba(255,255,255,.1) 0%, rgba(255,255,255,0) 55%), var(--brand-hover); }
.btn.primary:active { background: var(--brand-press); box-shadow: inset 0 2px 2px rgba(0,0,0,.28); }
.btn.dark {
  --b-fg: #fff; background: linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 55%), #303030;
  box-shadow: inset 0 -1px 0 1px rgba(0,0,0,.8), inset 0 0 0 1px #303030, inset 0 .5px 0 1.5px #666;
}
.btn.dark:hover { background: #1a1a1a; }
.btn.critical { --b-fg: #fff; background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0) 55%), #c70a24;
  box-shadow: inset 0 -1px 0 1px rgba(0,0,0,.25), inset 0 0 0 1px #a30a1f, inset 0 1px 0 1.5px rgba(255,255,255,.2); }
.btn.critical:hover { background: #a30a1f; }
.btn.plain { background: transparent; box-shadow: none; color: #005bd3; padding: 0 6px; }
.btn.plain:hover { background: rgba(0,91,211,.06); text-decoration: none; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(0,0,0,.05); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.lg { height: 40px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.btn.icon-only { width: 32px; padding: 0; }
.btn.sm.icon-only { width: 28px; }
.btn .spinner { display: none; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading .spinner { display: block; position: absolute; left: 50%; top: 50%; margin: -8px 0 0 -8px; }
.btn.loading .icon { opacity: 0; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: 8px 0 0 8px; }
.btn-group .btn:last-child { border-radius: 0 8px 8px 0; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0,0,0,.15); border-top-color: currentColor; animation: spin .7s linear infinite; }
.btn.primary .spinner, .btn.dark .spinner, .btn.critical .spinner { border-color: rgba(255,255,255,.3); border-top-color: #fff; }
.btn.loading .spinner { color: var(--text); }
.btn.primary.loading .spinner, .btn.dark.loading .spinner { color: #fff; }

/* ------------------------------------------------------------------ forms */
label.lbl, .lbl { display: block; font-weight: 550; margin-bottom: 4px; }
.help { color: var(--text-2); font-size: 12px; margin-top: 4px; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.input, select.input, textarea.input {
  width: 100%; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid #c9cccf; border-top-color: #aeb4b9;
  background: #fdfdfd; color: var(--text); font: inherit; transition: border-color .12s, box-shadow .12s, background .12s;
}
textarea.input { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
select.input { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M7 8l3 3 3-3' fill='none' stroke='%23616161' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; }
.input:hover { border-color: #8a8a8a; }
.input:focus { outline: none; border-color: #005bd3; box-shadow: 0 0 0 2px rgba(0,91,211,.2); background: #fff; }
.input.sm { height: 28px; font-size: 12px; }
.input.price { max-width: 140px; font-variant-numeric: tabular-nums; }
.input-group { display: flex; align-items: center; }
.input-group .prefix { height: 32px; display: grid; place-items: center; padding: 0 9px; border: 1px solid #c9cccf; border-right: 0; border-radius: 8px 0 0 8px; background: var(--surface-2); color: var(--text-2); }
.input-group .input { border-radius: 0 8px 8px 0; }
.check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; margin-bottom: 10px; }
.check input { margin-top: 2px; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 16px; height: 16px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 36px; height: 20px; border-radius: 999px; background: #d4d4d4; position: relative; transition: background .2s var(--ease); flex: none; }
.switch .track::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .22s var(--ease); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid #005bd3; outline-offset: 2px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.inline-form { display: inline; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { display: inline-flex; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.days span { display: grid; place-items: center; width: 40px; height: 32px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px #c9cccf; cursor: pointer; font-weight: 600; transition: all .15s; }
.days input:checked + span { background: var(--navy); color: #fff; box-shadow: none; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--text-2); background: var(--surface-2); padding: 8px 12px;
  border-bottom: 1px solid var(--border-2); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: var(--surface-hover); }
.tbl tbody tr[data-href] { cursor: pointer; }
.tbl tbody tr.selected { background: #f1f6ff; }
.tbl .chk { width: 36px; padding-right: 0; }
.tbl .title-cell { max-width: 380px; }
.tbl .title-cell .t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 550; }
.tbl .title-cell .s { display: block; color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl.compact td { padding: 7px 12px; }
.sku { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text); background: var(--surface-3); padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
.price-cell { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.arrow { color: var(--text-3); margin: 0 4px; }
.diff-down { color: var(--success); font-weight: 650; }
.diff-up { color: var(--info); font-weight: 650; }
.struck { text-decoration: line-through; color: var(--text-3); font-weight: 500; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border-2); }
.filters .input { width: auto; min-width: 140px; }
.filters .search { flex: 1; min-width: 220px; position: relative; }
.filters .search .input { width: 100%; padding-left: 32px; }
.filters .search .icon { position: absolute; left: 8px; top: 6px; color: var(--text-3); }
.tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--border-2); overflow-x: auto; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 10px; color: var(--text-2); font-weight: 550; border-radius: 8px 8px 0 0;
  position: relative; text-decoration: none !important; white-space: nowrap; background: none; border: 0; cursor: pointer; font: inherit;
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active { color: var(--text); font-weight: 650; }
.tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); animation: grow .25s var(--ease); }
.tab .badge { height: 18px; padding: 0 6px; font-size: 11px; }

.bulkbar {
  position: sticky; bottom: 16px; margin: 0 auto; width: max-content; max-width: calc(100% - 32px); display: flex; align-items: center; gap: 10px;
  background: #303030; color: #fff; padding: 8px 8px 8px 16px; border-radius: 12px; box-shadow: var(--shadow-pop); z-index: 20;
  transform: translateY(140%); opacity: 0; transition: transform .3s var(--ease), opacity .25s; pointer-events: none;
}
.bulkbar.show { transform: none; opacity: 1; pointer-events: auto; }
.bulkbar .btn { box-shadow: none; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border-2); color: var(--text-2); }
.pager { display: flex; gap: 4px; }

/* ------------------------------------------------------------------ progress */
.progress { height: 8px; border-radius: 999px; background: #e7e7e7; overflow: hidden; position: relative; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .8s var(--ease); position: relative; }
.progress.running > i { background-image: linear-gradient(45deg, rgba(255,255,255,.22) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.22) 75%, transparent 75%); background-size: 20px 20px; animation: stripes .8s linear infinite; }
.progress.sm { height: 5px; }
.progress.green > i { background: var(--success); }
.progress.neutral > i { background: #9aa1b2; }
.run-card { overflow: hidden; position: relative; }
.run-card.live::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent); background-size: 200% 100%; animation: shimmer 1.6s linear infinite;
}
.run-head { display: flex; align-items: center; gap: 14px; }
.run-ring { width: 54px; height: 54px; flex: none; }
.run-ring circle { fill: none; stroke-width: 6; }
.run-ring .bg { stroke: #ececec; }
.run-ring .fg { stroke: var(--brand); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .8s var(--ease); }
.run-ring text { font: 700 12px var(--font); fill: var(--text); }
.comp-progress { display: grid; gap: 10px; margin-top: 14px; }
.comp-progress .cp { display: grid; grid-template-columns: 180px 1fr 90px; gap: 10px; align-items: center; font-size: 12px; }
.comp-progress .cp .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-steps { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.stage-steps span { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: #f1f1f1; color: var(--text-3); transition: all .3s; }
.stage-steps span.done { background: var(--success-bg); color: var(--success-ink); }
.stage-steps span.now { background: var(--brand-soft); color: var(--brand-ink); box-shadow: inset 0 0 0 1px rgba(255,75,39,.35); }

/* ------------------------------------------------------------------ settings toc */
.toc { position: sticky; top: calc(var(--topbar-h) + 20px); display: flex; flex-direction: column; gap: 2px; }
.toc a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-weight: 550; text-decoration: none !important; transition: background .15s, color .15s; }
.toc a:hover { background: #e7e7e7; color: var(--text); }
.toc a.active { background: #fff; color: var(--text); box-shadow: var(--shadow-card); }
.toc a.active .icon { color: var(--brand); }
section[data-section] { scroll-margin-top: calc(var(--topbar-h) + 16px); }
@media (max-width: 860px) { .toc { display: none; } .grid[style*="220px"] { grid-template-columns: minmax(0, 1fr) !important; } }

/* ------------------------------------------------------------------ lists & misc */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-2); }
.list li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: minmax(120px, 42%) 1fr; gap: 8px 12px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; font-weight: 550; min-width: 0; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty .illu { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.empty .illu .icon { width: 30px; height: 30px; }
.empty h3 { font-size: 15px; margin-bottom: 4px; color: var(--text); }
.banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px;
  background: var(--info-bg); color: var(--info-ink); animation: fadeUp .4s var(--ease) both;
}
.banner .icon { flex: none; margin-top: 1px; }
.banner.warning { background: #fff5cc; color: #4f4700; box-shadow: inset 0 0 0 1px #f0d77a; }
.banner.critical { background: var(--critical-bg); color: var(--critical-ink); }
.banner.success { background: var(--success-bg); color: var(--success-ink); }
.banner b { font-weight: 650; }
.banner .grow { flex: 1; }
.steps { counter-reset: s; display: grid; gap: 10px; }
.step { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--border); flex: none; }
.step.done .n { background: var(--success); color: #fff; box-shadow: none; }
.step .t { flex: 1; }
.step.done .t { color: var(--text-2); text-decoration: line-through; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--surface-3); font-size: 12px; font-weight: 550; color: var(--text-2); }
.dot-sep::before { content: "·"; margin: 0 6px; color: var(--text-3); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.mini-bar { height: 6px; border-radius: 6px; background: #ececec; overflow: hidden; display: flex; }
.mini-bar i { display: block; height: 100%; }
.code-block { background: #1b1f2a; color: #e6e9ef; border-radius: 10px; padding: 12px 14px; font: 12px/1.5 var(--mono); overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.token-box { display: flex; gap: 8px; align-items: center; background: #fff8e1; border-radius: 10px; padding: 10px 12px; box-shadow: inset 0 0 0 1px #f2d479; }
.token-box code { flex: 1; overflow-wrap: anywhere; }
.offer-row.excluded td { color: var(--text-3); }
.offer-row.excluded .price-cell { color: var(--text-3); font-weight: 500; }
.offer-row.lowest td { background: #f3fbf6; }
.why { font-size: 11px; color: var(--text-3); }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--border); border-radius: 2px; }
.timeline .ev { position: relative; padding: 0 0 14px; }
.timeline .ev::before { content: ""; position: absolute; left: -17px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--text-3); }
.timeline .ev.down::before { box-shadow: inset 0 0 0 2px var(--success); }
.timeline .ev.up::before { box-shadow: inset 0 0 0 2px var(--info); }
.lvl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.lvl.error { color: var(--critical); }
.lvl.warning { color: #b98900; }
.lvl.info { color: var(--text-3); }

/* ------------------------------------------------------------------ charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text { font: 11px var(--font); fill: var(--text-3); }
.chart .grid-line { stroke: #eeeeee; stroke-width: 1; }
.chart .bar { transform-box: fill-box; transform-origin: bottom; animation: barGrow .7s var(--ease) both; }
.chart .bar:hover { filter: brightness(1.08); }
.chart .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s var(--ease) forwards; }
.chart .area { opacity: .1; }
.chart .pt { transition: r .15s; }
.chart-tip {
  position: absolute; pointer-events: none; background: #303030; color: #fff; padding: 7px 10px; border-radius: 8px; font-size: 12px;
  box-shadow: var(--shadow-pop); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .12s; z-index: 5;
}
.chart-tip.show { opacity: 1; }
.chart-tip b { font-weight: 650; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { width: 140px; height: 140px; flex: none; }
.donut circle { fill: none; stroke-width: 16; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dasharray 1.1s var(--ease), stroke-dashoffset 1.1s var(--ease); }
.donut .center-num { font: 700 20px var(--font); fill: var(--text); }
.donut .center-lbl { font: 500 10px var(--font); fill: var(--text-2); }
.donut-legend { display: grid; gap: 8px; flex: 1; min-width: 0; }
.donut-legend .it { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.donut-legend .it i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-legend .it .v { margin-left: auto; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ menu, modal, toast */
.menu {
  position: absolute; background: #fff; border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 60;
  opacity: 0; transform: translateY(-4px) scale(.98); pointer-events: none; transition: opacity .14s, transform .18s var(--ease);
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu .mi { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--text); font: 550 13px var(--font); background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none !important; }
.menu .mi:hover { background: var(--surface-2); }
.menu .mi.danger { color: var(--critical); }
.menu .mh { padding: 8px 10px 6px; border-bottom: 1px solid var(--border-2); margin-bottom: 4px; }
.menu .mh b { display: block; }
.modal-root { position: fixed; inset: 0; z-index: 100; display: none; }
.modal-root.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17,22,38,.45); animation: fadeIn .2s ease both; backdrop-filter: blur(1px); }
.modal {
  position: relative; margin: 8vh auto 0; width: min(720px, calc(100% - 32px)); max-height: 84vh; display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; box-shadow: 0 24px 48px -12px rgba(0,0,0,.35); animation: modalIn .28s var(--ease) both; overflow: hidden;
}
.modal.sm { width: min(440px, calc(100% - 32px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border-2); background: var(--surface-2); }
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 16px; overflow-y: auto; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--border-2); display: flex; justify-content: flex-end; gap: 8px; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; background: #303030; color: #fff; padding: 10px 14px; border-radius: 12px;
  box-shadow: var(--shadow-pop); font-weight: 550; max-width: min(560px, 92vw); animation: toastIn .32s var(--ease) both;
}
.toast.out { animation: toastOut .25s ease forwards; }
.toast .icon { color: #8be0b0; }
.toast.critical { background: #8e1f0b; }
.toast.critical .icon, .toast.warning .icon { color: #ffd0c4; }
.toast.warning { background: #5e4200; }
.toast.info .icon { color: #9ecbff; }
.toast button { background: none; border: 0; color: #fff; opacity: .7; cursor: pointer; padding: 2px; }
.skeleton { background: linear-gradient(90deg, #eeeeee 25%, #f7f7f7 37%, #eeeeee 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px; height: 12px; }

/* ------------------------------------------------------------------ auth pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; }
.auth-side {
  background: radial-gradient(1200px 600px at 110% -10%, rgba(255,75,39,.45), transparent 55%), radial-gradient(800px 500px at -20% 120%, rgba(255,75,39,.18), transparent 60%), var(--navy);
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-side .big { font-size: 34px; font-weight: 750; letter-spacing: -.03em; line-height: 1.12; max-width: 460px; }
.auth-side .big em { font-style: normal; color: var(--brand); }
.auth-side p { color: #b9bfcd; max-width: 440px; font-size: 14px; }
.auth-feats { display: grid; gap: 12px; margin-top: 28px; }
.auth-feats div { display: flex; gap: 10px; align-items: center; color: #dfe3ea; }
.auth-feats .icon { color: var(--brand); }
.auth-orb { position: absolute; width: 380px; height: 380px; right: -120px; bottom: -120px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); animation: float 8s ease-in-out infinite; }
.auth-orb.two { width: 240px; height: 240px; right: -40px; bottom: -40px; animation-delay: -3s; }
.auth-main { display: grid; place-items: center; padding: 32px; }
.auth-card { width: min(380px, 100%); animation: fadeUp .5s var(--ease) both; }
.auth-card h1 { font-size: 24px; font-weight: 750; margin-bottom: 6px; }
.auth-card .muted { margin-bottom: 22px; }
.auth-card .input { height: 40px; border-radius: 10px; font-size: 14px; }
.auth-card .btn { width: 100%; height: 42px; font-size: 14px; border-radius: 10px; margin-top: 6px; }
.auth-logo { height: 30px; margin-bottom: 28px; }
.auth-logo-text { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 28px; display: none; }
.auth-logo-text b { color: var(--brand); }
.auth .err { background: var(--critical-bg); color: var(--critical-ink); padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-weight: 550; animation: shake .4s; }

/* ------------------------------------------------------------------ animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(54,210,127,.55); } 70% { box-shadow: 0 0 0 7px rgba(54,210,127,0); } 100% { box-shadow: 0 0 0 0 rgba(54,210,127,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes stripes { from { background-position: 0 0; } to { background-position: 20px 0; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------------ inside Shopify admin */
/* Во фрейме админки Shopify разделы показываются в левом меню Shopify (s-app-nav),
   поэтому своё меню панели убрано в выдвижную панель по кнопке ☰ — содержимому больше места. */
s-app-nav { display: none; }
body.embedded { --nav-w: 0px; }
body.embedded .nav { width: 260px; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-pop); }
body.embedded.nav-open .nav { transform: none; }
body.embedded .burger { display: inline-flex; }
body.embedded .brand { min-width: 0; }
body.embedded .auth-side { display: none; }
body.embedded .auth { grid-template-columns: minmax(0, 1fr); }

/* ------------------------------------------------------------------ responsive */
/* с боковым меню панели на экране до 1280 px четыре карточки в ряд слишком узкие — ставим по две */
@media (max-width: 1280px) { body:not(.embedded) .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .g-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  :root { --nav-w: 0px; }
  .nav { width: 260px; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-pop); }
  body.nav-open .nav { transform: none; }
  .main { margin-left: 0; padding: 16px 16px 64px; }
  .burger { display: inline-flex; }
  .brand { min-width: 0; flex: none; }
  .brand .product-tag { display: none; }
  /* на телефоне статус проверки сжимается с многоточием и не наезжает на логотип */
  .top-right { min-width: 0; flex: 1; justify-content: flex-end; }
  .run-pill { min-width: 0; }
  .run-pill > span:not(.dot) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .topsearch { display: none; }
  .run-pill .bar, .run-pill .txt-long { display: none; }
  .g-2, .g-3, .g-4 { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .comp-progress .cp { grid-template-columns: 110px 1fr 70px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}
