/* ─────────────────────────────────────────────
   NeznakovBoost — Booster Cabinet
   Aesthetic: premium dark + electric purple

   ОБЩИЙ стиль кабинета. Подключают ОБА входа:
     • /booster.html       (прод; nginx отдаёт на /booster)  →  бустеры/cabinet.css
     • /бустеры/index.html (dev под vite)                    →  cabinet.css
   Не инлайнить обратно в <style> — иначе CSS снова разъедется между входами,
   и мобильные правки дойдут только до одного. Правь ТОЛЬКО здесь.
   ───────────────────────────────────────────── */
:root {
  --bg: #07070d;
  --bg-2: #0b0b14;
  --surface: #10101e;
  --surface-2: #15152a;
  --surface-3: #1b1b36;
  --hover: #1f1f3c;
  --line: #ffffff10;
  --line-2: #ffffff1c;
  --line-3: #ffffff28;

  --text: #ecedf6;
  --text-2: #a0a2bc;
  --text-3: #8789a1;
  --text-4: #8283a2; /* было #7d7f9f — AA на surface-3 (#1b1b36): 4.30→4.57 */

  --accent: #7e51e3;
  --accent-2: #a78bfa;
  --accent-dim: #8b5cf61f;
  --accent-glow: #8b5cf640;

  --mint: #2dd4bf;
  --mint-dim: #2dd4bf1f;
  --gold: #f5b100;
  --gold-dim: #f5b1001f;
  --danger: #ef4458;
  --danger-dim: #ef44581f;
  --success: #10b981;
  --success-dim: #10b9811f;
  --warning: #f59e0b;
  --warning-dim: #f59e0b1f;
  --info: #38bdf8;
  --info-dim: #38bdf81f;

  --r-xs: 6px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --sb-w: 240px;

  --density-row: 14px;
  --density-card: 18px;
  --density-stat: 22px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  background: var(--bg);
  overflow-x: clip;
}
body {
  font:
    14px/1.55 Manrope,
    'Manrope Fallback',
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Type helpers ── */
.display {
  font-family: Unbounded, 'Unbounded Fallback', sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--text-2);
}
.dim {
  color: var(--text-3);
}
.faint {
  color: var(--text-4);
}
.eyebrow {
  font:
    600 10.5px/1.2 'JetBrains Mono',
    monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow.accent {
  color: var(--accent-2);
}
.tabular {
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #ffffff14;
  border-radius: 5px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: #ffffff24;
}

/* ── Ambient background — grid + glows ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 500px at 12% -10%, var(--accent-glow), transparent 60%),
    radial-gradient(ellipse 600px 400px at 110% 30%, #2dd4bf20, transparent 60%),
    radial-gradient(ellipse 800px 500px at 50% 110%, #8b5cf610, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, #ffffff05 1px, transparent 1px),
    linear-gradient(to bottom, #ffffff05 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
}

#root {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ── Loader (pre-React) ── */
.boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  z-index: 9999;
  transition: opacity 0.3s;
}
.boot.gone {
  opacity: 0;
  pointer-events: none;
}
.boot img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  animation: bootPulse 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 40px var(--accent-glow));
}
@keyframes bootPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 9px 16px;
  font:
    600 13px/1 Manrope,
    'Manrope Fallback',
    sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}
.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff;
  box-shadow:
    0 6px 24px -8px var(--accent),
    inset 0 1px 0 #ffffff30;
}
.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow:
    0 8px 30px -8px var(--accent),
    inset 0 1px 0 #ffffff30;
}

.btn-ghost {
  background: var(--surface-2);
  border-color: var(--line-2);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--hover);
  border-color: var(--line-3);
}

.btn-outline {
  background: transparent;
  border-color: var(--line-2);
  color: var(--text-2);
}
.btn-outline:hover {
  color: var(--text);
  border-color: var(--line-3);
  background: var(--surface);
}

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 4px 16px -4px var(--success);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 16px -4px var(--danger);
}
.btn-mint {
  background: var(--mint);
  color: #07071d;
  box-shadow: 0 4px 16px -4px var(--mint);
  font-weight: 700;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
  border-radius: var(--r-xs);
}
.btn-sm svg {
  width: 14px;
  height: 14px;
}
.btn-lg {
  padding: 12px 20px;
  font-size: 14px;
  border-radius: var(--r);
}
.btn-icon {
  padding: 8px;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
}
.btn-icon.btn-sm {
  width: 28px;
  height: 28px;
  padding: 6px;
}
.btn-block {
  width: 100%;
}

/* ── Cards ── */
.card {
  background: linear-gradient(180deg, var(--surface), #0f0f1c);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--density-card);
  position: relative;
}
.card.flat {
  background: var(--surface);
}
.card.lift {
  transition:
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
  cursor: pointer;
}
.card.lift:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px -16px #000c;
}
.card.accent {
  border-color: color-mix(in oklch, var(--accent) 30%, transparent);
}
.card.glow {
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, var(--accent-glow), transparent 50%),
    linear-gradient(180deg, var(--surface), #0f0f1c);
}

/* ── Form controls ── */
.input,
.select,
.textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: color-mix(in oklch, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: var(--bg);
}
.input::placeholder,
.textarea::placeholder {
  color: var(--text-4);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1l4 4 4-4' stroke='%23a0a2bc' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  line-height: 1.5;
}

.field-label {
  display: block;
  font:
    600 11.5px/1.2 'JetBrains Mono',
    monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 7px;
}

/* ── Pills / Badges ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font:
    700 10.5px/1.2 'JetBrains Mono',
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill.accent {
  color: var(--accent-2);
  background: var(--accent-dim);
  border-color: color-mix(in oklch, var(--accent) 30%, transparent);
}
.pill.mint {
  color: var(--mint);
  background: var(--mint-dim);
  border-color: color-mix(in oklch, var(--mint) 30%, transparent);
}
.pill.gold {
  color: var(--gold);
  background: var(--gold-dim);
  border-color: color-mix(in oklch, var(--gold) 30%, transparent);
}
.pill.success {
  color: var(--success);
  background: var(--success-dim);
  border-color: color-mix(in oklch, var(--success) 30%, transparent);
}
.pill.warning {
  color: var(--warning);
  background: var(--warning-dim);
  border-color: color-mix(in oklch, var(--warning) 30%, transparent);
}
.pill.danger {
  color: var(--danger);
  background: var(--danger-dim);
  border-color: color-mix(in oklch, var(--danger) 30%, transparent);
}
.pill.info {
  color: var(--info);
  background: var(--info-dim);
  border-color: color-mix(in oklch, var(--info) 30%, transparent);
}
.pill.neutral {
  color: var(--text-2);
  background: var(--surface-2);
  border-color: var(--line-2);
}
.pill.solid::before {
  display: none;
}
.pill.bare::before {
  display: none;
}
.pill.live::before {
  animation: livePulse 1.4s infinite;
}
@keyframes livePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 currentColor;
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 4px transparent;
    opacity: 0.5;
  }
}

/* ── Tabs ── */
.tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 3px;
  gap: 2px;
}
.tabs button {
  padding: 6px 14px;
  border-radius: 7px;
  font:
    600 12.5px/1 Manrope,
    'Manrope Fallback',
    sans-serif;
  color: var(--text-3);
  transition: all 0.15s;
}
.tabs button:hover {
  color: var(--text-2);
}
.tabs button.on {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 1px 0 var(--line-2);
}

/* ── Progress ── */
.bar {
  height: 6px;
  background: var(--bg-2);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  position: relative;
}
.bar-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  background: linear-gradient(90deg, transparent, #ffffff40);
}
.bar.thick {
  height: 10px;
}
.bar.thin {
  height: 4px;
}
.bar.mint .bar-fill {
  background: linear-gradient(90deg, var(--mint), #5eead4);
}
.bar.gold .bar-fill {
  background: linear-gradient(90deg, var(--gold), #fbbf24);
}
.bar.success .bar-fill {
  background: linear-gradient(90deg, var(--success), #34d399);
}

/* ── Misc utility ── */
.row {
  display: flex;
  align-items: center;
}
.col {
  display: flex;
  flex-direction: column;
}
.gap-2 {
  gap: 4px;
}
.gap-3 {
  gap: 8px;
}
.gap-4 {
  gap: 12px;
}
.gap-5 {
  gap: 16px;
}
.gap-6 {
  gap: 20px;
}
.gap-8 {
  gap: 28px;
}
.between {
  justify-content: space-between;
}
.center {
  justify-content: center;
}
.end {
  justify-content: flex-end;
}
.full {
  flex: 1;
  min-width: 0;
}
.wrap {
  flex-wrap: wrap;
}
.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}
.divider-v {
  width: 1px;
  background: var(--line);
  align-self: stretch;
}

.sp-1 {
  padding: 4px;
}
.sp-2 {
  padding: 8px;
}
.sp-3 {
  padding: 12px;
}
.sp-4 {
  padding: 16px;
}
.sp-5 {
  padding: 20px;
}

.elide {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Toasts ── */
#toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  z-index: 9000;
  pointer-events: none;
}
.toast {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 40px -12px #000d;
  min-width: 240px;
  animation:
    toastIn 0.25s ease,
    toastOut 0.3s ease 5s forwards;
  pointer-events: auto;
}
.toast.ok {
  border-color: color-mix(in oklch, var(--success) 40%, var(--line-2));
}
.toast.err {
  border-color: color-mix(in oklch, var(--danger) 40%, var(--line-2));
}
.toast.info {
  border-color: color-mix(in oklch, var(--accent) 40%, var(--line-2));
}
.toast .ti {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.toast.ok .ti {
  background: var(--success-dim);
  color: var(--success);
}
.toast.err .ti {
  background: var(--danger-dim);
  color: var(--danger);
}
.toast.info .ti {
  background: var(--accent-dim);
  color: var(--accent-2);
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(20px, 0);
  }
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translate(20px, 8px);
  }
}

/* ── Modal ── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: #000a;
  backdrop-filter: blur(8px);
  z-index: 8000;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 30px 80px -20px #000e;
  animation: modalIn 0.25s ease;
}
.modal.lg {
  max-width: 720px;
}
.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body {
  padding: 20px 24px;
}
.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Required profile / Telegram onboarding ── */
.nb-onboarding-bg {
  z-index: 9500;
  cursor: default;
}
.nb-onboarding-modal {
  max-width: 590px;
  overflow: hidden;
}
.nb-onboarding-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}
.nb-onboarding-head h2 {
  margin: 3px 0 0;
  font-family: var(--f-display);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}
.nb-onboarding-kicker {
  color: var(--accent-2);
  font: 700 10px/1.2 var(--f-mono);
  letter-spacing: 0.08em;
}
.nb-onboarding-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  color: var(--accent-2);
  background: var(--accent-dim);
  border: 1px solid color-mix(in oklch, var(--accent) 36%, var(--line));
  border-radius: 8px;
}
.nb-onboarding-icon.is-tg {
  color: #38bdf8;
  background: color-mix(in oklch, #38bdf8 12%, transparent);
  border-color: color-mix(in oklch, #38bdf8 35%, var(--line));
}
.nb-onboarding-body {
  padding: 20px 24px;
}
.nb-onboarding-body > p {
  margin: 0 0 18px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}
.nb-onboarding-body strong {
  color: var(--text);
  font-weight: 700;
}
.nb-onboarding-textarea {
  min-height: 132px;
  margin-top: 8px;
}
.nb-onboarding-counter {
  margin-top: 6px;
  color: var(--text-3);
  font: 500 11px/1.2 var(--f-mono);
  text-align: right;
}
.nb-onboarding-error {
  margin-top: 12px;
  padding: 10px 12px;
  color: var(--danger);
  background: var(--danger-dim);
  border: 1px solid color-mix(in oklch, var(--danger) 32%, var(--line));
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.45;
}
.nb-onboarding-steps {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.nb-onboarding-steps > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 0;
}
.nb-onboarding-steps > div + div {
  border-top: 1px solid var(--line);
}
.nb-onboarding-steps > div > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--accent-2);
  background: var(--accent-dim);
  border-radius: 50%;
  font: 700 11px/1 var(--f-mono);
}
.nb-onboarding-steps p {
  margin: 2px 0 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}
.nb-onboarding-command-wrap {
  min-width: 0;
}
.nb-onboarding-command {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 8px 8px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
}
.nb-onboarding-command code {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: var(--text);
  font: 600 12px/1.45 var(--f-mono);
}
.nb-onboarding-link-loading {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 12px;
}
.nb-onboarding-expiry {
  margin-top: 12px;
  color: var(--text-3);
  font: 500 11px/1.4 var(--f-mono);
  text-align: right;
}
.nb-onboarding-actions .btn {
  min-height: 40px;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

@media (max-width: 620px) {
  .nb-onboarding-bg {
    align-items: end;
    padding: 0;
  }
  .nb-onboarding-modal {
    max-width: none;
    max-height: min(94dvh, 760px);
    border-radius: 16px 16px 0 0;
  }
  .nb-onboarding-head {
    padding: 18px 16px 15px;
  }
  .nb-onboarding-head h2 {
    font-size: 18px;
  }
  .nb-onboarding-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
  .nb-onboarding-body {
    padding: 17px 16px;
  }
  .nb-onboarding-body > p {
    margin-bottom: 15px;
    font-size: 13.5px;
  }
  .nb-onboarding-actions {
    flex-direction: column-reverse;
    padding: 13px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .nb-onboarding-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Skeleton ── */
.skel {
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: skelShimmer 1.4s linear infinite;
  border-radius: 6px;
}
@keyframes skelShimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* ── App shell ── */
.app {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sb-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 50;
}
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklch, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.content {
  padding: 24px 28px 40px;
  flex: 1;
  min-width: 0;
  max-width: 1480px;
  width: 100%;
}

/* Density modes */
body.density-tight {
  --density-row: 10px;
  --density-card: 14px;
  --density-stat: 18px;
}
body.density-loose {
  --density-row: 20px;
  --density-card: 24px;
  --density-stat: 28px;
}

/* ── Mobile ── */
.mobile-only {
  display: none;
}
@media (max-width: 880px) {
  .sidebar {
    display: none;
  }
  .mobile-only {
    display: block;
  }
  .content {
    padding: 16px 16px 100px;
  }
  .topbar {
    padding: 12px 16px;
  }
  .desktop-only {
    display: none !important;
  }

  /* Orders page toolbar: вертикальный стек, чипы горизонтально-скроллятся,
     поиск+сорт в полную ширину, переключатель cards/table скрыт (на мобиле
     карточки — единственный sensible режим). */
  .orders-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .orders-toolbar .filter-chips-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .orders-toolbar .filter-chips-row::-webkit-scrollbar {
    display: none;
  }
  .orders-toolbar .filter-chips-row > button {
    flex-shrink: 0;
  }
  .orders-toolbar .orders-controls {
    width: 100%;
    gap: 8px;
  }
  .orders-toolbar .orders-controls .search-pill {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0;
  }
  .orders-toolbar .orders-controls .select {
    width: 130px !important;
    flex-shrink: 0;
  }
  .orders-view-toggle {
    display: none !important;
  }

  /* Order detail на мобиле: ужимаем hero, h1 и правую колонку «выплата»,
     иначе шапка съедает 70% экрана до начала контента. Tabs скроллятся
     горизонтально (5 табов × 100px не помещаются в 390px без обрезок). */
  .detail-hero {
    padding: 16px !important;
  }
  .detail-hero h1 {
    font-size: 20px !important;
  }
  .detail-hero .detail-payout {
    font-size: 22px !important;
  }
  .detail-hero .detail-meta-row {
    font-size: 12px;
    gap: 10px !important;
  }
  .detail-hero .row.between {
    flex-wrap: wrap;
  }

  .detail-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap !important;
    margin: 0 -16px;
    padding: 0 16px;
  }
  .detail-tabs::-webkit-scrollbar {
    display: none;
  }
  .detail-tabs > .row {
    flex-wrap: nowrap;
  }
  .detail-tabs > .row > button {
    flex-shrink: 0;
    padding: 10px 12px !important;
    font-size: 12.5px !important;
  }

  /* DetailChat header на мобиле: компактнее аватар/имя, иконки не «перекрывают»
     текст. min-width:0 на col предотвращает выпирание текста за пределы. */
  .detail-chat-card {
    min-height: 60vh !important;
    max-height: 78vh !important;
  }
  .detail-chat-header {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .detail-chat-header > .row.gap-3 {
    min-width: 0;
    flex: 1 1 auto;
  }
  .detail-chat-header > .row.gap-3 > .col {
    min-width: 0;
    overflow: hidden;
  }
  .detail-chat-header > .row.gap-3 > .col > div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .detail-chat-header > .row.gap-2 {
    gap: 4px !important;
    flex-shrink: 0;
  }
  .detail-chat-header > .row.gap-2 > button {
    width: 32px !important;
    height: 32px !important;
  }

  /* Calendar: 92-px ячейки с полными плашками заказов на мобиле нечитаемы (5 колонок
     × 55px = 11px текста). Сжимаем до 56px, прячем плашки и слот-текст, вместо них —
     ряд цветных точек (одна точка = один заказ, цвет = услуга). Все подробности
     уезжают в «Выбранный день» под календарём, который и так стекается в 1 колонку
     через .dash-grid. Легенду тоже скрываем — на 390px она съедала 2 строки. */
  .calendar-grid-wrap {
    padding: 12px !important;
  }
  .calendar-weekdays {
    gap: 2px !important;
    margin-bottom: 4px !important;
  }
  .calendar-weekdays > div {
    font-size: 10px !important;
    padding: 2px 0 !important;
  }
  .calendar-month-grid {
    gap: 3px !important;
  }
  .calendar-cell {
    padding: 4px 4px 3px !important;
    min-height: 56px !important;
    border-radius: 7px !important;
  }
  .calendar-cell .row.between {
    margin-bottom: 2px !important;
  }
  .calendar-cell .mono {
    font-size: 12px !important;
  }
  .calendar-cell-content {
    display: none !important;
  }
  .calendar-cell-dots {
    display: flex !important;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 2px;
    align-items: center;
  }
  .calendar-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 1px color-mix(in oklch, currentColor 40%, transparent);
  }
  .calendar-dot-vac {
    width: 7px;
    height: 7px;
    background: var(--gold);
  }
  .calendar-dot-more {
    font:
      700 9px/1 'JetBrains Mono',
      monospace;
    color: var(--text-3);
    margin-left: 1px;
  }
  .calendar-legend {
    display: none !important;
  }

  /* Topbar на мобиле: title 16px вместо 20px (на 390px h1 «Календарь бустера»
     занимал ~60% строки и теснил бургер+колокольчик+ONLINE-кнопку), уменьшаем
     пилюлю ONLINE до иконного варианта (зелёная/серая точка + «ON/OFF»),
     гэп между кнопками сокращаем. */
  .topbar {
    gap: 6px !important;
    padding: 10px 12px !important;
  }
  .topbar h1.display {
    font-size: 16px !important;
  }
  .topbar .mobile-only:last-child button {
    padding: 5px 8px !important;
    font-size: 10px !important;
    letter-spacing: 0.03em !important;
  }

  /* Bottom-nav: чуть уменьшить иконки и тапнутые отступы, чтобы при 5 пунктах
     × 390px width не было «дрожащих» лейблов и горизонтального скролла.
     Лейблы 9.5px — все 5 слов («Дом/Пул/Заказы/Чат/Я») влезают в одну строку. */
  nav.mobile-only > button {
    padding: 6px 6px !important;
    gap: 2px !important;
    font-size: 9.5px !important;
  }
  nav.mobile-only > button svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* Content: 100px нижнего отступа достаточно для bottom-nav (~58px + safe-area).
     Top уменьшаем до 12, чтобы первый заголовок не «провисал» под топбаром
     на короткоэкранных Android (Pixel 4a, iPhone SE). */
  .content {
    padding: 12px 14px 100px !important;
  }

  /* ── Правила, расходившиеся с /бустеры/index.html. booster.html — prod-точка
       входа, и её inline-CSS отстал: без этого блока на телефоне чат шёл двумя
       колонками, профиль/отзывы наезжали, бургер-дровер открывался по центру.
       Все классы рендерятся общим кодом из бустеры/src/*.jsx. ── */
  .modal-bg.mobile-drawer {
    display: block;
    padding: 0;
  }
  .modal-bg.mobile-drawer .drawer-panel {
    width: min(280px, 86vw);
    height: 100%;
    background: var(--surface-2);
    border-right: 1px solid var(--line-2);
    box-shadow: 4px 0 24px #000a;
    overflow: auto;
    animation: drawerIn 0.22s ease;
  }
  .modal-bg.mobile-drawer .sidebar {
    display: flex;
    position: static;
    width: 100%;
    height: auto;
    min-height: 100%;
    border-right: 0;
  }
  /* Чат: одна колонка — список ИЛИ открытый диалог (как в Telegram/WhatsApp). */
  .chat-shell {
    grid-template-columns: 1fr !important;
    height: calc(100vh - 140px) !important;
  }
  .chat-shell .chat-shell__list {
    border-right: 0 !important;
  }
  .chat-shell--active .chat-shell__list {
    display: none !important;
  }
  .chat-shell:not(.chat-shell--active) .chat-shell__main {
    display: none !important;
  }
  /* Двухколоночные сетки (профиль, аналитика, отзывы) → одна колонка. */
  .dash-grid {
    grid-template-columns: 1fr !important;
  }
  .reviews-summary {
    grid-template-columns: 1fr !important;
  }
  .cal-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* Quick-actions заказа: кнопки столбиком во всю ширину. */
  .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .detail-actions > .btn {
    margin-left: 0 !important;
    width: 100%;
  }
  /* Расширенная карточка заказа (ранг→ранг + теги): иконки рангов (~122px слева)
     зажимали детали до ~190px, MMR-диапазон переносился. Стопкой: ряд иконок
     сверху, детали — на всю ширину. Простые карточки (ServiceHero) не трогаем. */
  .order-card--mmr {
    flex-direction: column !important;
    align-items: stretch !important;
  }
}
@keyframes drawerIn {
  from {
    transform: translateX(-100%);
  }
}
/* Отчёт по матчу: 6 полей K/D/A/GPM/XPM/длительность в один ряд ужимались до
   ~50px на телефоне. На узких экранах раскладываем в 2 ряда по 3 поля. */
@media (max-width: 560px) {
  .kda-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
/* Десктоп: точечный ряд скрыт, на десктопе показываются полные плашки заказов. */
@media (min-width: 881px) {
  .calendar-cell-dots {
    display: none !important;
  }
}
@media (min-width: 881px) {
  .mobile-only {
    display: none !important;
  }
}

/* ── Auth screens (Login + Booster picker) ── */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 30px 80px -20px #000e;
}
.auth-card-wide {
  max-width: 480px;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-family: Unbounded, 'Unbounded Fallback', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.auth-logo-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px var(--accent-glow));
}
.auth-acc {
  color: var(--accent-2);
}
.auth-sub {
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 22px;
}
.auth-field {
  margin-bottom: 14px;
}
.auth-field label {
  display: block;
  font:
    600 11.5px/1.2 'JetBrains Mono',
    monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 7px;
}
.auth-err {
  color: var(--danger);
  background: var(--danger-dim);
  border: 1px solid color-mix(in oklch, var(--danger) 30%, transparent);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 13px;
  margin-top: 10px;
}
.auth-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.auth-pick {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}
.auth-pick:hover {
  background: var(--hover);
  border-color: var(--line-3);
  transform: translateY(-1px);
}
.auth-pick-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-dim), transparent);
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  font:
    700 13px Unbounded,
    'Unbounded Fallback',
    sans-serif;
  color: var(--accent-2);
  flex-shrink: 0;
}
.auth-pick-info {
  flex: 1;
  min-width: 0;
}
.auth-pick-name {
  font-weight: 700;
  font-size: 14px;
}
.auth-pick-meta {
  font-size: 12px;
  margin-top: 2px;
}

/* Уважение к prefers-reduced-motion: все анимации/переходы почти мгновенны. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Голосовое приветствие: тот же плеер, что клиент видит на витрине ──
   Системный <audio controls> рисовал белую плашку поверх тёмного кабинета и
   играл звук без выравнивания громкости, которое применяет витрина. Здесь
   вид и звук совпадают с тем, что получит клиент. */
.cab-voice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: color-mix(in oklch, var(--accent) 7%, var(--surface-2));
  border: 1px solid color-mix(in oklch, var(--accent) 22%, var(--line));
}
.cab-voice audio {
  display: none;
}
.cab-voice-play {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  transition:
    transform 0.15s ease,
    filter 0.15s ease;
}
.cab-voice-play:hover {
  filter: brightness(1.12);
}
.cab-voice-play:active {
  transform: scale(0.94);
}
.cab-voice-play svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.cab-voice-wave {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(2px, 0.4vw, 6px);
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  min-width: 0;
}
/* max-width обязателен: без него полоски тянутся на всю ширину карточки и
   волна превращается в ряд блоков (кабинет шире витрины). */
.cab-voice-wave i {
  flex: 1 1 2px;
  min-width: 2px;
  max-width: 5px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--text-3) 55%, transparent);
  transition: background 0.15s ease;
}
.cab-voice-wave i.is-played {
  background: var(--accent);
}
.cab-voice-time {
  flex: 0 0 auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
@media (max-width: 560px) {
  .cab-voice {
    gap: 9px;
    padding: 9px 11px;
  }
  .cab-voice-play {
    width: 34px;
    height: 34px;
  }
  .cab-voice-wave {
    height: 24px;
    gap: 2px;
  }
  .cab-voice-wave i {
    min-width: 1px;
    max-width: 4px;
  }
}

/* ─── Где данные клиента и быстрые ответы (pages-detail-access.jsx, 30.09.2026) ───
   Полоса над вкладками заказа: янтарь — ждём данные Steam от клиента, зелёный —
   данные получены. Быстрые ответы — ряд кнопок над полем ввода чата; на
   телефоне ряд листается вбок, а не растёт в высоту. */
.nb-access {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 14px;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid color-mix(in oklch, var(--warning) 35%, var(--line));
  background: linear-gradient(90deg, var(--warning-dim), transparent 75%);
}
.nb-access.is-ready {
  border-color: color-mix(in oklch, var(--success) 35%, var(--line));
  background: linear-gradient(90deg, var(--success-dim), transparent 75%);
}
.nb-access-ic {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--warning);
  background: var(--warning-dim);
}
.nb-access.is-ready .nb-access-ic {
  color: var(--success);
  background: var(--success-dim);
}
.nb-access-txt {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nb-access-txt b {
  font-size: 14px;
  color: var(--text);
}
.nb-access-txt span {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-2);
}
.nb-access-act {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nb-access-ask {
  background: var(--warning);
  color: #1a1204;
  font-weight: 700;
}
.nb-access-ask:disabled {
  opacity: 1;
  color: var(--warning);
  background: var(--warning-dim);
  border-color: color-mix(in oklch, var(--warning) 35%, transparent);
}

.nb-qb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 18px 8px;
}
.nb-qb-cap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}
.nb-qb-cap em {
  padding: 1px 5px;
  border-radius: 5px;
  font-style: normal;
  font-size: 10px;
  color: var(--info);
  background: var(--info-dim);
}
.nb-qb-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-2);
  font:
    600 12px/1.2 Manrope,
    'Manrope Fallback',
    sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}
.nb-qb-chip:hover {
  color: var(--text);
  border-color: var(--line-3);
}
.nb-qb-chip:disabled {
  cursor: default;
  opacity: 0.5;
}
.nb-qb-chip svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.nb-qb-chip.is-creds {
  color: var(--warning);
  border-color: color-mix(in oklch, var(--warning) 40%, transparent);
  background: var(--warning-dim);
}
.nb-qb-chip.is-creds.is-ready {
  color: var(--success);
  border-color: color-mix(in oklch, var(--success) 40%, transparent);
  background: var(--success-dim);
}
.nb-qb-chip.is-ask {
  color: #1a1204;
  border-color: transparent;
  background: var(--warning);
}
.nb-qb-chip.is-sent {
  opacity: 1;
  color: var(--success);
  border-color: color-mix(in oklch, var(--success) 30%, transparent);
  background: transparent;
}
@media (max-width: 620px) {
  .nb-access {
    padding: 12px;
  }
  .nb-access-act {
    width: 100%;
  }
  .nb-access-act .btn {
    flex: 1 1 auto;
  }
  .nb-qb {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 0 8px;
    padding: 0 12px;
    scrollbar-width: none;
  }
  .nb-qb::-webkit-scrollbar {
    display: none;
  }
}
