/* ============================================================================
   MSQ BOOST — кабинет покупателя
   ========================================================================== */

.client-page { min-height: 100vh; display: flex; flex-direction: column; }

/* мягкое цветное свечение за контентом (статичное, без blur — ради плавности) */
.aurora {
  position: absolute;
  top: -12%;
  left: 0;
  right: 0;
  width: 100%;
  height: 60vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 60% at 20% 30%, rgba(var(--accent-rgb), 0.16), transparent 70%),
    radial-gradient(35% 55% at 78% 20%, rgba(150, 120, 255, 0.12), transparent 70%);
  opacity: .7;
}

/* --- Шапка --- */
.customer-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 12, 15, 0.96);
}
.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .is-current {
  border-color: var(--border-3);
  background: var(--glass);
  color: var(--text);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .2px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: linear-gradient(150deg, var(--accent-2), var(--accent));
  color: #07182f;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.brand-mark.sm { width: 26px; height: 26px; font-size: 13px; border-radius: var(--r-xs); }

/* --- Раскладка --- */
.customer-main { flex: 1; padding: 58px 0 40px; }
.cabinet-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 400px);
  gap: 24px;
  align-items: start;
}
.cabinet-intro { grid-column: 1 / -1; max-width: 780px; }
.eyebrow, .panel-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 11px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  color: var(--accent-hi);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.cabinet-intro h1 {
  margin: 18px 0 12px;
  max-width: 740px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff, #b9c4d6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cabinet-intro p { margin: 0; max-width: 660px; color: var(--text-2); font-size: 16.5px; }

/* --- Панели --- */
.code-panel { min-height: 340px; padding: 26px; border-radius: var(--r-xl); }
.help-panel { padding: 24px; border-radius: var(--r-xl); }
.panel-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.panel-title h2 { margin: 10px 0 0; font-size: 22px; line-height: 1.15; letter-spacing: -0.01em; }
.panel-title.compact { display: block; }

.code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.code-input {
  min-height: 52px;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.code-input::placeholder { letter-spacing: 2px; }
.form-note { margin-top: 12px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.resume-row { margin-top: 14px; }
.resume-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  background: var(--glass);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .12s var(--ease);
}
.resume-btn:hover { border-color: var(--accent-line); background: var(--accent-soft); transform: translateY(-1px); }
.resume-btn .rb-ic { color: var(--accent); font-size: 15px; }
.resume-btn .rb-code { margin-left: auto; font-family: var(--mono); font-weight: 700; color: var(--accent-hi); }

/* --- Help список --- */
.help-list { display: grid; gap: 12px; }
.help-item {
  display: flex;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--glass);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.help-item:hover { border-color: var(--border-2); transform: translateY(-2px); }
.help-num {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--accent-2), var(--accent));
  color: #07182f;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.help-item > div b { display: block; margin-bottom: 3px; font-size: 14px; }
.help-item > div span { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* --- Инструкция --- */
.guide-section {
  margin-top: 34px;
  scroll-margin-top: 92px;
}
.guide-page .guide-section { margin-top: 0; }
.guide-head {
  max-width: 760px;
  margin-bottom: 18px;
}
.guide-head h1,
.guide-head h2 {
  margin: 14px 0 8px;
  color: var(--text);
  font-size: 32px;
  line-height: 1.12;
  font-weight: 800;
}
.guide-head p {
  margin: 0;
  max-width: 620px;
  color: var(--text-2);
  font-size: 15px;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.guide-card {
  min-width: 0;
  padding: 22px;
}
.guide-card-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 16px;
}
.guide-ic {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-hi);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}
.guide-card h2,
.guide-card h3 {
  margin: 0 0 5px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}
.guide-tag {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.guide-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
  display: grid;
  gap: 11px;
}
.guide-steps li {
  position: relative;
  min-height: 32px;
  padding: 1px 0 0 42px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.55;
}
.guide-steps li::before {
  counter-increment: guide-step;
  content: counter(guide-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  color: var(--accent-hi);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}
.guide-steps b { color: var(--text); }
.guide-steps code {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--accent-hi);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}
.guide-notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.guide-note {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.guide-note b { color: var(--text); }
.guide-note-accent {
  border-color: rgba(251, 191, 36, 0.34);
  background: var(--amber-soft);
  color: #fde68a;
}

/* --- Назад --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color .2s var(--ease);
}
.back-link:hover { color: var(--text); }

/* --- Карточки кабинета --- */
.cabinet-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--glass);
  animation: fadeInUp .45s var(--ease) both;
}
.cabinet-card + .cabinet-card { margin-top: 16px; }
/* Основная кнопка запуска — отделяем от блока над ней (connect / тексты). */
#activateBtn { margin-top: 20px; }

.service-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.service-head h2, .service-head h3 { margin: 0 0 5px; font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; }
.service-head p { margin: 0; color: var(--muted); font-size: 13px; }
.service-count {
  flex: 0 0 auto;
  min-width: 108px;
  padding: 12px 14px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r);
  background: var(--accent-soft);
  text-align: right;
}
.service-count b { display: block; color: var(--accent-hi); font-family: var(--mono); font-size: 26px; line-height: 1; }
.service-count span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }

/* --- Сетка категорий лайков + мини-прогресс --- */
.like-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0 4px; }
.like-cell {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(0, 0, 0, 0.22);
}
.like-cell .k { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.like-cell .v { margin-top: 6px; font-family: var(--mono); font-size: 21px; font-weight: 800; }
.like-cell .v small { color: var(--muted); font-size: 13px; font-weight: 600; }
.like-cell .mini { margin-top: 10px; height: 5px; }
.inline-help { margin: 4px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.inline-help b { color: var(--text-2); }

/* --- CS2 connect --- */
.cs2-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r);
  background: var(--accent-soft);
  animation: popIn .4s var(--ease) both;
}
.cs2-box h3 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.cs2-box h3::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulseDot 1.4s ease-in-out infinite; }
.cs2-box p { margin: 10px 0 0; color: var(--text-2); font-size: 12.5px; line-height: 1.6; }
.connect-row { display: flex; align-items: stretch; gap: 10px; margin-top: 12px; }
.connect-code {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.4);
  color: var(--accent-hi);
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 700;
  word-break: break-all;
}

.msg-count { color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 12px; }
.cm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -8px 0 10px; flex-wrap: wrap; }

/* Блок генерации случайных текстов (выбор категории + кнопка) */
.random-box { margin: 2px 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--r); background: rgba(0, 0, 0, 0.2); }
.random-row { display: flex; gap: 10px; align-items: flex-end; }
.random-row .random-cat { flex: 1; margin-bottom: 0; }
.random-row .btn { flex: 0 0 auto; }
.random-box .inline-help { margin: 11px 0 0; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* --- Результат / статус --- */
.result-box {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--glass);
  animation: fadeInUp .45s var(--ease) both;
}
.result-box .rb-ic {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hi);
  font-size: 20px;
}
.result-box h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.01em; }
.result-box p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.result-box.err { border-color: rgba(248, 113, 113, 0.3); background: var(--red-soft); }
.result-box.err .rb-ic { background: rgba(248, 113, 113, 0.18); color: #fecaca; }
.result-box.ok { border-color: rgba(74, 222, 128, 0.3); background: var(--green-soft); }
.result-box.ok .rb-ic { background: rgba(74, 222, 128, 0.18); color: #86efac; }

.engine-hint {
  display: flex;
  gap: 11px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: var(--r);
  background: var(--amber-soft);
  color: #fde68a;
  font-size: 13px;
  line-height: 1.5;
}
.engine-hint.ok { border-color: rgba(74, 222, 128, 0.34); background: var(--green-soft); color: #bbf7d0; }
.engine-hint i { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

.status-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.status-top h3 { margin: 0 0 4px; font-size: 19px; letter-spacing: -0.01em; }
.track-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.track-meta > div {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(0, 0, 0, 0.22);
}
.track-meta .k { color: var(--muted); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.track-meta .v { margin-top: 6px; overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 700; }
.progress-row { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 9px; color: var(--text-2); font-size: 12.5px; font-weight: 750; }
.progress-row b { font-family: var(--mono); font-size: 15px; color: var(--text); }

/* --- Подвал --- */
.customer-footer { margin-top: 44px; border-top: 1px solid var(--border); padding: 22px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.foot-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; }

@media (max-width: 900px) {
  .cabinet-layout { grid-template-columns: 1fr; }
  .help-panel { order: 3; }
  .guide-grid, .guide-notes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .customer-main { padding-top: 34px; }
  .header-inner { min-height: 62px; }
  .admin-link { display: none; }
  .cabinet-intro h1 { font-size: 33px; }
  .guide-head h2 { font-size: 26px; }
  .guide-card { padding: 18px; }
  .code-panel, .help-panel { padding: 20px; }
  .code-row, .connect-row, .form-grid-2, .form-grid-3, .like-grid, .track-meta { grid-template-columns: 1fr; }
  .connect-row { flex-direction: column; }
  .random-row { flex-direction: column; align-items: stretch; }
  .service-head, .status-top { flex-direction: column; }
  .service-count { width: 100%; text-align: left; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 420px) {
  .brand [data-brand] { display: none; }
  .header-actions { gap: 7px; }
  .btn.sm { --px: 10px; }
  .guide-page .cabinet-link { display: none; }
}

.brand-mark {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(7, 24, 47, 0.72);
  background-image: url('/assets/msq-boost-logo.png');
  background-position: center;
  background-size: 86% auto;
  background-repeat: no-repeat;
  box-shadow: none;
  color: transparent;
  font-size: 0;
}

.brand-mark.sm {
  background-size: 92% auto;
  box-shadow: none;
}
