/* Общий стиль магазина и админ-панели MarketGA в цветах GetAnalyst (getanalyst.ru): Montserrat,
   тёмно-синий #12191E, бирюзовый акцент #17F3CB, светло-серый фон #F1F4F6. */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");

:root {
  --navy: #12191e; --navy-2: #2b3136; --slate: #434f57; --ink: #333333; --muted: #6b7880;
  --bg: #f1f4f6; --panel: #ffffff; --line: #e3ebee; --line-2: #b8c7cd;
  --accent: #17f3cb; --accent-2: #0acaa6; --accent-deep: #067a65; --mint: #dffbf5; --purple: #b79cfa;
  --ok: #067a65; --ok-bg: #dffbf5; --warn: #9a5b00; --warn-bg: #fff1d6; --bad: #c0392b; --bad-bg: #fde7e4;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column;
       font: 15px/1.55 Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent-deep); }
code, pre { font-family: var(--mono); font-size: 12.5px; }
code { overflow-wrap: anywhere; }
pre { margin: 0; white-space: pre-wrap; word-break: break-all; }
h1 { font-size: 28px; font-weight: 800; margin: 6px 0 16px; color: var(--navy); letter-spacing: -.3px; }
h2 { font-size: 19px; font-weight: 700; margin: 0 0 12px; color: var(--navy); }
h3 { font-size: 16px; font-weight: 700; margin: 18px 0 8px; color: var(--navy); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--bad); }

/* шапка */
.ga-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
.ga-bar { max-width: 1200px; margin: 0 auto; padding: 12px 16px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.ga-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.ga-brand img { height: 26px; display: block; }
.ga-brand .sep { width: 1px; height: 24px; background: rgba(255,255,255,.25); }
.ga-brand b { font-weight: 800; font-size: 20px; letter-spacing: -.2px; }
.ga-brand b span { color: var(--accent); }
.ga-brand small { display: block; font-size: 11px; color: var(--line-2); font-weight: 500; margin-top: -2px; }
.ga-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.ga-nav a, .ga-nav button.link { color: #dfe7ea; text-decoration: none; padding: 7px 12px; border-radius: 10px; font-weight: 600;
  font-size: 14px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.ga-nav a:hover, .ga-nav button.link:hover { background: var(--navy-2); color: #fff; }
.ga-nav a.active { background: var(--accent); color: var(--navy); }
.count[hidden] { display: none; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px;
  background: var(--accent); color: var(--navy); font-size: 12px; text-align: center; font-weight: 700; }
.ga-nav a.active .count { background: var(--navy); color: var(--accent); }

main { max-width: 1200px; width: 100%; margin: 0 auto; padding: 22px 16px 48px; flex: 1; }

/* кнопки и поля */
button, .btn { font: inherit; font-weight: 600; border: 1px solid var(--line-2); background: #fff; color: var(--navy);
  padding: 9px 16px; border-radius: 12px; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; gap: 8px; justify-content: center; }
button:hover, .btn:hover { border-color: var(--slate); }
.primary { background: var(--accent); border-color: var(--accent); color: var(--navy); }
.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.danger { color: var(--bad); border-color: #f0b8b1; }
.small-btn { padding: 5px 10px; font-size: 13px; border-radius: 9px; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px;
  background: #fff; color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent-2); }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; font-weight: 500; }

/* блоки */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.two { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .two { grid-template-columns: minmax(0, 1fr) 360px; } }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.empty { text-align: center; padding: 40px 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
td.num, th.num { text-align: right; white-space: nowrap; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--bg); color: var(--slate); }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.b-purple { background: #efe8ff; color: #5b3fb5; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.chip { border-radius: 999px; padding: 6px 14px; font-size: 13.5px; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.tabs button { border-radius: 10px; }
.tabs button.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* загрузка */
.loader { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 28px 8px; justify-content: center; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent-2);
  animation: spin .8s linear infinite; flex: none; }
.spin.sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--line) 0%, #f6f9fa 50%, var(--line) 100%); background-size: 200% 100%;
  animation: shimmer 1.2s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* всплывающие сообщения и окна */
.toast { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; z-index: 40;
  background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 14px; display: none; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.toast.show { display: block; }
.toast code { opacity: .75; }
.modal-back { position: fixed; inset: 0; background: rgba(18,25,30,.55); z-index: 30; display: none; padding: 24px 12px; overflow-y: auto; }
.modal-back.show { display: block; }
.modal { background: #fff; border-radius: 18px; max-width: 980px; margin: 0 auto; padding: 22px; position: relative; }
.modal .close { position: absolute; right: 14px; top: 14px; }

/* подвал: как на getanalyst.ru — чёрный фон, крупные заголовки колонок, бирюзовые подчёркнутые ссылки, круглые иконки соцсетей */
.ga-footer { background: #0d1114; color: #fff; margin-top: auto; }
.ga-footer .in { max-width: 1200px; margin: 0 auto; padding: 44px 16px 22px; }
.ga-footer .cols { display: grid; gap: 30px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .ga-footer .cols { grid-template-columns: 1.35fr 1fr 1fr; gap: 40px; } }
.ga-footer h4 { color: #fff; margin: 0 0 16px; font-size: 21px; font-weight: 500; letter-spacing: -.2px; }
.ga-footer a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; display: block; margin: 0 0 12px; font-size: 15px; }
.ga-footer a:hover { color: #fff; }
.ga-footer .about { color: #c9d3d7; font-size: 14.5px; line-height: 1.6; margin: 0 0 18px; max-width: 420px; }
.ga-footer .about b { color: #fff; font-weight: 700; }
.ga-footer .course { display: inline-flex; align-items: center; gap: 8px; margin: 0; background: var(--accent); color: var(--navy) !important;
  padding: 11px 20px; border-radius: 12px; text-decoration: none !important; font-weight: 700; font-size: 14.5px; }
.ga-footer .course:hover { background: #fff; }
.ga-footer .soc { display: flex; gap: 12px; flex-wrap: wrap; }
.ga-footer .soc a { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; margin: 0;
  text-decoration: none; color: #0d1114; transition: background .15s; }
.ga-footer .soc a:hover { background: var(--accent); }
.ga-footer .soc svg { width: 20px; height: 20px; fill: currentColor; }
.ga-footer .bottom { border-top: 1px solid #2a3035; margin-top: 34px; padding-top: 20px; display: flex; gap: 14px 24px;
  align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ga-footer .bottom img { height: 26px; display: block; }
.ga-footer .copy { font-size: 12.5px; color: #8fa0a7; margin: 0; }

/* иконки и меню аккаунта в шапке */
.ico { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ga-nav .icon-link { position: relative; padding: 7px 10px; display: inline-flex; align-items: center; }
.ga-nav .icon-link .count { position: absolute; top: -2px; right: -4px; margin: 0; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; font-size: 11px; }
.ga-nav .icon-link.active .count { background: var(--navy); color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.acct { position: relative; }
.acct > button.avatar { width: 38px; height: 38px; border-radius: 50%; padding: 0; background: var(--navy-2); border: 2px solid transparent;
  color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; }
.acct > button.avatar:hover, .acct.open > button.avatar, .acct > button.avatar.active { border-color: var(--accent); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 270px; background: #fff; color: var(--ink); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(18,25,30,.25); padding: 8px; display: none; z-index: 20; }
.acct.open .acct-menu { display: block; }
.acct-menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-menu .who b { display: block; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu .who span { font-size: 12.5px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu a, .acct-menu button { display: flex; width: 100%; gap: 10px; align-items: center; justify-content: flex-start; padding: 10px 12px;
  border: 0; border-radius: 10px; background: none; color: var(--navy) !important; font-size: 14px; font-weight: 600; text-decoration: none; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--bg) !important; }
.acct-menu .ico { width: 18px; height: 18px; color: var(--accent-deep); }
.acct-menu .out { color: var(--bad) !important; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 6px; }
.acct-menu .out .ico { color: var(--bad); }

/* страница входа: слева картинка-схема, справа форма */
.auth-page { display: grid; grid-template-columns: minmax(0, 1fr); border-radius: 24px; overflow: hidden; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(18,25,30,.08); max-width: 1040px; margin: 10px auto 0; }
@media (min-width: 880px) { .auth-page { grid-template-columns: 1.05fr 1fr; min-height: 560px; } }
.auth-art { position: relative; background: radial-gradient(120% 90% at 0% 0%, #1f2d35 0%, var(--navy) 55%, #0a0f12 100%);
  color: #fff; padding: 30px 30px 26px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; width: 360px; height: 360px; right: -140px; bottom: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(23,243,203,.35), rgba(23,243,203,0) 70%); pointer-events: none; }
.auth-art .kicker { display: inline-block; align-self: flex-start; background: rgba(23,243,203,.14); color: var(--accent); border: 1px solid rgba(23,243,203,.4);
  border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; letter-spacing: .3px; }
.auth-art h1 { color: #fff; font-size: 28px; line-height: 1.2; margin: 0; }
.auth-art h1 span { color: var(--accent); }
.auth-art p { color: #c3ced3; margin: 0; font-size: 14.5px; max-width: 440px; }
.auth-art svg.scene { width: 100%; height: auto; margin-top: auto; position: relative; z-index: 1; }
.auth-art .facts { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.auth-art .facts span { font-size: 12px; font-weight: 600; color: #dfe7ea; background: rgba(255,255,255,.08); border-radius: 999px; padding: 4px 10px; }
.auth-form { padding: 34px 30px; display: flex; flex-direction: column; justify-content: center; }
.auth-form h2 { font-size: 24px; font-weight: 800; margin: 0 0 4px; }
.auth-form .lead { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 6px; }
.seg button { border: 0; background: none; border-radius: 10px; padding: 9px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(18,25,30,.08); }
.auth-form .primary.big { width: 100%; padding: 13px; font-size: 15.5px; margin-top: 4px; }
.auth-form .hint { background: var(--mint); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--navy); margin-top: 16px; }
@media (max-width: 879px) {
  .auth-form { order: -1; }
  .auth-art { padding: 22px 20px 18px; }
  .auth-art h1 { font-size: 22px; }
  .auth-art svg.scene { max-height: 190px; }
  .auth-form { padding: 24px 20px 26px; }
}

/* шапка на телефоне */
@media (max-width: 640px) {
  .ga-bar { gap: 10px; padding: 10px 12px; }
  .ga-brand img { height: 20px; } .ga-brand b { font-size: 17px; } .ga-brand .sep { height: 20px; }
  .ga-nav a, .ga-nav button.link { padding: 6px 9px; font-size: 13.5px; }
  h1 { font-size: 23px; }
  main { padding: 16px 12px 36px; }
}

/* справочник: шаги и методы */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps > li { counter-increment: s; position: relative; padding: 14px 16px 14px 58px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.steps > li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--navy); font-weight: 800; display: grid; place-items: center; }
.steps .who { font-size: 12px; font-weight: 700; color: var(--accent-deep); text-transform: uppercase; letter-spacing: .4px; }
.method { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.method > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.method > summary::-webkit-details-marker { display: none; }
.method[open] > summary { border-bottom: 1px solid var(--line); background: #fafcfd; }
.verb { font: 700 12px var(--mono); padding: 3px 8px; border-radius: 7px; color: #fff; min-width: 54px; text-align: center; }
.v-GET { background: #2f7fbf; } .v-POST { background: var(--accent-deep); } .v-PUT { background: #9a5b00; }
.v-PATCH { background: #6b4fc9; } .v-DELETE { background: var(--bad); }
.method .path { font: 600 13.5px var(--mono); color: var(--navy); word-break: break-all; }
.method .body { padding: 14px; display: grid; gap: 10px; }
.codebox { background: var(--navy); color: #e8f1f3; border-radius: 12px; padding: 12px 14px; overflow-x: auto; position: relative; }
.codebox .copy { position: absolute; right: 8px; top: 8px; padding: 3px 8px; font-size: 12px; background: var(--navy-2); color: #fff; border-color: var(--slate); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; }
.kv dt { color: var(--muted); font-size: 13px; } .kv dd { margin: 0; word-break: break-word; }
