/* ===== SITE CABINET (личный кабинет) ===== */

.cab-page { padding: 28px 0 80px; }
.cab-page .crumbs { margin-bottom: 18px; }

.cab-wrap {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* ---------- Sidebar ---------- */
.cab-side {
  padding: 28px 22px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(74,124,255,0.06) 0%, rgba(10,15,30,0.6) 100%);
  border: 1px solid rgba(74,124,255,0.25);
  border-top-color: rgba(107,148,255,0.5);
  box-shadow:
    inset 0 1px 0 rgba(107,148,255,0.3),
    0 0 0 1px rgba(74,124,255,0.08),
    0 10px 30px rgba(74,124,255,0.12),
    0 0 40px rgba(74,124,255,0.05);
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
}
.cab-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cab-id {
  font-family: 'Geist', sans-serif;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 2px;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cab-balance {
  margin-top: 18px;
  padding: 16px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(212,175,106,0.14) 0%, rgba(212,175,106,0.03) 100%);
  border: 1px solid rgba(212,175,106,0.28);
  border-top-color: rgba(212,175,106,0.5);
  text-align: center;
}
.cab-balance-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-bright);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.cab-balance-amt {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: -0.025em;
  margin-top: 2px;
  font-feature-settings: "tnum";
}
.cab-balance-amt .currency { margin-left: 3px; }

.cab-nav {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cab-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 10px;
  text-decoration: none;
  transition: background .18s, color .18s, border-color .18s;
  border: 1px solid transparent;
}
.cab-nav a:hover { background: rgba(255,255,255,0.04); color: #fff; }
.cab-nav a.active {
  background: rgba(74,124,255,0.12);
  color: #fff;
  border-color: rgba(74,124,255,0.25);
}
.cab-nav a svg { width: 16px; height: 16px; opacity: 0.75; flex-shrink: 0; }
.cab-logout-wrap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.cab-nav a.logout { color: #ff8a8a; }
.cab-nav a.logout:hover { background: rgba(255,120,120,0.08); color: #ff7878; }

/* «История заказов» горит когда у юзера есть незавершённый заказ
   (site_has_in_progress_order). Маленькая синяя точка справа, мягко пульсирует —
   привлекает внимание не агрессивно. Параллельно с плашкой «Завершите заказ»
   в шапке создаёт единую визуальную линию: красная плашка наверху → синий
   маяк на пункте, куда нужно кликнуть. */
.cab-nav a.cab-nav-hot { color: #fff; position: relative; padding-right: 32px; }
.cab-nav a.cab-nav-hot::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5b8cff;
  box-shadow:
    0 0 8px rgba(91, 140, 255, 0.85),
    0 0 16px rgba(91, 140, 255, 0.4);
  animation: cabNavHotPulse 1.8s ease-in-out infinite;
}
@keyframes cabNavHotPulse {
  0%, 100% { transform: translateY(-50%) scale(1); opacity: 1; }
  50% { transform: translateY(-50%) scale(1.35); opacity: 0.85; }
}

/* ---------- Main column ---------- */
.cab-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cab-main > section + section {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.tab-h {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 18px;
}

/* ===== Settings tab (Настройки) ===== */
.settings-page { display: flex; flex-direction: column; gap: 18px; }
.settings-card { padding: 22px 22px 20px; }
.settings-card-head { margin-bottom: 16px; }
.settings-card-head h2 {
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  color: #fff; margin: 0 0 6px;
}
.settings-card-desc {
  font-size: 13px; line-height: 1.5;
  color: var(--text-muted); margin: 0;
}
.settings-card-desc strong { color: var(--text); font-weight: 600; }

.settings-form { display: flex; flex-direction: column; gap: 12px; }
.settings-row { display: flex; flex-direction: column; gap: 6px; }
.settings-row label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
}
.settings-row input {
  height: 44px;
  padding: 0 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .18s, background .18s;
}
.settings-row input:focus {
  outline: 0;
  border-color: rgba(74,124,255,0.6);
  background: rgba(255,255,255,0.05);
}

.settings-error,
.settings-success {
  display: none;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
}
.settings-error {
  background: rgba(244,67,54,0.10);
  border: 1px solid rgba(244,67,54,0.35);
  color: #ffb4ad;
}
.settings-success {
  background: rgba(46,160,67,0.12);
  border: 1px solid rgba(46,160,67,0.38);
  color: #98e0a3;
}
.settings-error.show,
.settings-success.show { display: block; }

.settings-submit {
  margin-top: 4px;
  height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4a7cff 0%, #355fcc 100%);
  border: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: filter .18s, transform .12s;
}
.settings-submit:hover { filter: brightness(1.08); }
.settings-submit:active { transform: scale(.98); }
.settings-submit:disabled { opacity: 0.55; cursor: not-allowed; }
.settings-submit--ghost {
  background: rgba(74,124,255,0.12);
  color: #fff;
  border: 1px solid rgba(74,124,255,0.35);
}
.settings-submit--ghost:hover { background: rgba(74,124,255,0.18); filter: none; }

.settings-pending {
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,182,72,0.12), rgba(255,182,72,0.04));
  border: 1px solid rgba(255,182,72,0.32);
}
.settings-pending-head {
  display: flex; align-items: center; gap: 8px;
  font: 700 13px/1 'Geist'; color: #ffb648;
  margin-bottom: 8px;
}
.settings-pending-addr {
  font: 700 14px/1.3 'Geist Mono', monospace;
  color: var(--text); word-break: break-all; margin-bottom: 8px;
}
.settings-pending-meta {
  font-size: 12px; color: var(--text-muted);
  line-height: 1.5; margin-bottom: 14px;
}
.settings-cancel {
  padding: 9px 16px;
  border-radius: 9px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 0;
  font: 700 12px/1 'Geist';
  cursor: pointer;
}
.settings-cancel:hover { background: rgba(255,255,255,0.13); }

.cab-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cab-section-head h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0;
}
.cab-section-head .act {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-bright);
  text-decoration: none;
  cursor: pointer;
}
.cab-section-head .act:hover { color: var(--text); }
.cab-section-head .hint {
  font-size: 12px;
  color: var(--text-muted);
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  transition: color .2s;
}
.logout-btn:hover { color: #ff7878; }
.logout-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.cab-card {
  padding: 22px 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(74,124,255,0.06) 0%, rgba(10,15,30,0.6) 100%);
  border: 1px solid rgba(74,124,255,0.25);
  border-top-color: rgba(107,148,255,0.5);
  box-shadow:
    inset 0 1px 0 rgba(107,148,255,0.3),
    0 0 0 1px rgba(74,124,255,0.08),
    0 10px 30px rgba(74,124,255,0.12),
    0 0 40px rgba(74,124,255,0.05);
}

/* ---------- Orders tab — V4 master/detail (beta parity) ---------- */
.cab-main .page-head { margin-bottom: 24px; }
.cab-main .page-head h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.cab-main .page-head .subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.v4 {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

.v4-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.v4-top-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.v4-regions {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.v4-regions button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.v4-regions button.active { background: var(--gold-dim); color: var(--gold-bright); }
.v4-regions img {
  width: 16px;
  height: 11px;
  object-fit: cover;
  border-radius: 2px;
}
.v4-list-wrap {
  position: relative;
  min-width: 0;
  max-width: 100%;
}
.v4-list {
  display: flex;
  flex-direction: row;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 8px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.v4-list::-webkit-scrollbar { height: 4px; }
.v4-list::-webkit-scrollbar-track { background: transparent; }
.v4-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
.v4-list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
.v4-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(14,18,30,0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: all .15s;
  z-index: 5;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.v4-arrow:hover:not(:disabled) {
  background: rgba(14,18,30,0.95);
  border-color: var(--gold);
  color: var(--gold-bright);
}
.v4-arrow:disabled { opacity: 0; pointer-events: none; }
.v4-arrow svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.v4-arrow-prev { left: -10px; }
.v4-arrow-next { right: -10px; }

.v4-row {
  flex: 0 0 280px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .15s;
  font-family: inherit;
  color: inherit;
}
.v4-row.is-region-hidden { display: none; }
.v4-row:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.v4-row.active {
  border-color: var(--border-gold);
  background: rgba(212,175,106,0.06);
}
.v4-row.in-progress {
  border-color: rgba(74,124,255,0.5);
  background: rgba(74,124,255,0.04);
  animation: v4-card-pulse 2.4s ease-in-out infinite;
}
.v4-row.in-progress.active {
  border-color: var(--blue-bright);
  background: rgba(74,124,255,0.08);
}
@keyframes v4-card-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(74,124,255,0.35), 0 0 14px rgba(74,124,255,0.18); }
  50% { box-shadow: 0 0 0 1px rgba(74,124,255,0.7), 0 0 22px rgba(74,124,255,0.4); }
}
.v4-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.v4-row-title {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: var(--text);
}
.v4-row-qty { color: var(--gold-bright); font-weight: 800; font-size: 12px; }
.v4-row-price {
  font-size: 13px;
  font-weight: 700;
  font-feature-settings: "tnum";
  flex-shrink: 0;
  color: var(--text);
}
.v4-row-price .currency { margin-left: 2px; opacity: 0.7; }
.v4-row-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.v4-row-sub img {
  width: 14px;
  height: 10px;
  object-fit: cover;
  border-radius: 2px;
}
.v4-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  line-height: 1;
}
.v4-status svg { width: 11px; height: 11px; stroke-width: 2.6; }
.v4-status.s-done {
  color: var(--green-bright);
  background: rgba(94,212,163,0.12);
  border: 1px solid rgba(94,212,163,0.28);
}
.v4-status.s-progress {
  color: var(--blue-bright);
  background: rgba(74,124,255,0.12);
  border: 1px solid rgba(74,124,255,0.28);
}
.v4-status.s-progress::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 0 0 rgba(107,148,255,0.6);
  animation: v4-dot-pulse 1.4s ease-out infinite;
}
.v4-status.s-progress svg { display: none; }
@keyframes v4-dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(107,148,255,0.65); }
  70% { box-shadow: 0 0 0 7px rgba(107,148,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(107,148,255,0); }
}
.v4-row-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.v4-row-chips .chip {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.chip-mut {
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}
.chip-green {
  color: var(--green-bright);
  background: rgba(94,212,163,0.1);
  border: 1px solid rgba(94,212,163,0.22);
}

.v4-right { min-width: 0; }
.rv1 {
  padding: 24px 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.rv1.in-progress {
  border-color: var(--blue-bright);
  background: linear-gradient(180deg, rgba(74,124,255,0.04), var(--bg-elevated) 60%);
  animation: rv1-pulse 2.4s ease-in-out infinite;
}
@keyframes rv1-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(74,124,255,0.35), 0 0 18px rgba(74,124,255,0.18); }
  50% { box-shadow: 0 0 0 1px rgba(74,124,255,0.7), 0 0 32px rgba(74,124,255,0.4); }
}
.rv1.is-hidden { display: none; }
.rv1-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.rv1-ord { font-size: 16px; font-weight: 700; color: var(--text); }
.rv1-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.rv1-total {
  font-size: 22px;
  font-weight: 800;
  font-feature-settings: "tnum";
  letter-spacing: -0.02em;
  color: var(--text);
}
.rv1-total .currency { margin-left: 2px; opacity: 0.7; }
.rv1-items { display: flex; flex-direction: column; gap: 10px; }
.rv1-row {
  display: grid;
  grid-template-columns: 80px minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.rv1-row:last-child { border-bottom: none; }
.rv1-info { min-width: 0; }
.rv1-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rv1-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  font-feature-settings: "tnum";
}
.th-sm {
  width: 80px;
  aspect-ratio: var(--game-card-aspect);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  position: relative;
  background: rgba(255,255,255,0.03);
}
.th-sm-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}
.th-sm-sub {
  padding: 0;
  background: rgba(255,255,255,0.03);
}
.th-sm-sub img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.th-sm-topup {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 50%),
    linear-gradient(155deg, #8ba7ff 0%, #4a7cff 55%, #2c4ea6 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 7px 6px;
  color: #fff;
  position: relative;
}
.th-sm-topup::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 4px;
  pointer-events: none;
}
.tsm-brand {
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: rgba(255,255,255,0.78);
  position: relative;
}
.tsm-denom {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fff;
  font-feature-settings: "tnum";
  position: relative;
  text-align: center;
}
.tsm-foot {
  font-size: 5.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
  position: relative;
  text-align: right;
}
.code-pill-inline {
  display: inline-flex;
  align-items: center;
  background: rgba(74,124,255,0.06);
  border: 1px solid rgba(74,124,255,0.3);
  border-radius: 6px;
  padding: 4px 4px 4px 12px;
  gap: 8px;
}
.cpi-val {
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  white-space: nowrap;
}
.cpi-cp {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: none;
  flex-shrink: 0;
  transition: transform .15s;
  box-shadow: 0 3px 10px rgba(74,124,255,0.25);
  cursor: pointer;
}
.cpi-cp:hover { transform: translateY(-1px); }
.cpi-cp.ok {
  background: linear-gradient(135deg, var(--green-bright), #3fa778);
  box-shadow: 0 3px 10px rgba(94,212,163,0.3);
}
.cpi-cp svg { width: 13px; height: 13px; }
.rv1-progress-banner {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  background: rgba(74,124,255,0.08);
  border-left: 4px solid var(--blue);
  border-radius: 0 14px 14px 0;
  margin-top: 16px;
}
.rv1-progress-banner .ic {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #6b94ff, #2a5cd8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(74,124,255,0.14);
}
.rv1-progress-banner .ic svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rv1-progress-banner .text { flex: 1; min-width: 0; }
.rv1-progress-banner .title {
  font-size: 17px;
  font-weight: 800;
  color: var(--blue-bright);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.rv1-progress-banner .desc {
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
  font-weight: 700;
}
.rv1-progress-banner .desc a {
  color: var(--blue-bright);
  border-bottom: 1px dashed rgba(107,148,255,0.45);
}
.rv1-numbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.4);
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 10px;
}
.rv1-numbar .l {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.rv1-numbar .v {
  flex: 1;
  font-family: 'Geist', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--blue-bright);
  letter-spacing: 0.02em;
  font-feature-settings: "ss01" off, "ss02" off, "tnum";
}
.rv1-numbar button {
  padding: 7px 14px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s;
}
.rv1-numbar button:hover { background: var(--blue-bright); }
.rv1-progress-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.rv1-progress-action {
  flex: 1;
  padding: 13px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.rv1-progress-action.tg {
  background: #229ED9;
  box-shadow: 0 4px 12px rgba(34,158,217,0.3);
}
.rv1-progress-action.tg:hover {
  box-shadow: 0 8px 20px rgba(34,158,217,0.5);
  transform: translateY(-2px);
}
.rv1-progress-action.chat {
  background: linear-gradient(135deg, #7a5dff, #4a7cff);
  box-shadow: 0 4px 12px rgba(122,93,255,0.3);
}
.rv1-progress-action.chat:hover {
  box-shadow: 0 8px 20px rgba(122,93,255,0.5);
  transform: translateY(-2px);
}
.rv1-progress-action svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .rv1-progress-actions { flex-direction: column; }
}
.rv1-foot {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.rv1-tile {
  flex: 1;
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 7px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: all .18s;
  font-family: inherit;
  cursor: pointer;
}
.rv1-tile:hover {
  border-color: var(--border-blue);
  background: rgba(74,124,255,0.05);
}
.rv1-tile:hover .tile-title { color: var(--blue-bright); }
.rv1-tile:hover .tile-ic {
  transform: rotate(12deg);
  box-shadow: 0 0 18px rgba(74,124,255,0.4);
}
.tile-ic {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(107,148,255,0.28), rgba(74,124,255,0.06));
  border: 1px solid var(--border-blue);
  color: var(--blue-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .4s, box-shadow .3s;
}
.tile-ic svg { width: 20px; height: 20px; }
.tile-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
  transition: color .15s;
}
.tile-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.35;
}
.instr-drawer {
  display: none;
  margin-top: 16px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.instr-drawer.open { display: block; }
.instr-drawer .ttl {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 14px;
}
.instr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.instr-group {
  padding: 14px 16px;
  background: rgba(74,124,255,0.04);
  border: 1px solid rgba(74,124,255,0.18);
  border-radius: 10px;
  transition: border-color .2s, background .2s;
}
.instr-group:hover {
  background: rgba(74,124,255,0.07);
  border-color: rgba(74,124,255,0.32);
}
.instr-group .h {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(74,124,255,0.15);
  display: flex;
  align-items: center;
  gap: 8px;
}
.instr-group .h .ico {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  background: rgba(74,124,255,0.20);
  border: 1px solid rgba(74,124,255,0.3);
  border-radius: 4px;
  color: var(--blue-bright);
  letter-spacing: 0.04em;
}
.instr-group ol {
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 4px 0 0;
}
.instr-group b { color: var(--text); font-weight: 600; }
.instr-group ol a {
  color: var(--blue-bright);
  border-bottom: 1px dashed rgba(107,148,255,0.4);
  transition: border-color .15s, color .15s;
}
.instr-group ol a:hover {
  color: #fff;
  border-bottom-color: var(--blue-bright);
}

/* ---------- PSN tab ---------- */
.psn-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  margin-bottom: 14px;
  width: fit-content;
}
.psn-toggle button {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 7px;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.psn-toggle button.active {
  background: rgba(74,124,255,0.2);
  color: #fff;
  border-color: rgba(74,124,255,0.3);
}
.psn-toggle button img {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}
.psn-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.psn-field { display: flex; flex-direction: column; gap: 4px; }
.psn-field label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.psn-field input {
  padding: 11px 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.psn-field input:focus { border-color: rgba(74,124,255,0.5); }

.psn-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.psn-save-btn {
  padding: 11px 22px;
  background: linear-gradient(135deg, #2d62ff 0%, #4a7cff 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(74,124,255,0.25);
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.psn-save-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(74,124,255,0.35); }
.psn-save-btn:disabled { opacity: 0.55; cursor: progress; box-shadow: none; }
.psn-save-msg {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.psn-save-msg.is-success { color: #3ddc84; }
.psn-save-msg.is-error { color: #ff7878; }

.psn-info {
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.psn-info strong { color: #fff; }

/* ---------- PSN Reserve Codes (rc-*) ---------- */
.rc-toggle {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  margin-top: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-top-color: rgba(255,255,255,0.14);
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  transition: background .2s, border-color .2s;
}
.rc-toggle:hover {
  background: linear-gradient(160deg, rgba(74,124,255,0.1) 0%, rgba(74,124,255,0.02) 100%);
  border-color: rgba(74,124,255,0.3);
}
.rc-toggle .rc-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(74,124,255,0.15);
  border: 1px solid rgba(74,124,255,0.25);
  color: var(--blue-bright, #6c8eff);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rc-toggle .rc-icon svg { width: 18px; height: 18px; }
.rc-toggle .rc-body { flex: 1; min-width: 0; }
.rc-toggle .rc-title { font-size: 13px; font-weight: 700; }
.rc-toggle .rc-hint { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.rc-toggle .rc-count {
  padding: 3px 9px;
  background: rgba(74,124,255,0.2);
  color: var(--blue-bright, #6c8eff);
  border-radius: 100px;
  font-size: 11px; font-weight: 800;
}
.rc-toggle .rc-chevron { color: var(--text-dim, #6c7280); transition: transform .25s, color .15s; flex-shrink: 0; }
.rc-toggle .rc-chevron svg { width: 16px; height: 16px; display: block; }
.rc-toggle.open .rc-chevron { transform: rotate(90deg); color: var(--blue-bright, #6c8eff); }

.rc-list {
  margin-top: 10px;
  padding: 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  display: none;
  flex-direction: column;
  gap: 6px;
}
.rc-list.open { display: flex; animation: rc-slide-down .25s ease; }
@keyframes rc-slide-down {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  transition: border-color .15s, opacity .2s;
}
.rc-item:hover { border-color: rgba(255,255,255,0.18); }
.rc-item.used { opacity: 0.55; }
.rc-item.used .rc-code { text-decoration: line-through; }
.rc-item .rc-num {
  font-size: 11px; color: var(--text-muted);
  width: 22px; flex-shrink: 0;
  text-align: right;
}
.rc-item .rc-code {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
  padding: 4px 6px;
  border-radius: 5px;
  transition: background .15s, color .15s;
  text-transform: uppercase;
}
.rc-item input.rc-code { width: 100%; }
.rc-item .rc-code.editing {
  background: rgba(74,124,255,0.1);
  color: var(--blue-bright, #6c8eff);
  box-shadow: inset 0 0 0 1px rgba(74,124,255,0.4);
}
.rc-item.is-editing { border-color: rgba(74,124,255,0.4); opacity: 1; }
.rc-item.is-editing.used .rc-code { text-decoration: none; }

.rc-status {
  padding: 3px 9px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity .15s;
}
.rc-status:hover { opacity: 0.85; }
.rc-status.active {
  color: var(--green-bright, #3ddc84);
  background: rgba(94,212,163,0.12);
  border: 1px solid rgba(94,212,163,0.32);
}
.rc-status.used {
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
}

.rc-item .rc-actions { display: flex; gap: 4px; }
.rc-item .rc-btn {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
  padding: 0;
}
.rc-item .rc-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.18); }
.rc-item .rc-btn.edit:hover { color: var(--blue-bright, #6c8eff); border-color: rgba(74,124,255,0.4); background: rgba(74,124,255,0.08); }
.rc-item .rc-btn.save { color: var(--green-bright, #3ddc84); border-color: rgba(94,212,163,0.4); background: rgba(94,212,163,0.08); }
.rc-item .rc-btn.save:hover { background: rgba(94,212,163,0.16); }
.rc-item .rc-btn.delete:hover { color: #ff7878; border-color: rgba(255,120,120,0.4); background: rgba(255,120,120,0.08); }
.rc-item .rc-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.rc-add-row {
  display: flex; gap: 8px;
  margin-top: 4px;
  padding: 8px;
  background: rgba(74,124,255,0.05);
  border: 1px dashed rgba(74,124,255,0.3);
  border-radius: 8px;
  transition: border-color .15s;
}
.rc-add-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rc-add-row input::placeholder { color: var(--text-dim, #6c7280); letter-spacing: normal; font-size: 12px; text-transform: none; }
.rc-add-row input.rc-invalid,
.rc-item input.rc-code.rc-invalid { box-shadow: inset 0 0 0 1px #ff7878; border-color: #ff7878; }
.rc-add-btn {
  padding: 8px 16px;
  background: var(--blue, #4a7cff);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.rc-add-btn:hover { background: var(--blue-bright, #6c8eff); }

.rc-empty {
  text-align: center;
  padding: 16px 12px 4px;
  color: var(--text-muted);
  font-size: 12px;
}
.rc-msg {
  min-height: 14px;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 2px;
}
.rc-msg.is-success { color: #3ddc84; }
.rc-msg.is-error { color: #ff7878; }

/* ---------- Accounts ---------- */
.accs-active {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(74,124,255,0.08);
  border: 1px solid rgba(74,124,255,0.22);
  margin-bottom: 14px;
}
.accs-active .logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}
.accs-active .logo img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}
.accs-active .logo.bg-tg img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.accs-active .meta { flex: 1; min-width: 0; }
.accs-active .meta .name { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.accs-active .meta .status { font-size: 11px; color: #4a7cff; font-weight: 500; margin-top: 2px; }
.accs-active .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 8px rgba(61,220,132,0.6);
}
.accs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.accs-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all .2s;
}
.accs-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.04);
}
.accs-btn[disabled],
.accs-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}
.accs-btn[disabled]:hover,
.accs-btn[aria-disabled="true"]:hover {
  transform: none;
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.025);
}
.accs-btn .logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  flex-shrink: 0;
  overflow: hidden;
}
.accs-btn .logo img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}
.accs-btn .logo.bg-tg img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.accs-btn--tg-widget {
  cursor: default;
  padding: 0 14px;
  overflow: hidden;
}
.accs-btn--tg-widget:hover {
  transform: none;
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.025);
}
.accs-btn--tg-widget iframe { display: block !important; }

.bg-google { background: #fff; color: #444; }
.bg-vk { background: #0077ff; color: #fff; }
.bg-tg { background: #229ED9; color: #fff; }

/* ---------- Referrals (overview + tab) ---------- */
/* Compact ref-link-row used in OVERVIEW cab-card */
.ref-link-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.ref-link-input {
  flex: 1;
  padding: 12px 14px;
  background: rgba(0,0,0,0.25);
  border: none;
  outline: none;
  color: var(--text-muted);
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  letter-spacing: 0.02em;
  min-width: 0;
}
.ref-copy {
  padding: 12px 18px;
  background: linear-gradient(160deg, var(--gold-bright) 0%, var(--gold) 100%);
  color: #1a1a1a;
  border: none;
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s;
}
.ref-copy:hover { filter: brightness(1.1); }
.ref-copy.done { background: linear-gradient(160deg, #4ec773, #3fa15c); color: #fff; }

/* ref-stats: blue-tinted stat tiles (used in overview if context supports) */
.ref-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.ref-stat {
  position: relative;
  padding: 14px 40px 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(74,124,255,0.08);
  border: 1px solid rgba(74,124,255,0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  color: inherit;
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s;
}
.ref-stat:not(a) { padding-right: 16px; }
a.ref-stat { cursor: pointer; }
a.ref-stat:hover {
  background: rgba(74,124,255,0.14);
  border-color: rgba(74,124,255,0.35);
  transform: translateY(-1px);
}
a.ref-stat .chev {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--blue-bright);
  transition: transform .2s;
}
a.ref-stat .chev svg { width: 16px; height: 16px; }
a.ref-stat:hover .chev { transform: translateY(-50%) translateX(3px); }
.ref-stat .num {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-feature-settings: "tnum";
}
.ref-stat .num .currency { font-size: 13px; opacity: 0.7; margin-left: 3px; }
.ref-stat .lbl {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Cashback plashkas (overview + referrals tab) */
.ref-cashback {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.ref-cb-plashka {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(212,175,106,0.08);
  border: 1px solid rgba(212,175,106,0.22);
}
.ref-cb-plashka .pct {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.ref-cb-plashka .txt {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
}
.ref-cb-plashka .txt b { color: var(--text); font-weight: 600; }

/* ============================================
   REFERRALS TAB (.ref-page) — beta hero/friends layout
   ============================================ */
.ref-page { padding: 0; display: flex; flex-direction: column; gap: 0; }

.hero-card {
  background:
    radial-gradient(circle at 88% 15%, rgba(212,175,106,0.18) 0%, transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(74,124,255,0.14) 0%, transparent 55%),
    linear-gradient(135deg, rgba(212,175,106,0.06) 0%, rgba(74,124,255,0.04) 100%);
  border: 1px solid rgba(212,175,106,0.25);
  border-radius: 22px;
  padding: 36px 40px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.hero-card::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.hero-card > * { position: relative; z-index: 1; }

.hero-left { display: flex; flex-direction: column; gap: 20px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
  font-weight: 700;
}
.hero-eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--gold-bright);
}
.earn-block { display: flex; flex-direction: column; gap: 10px; }
.earn-value {
  font-size: 72px;
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: var(--text);
  font-feature-settings: "tnum";
}
.earn-value .currency { margin-left: 12px; font-size: 0.6em; opacity: 0.85; }
.earn-trend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--green-bright);
  font-weight: 600;
  background: rgba(94,212,163,0.12);
  border: 1px solid rgba(94,212,163,0.25);
  padding: 5px 12px;
  border-radius: 999px;
  align-self: flex-start;
}
.earn-trend svg { width: 12px; height: 12px; }

.hero-stats-row {
  display: flex;
  gap: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.friends-stat-num {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
  font-feature-settings: "tnum";
}
.friends-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-top: 8px;
}
.friends-stat-label .active { color: var(--green-bright); font-weight: 700; }

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 300px;
}
.invite-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 26px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: #0a0c12;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 8px 22px rgba(212,175,106,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform .2s, box-shadow .2s;
}
.invite-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 30px rgba(212,175,106,0.4),
    inset 0 1px 0 rgba(255,255,255,0.4);
}
.invite-cta.done {
  background: linear-gradient(160deg, #4ec773, #3fa15c);
  color: #fff;
}
.invite-cta svg { width: 15px; height: 15px; stroke-width: 2.5; }

/* .ref-link (referrals tab) — different from .ref-link-row */
.ref-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
}
.ref-link-label {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}
.ref-link-code {
  flex: 1;
  min-width: 0;
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ref-link-copy {
  background: none;
  border: none;
  color: var(--blue-bright);
  cursor: pointer;
  padding: 4px;
  transition: color .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ref-link-copy:hover { color: var(--gold-bright); }
.ref-link-copy.done { color: var(--green-bright); }
.ref-link-copy svg { width: 15px; height: 15px; }

/* SECTION DIVIDER */
.section-divider {
  margin: 48px 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-divider-text {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-divider-text .count {
  font-family: inherit;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 600;
}
.section-divider-text.active .count { color: var(--green-bright); }

/* FRIENDS GRID */
.friends-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.friend {
  background: linear-gradient(160deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.015) 50%, rgba(255,255,255,0.005) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-top-color: rgba(255,255,255,0.14);
  border-bottom-color: rgba(0,0,0,0.3);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  cursor: default;
  transition: background .2s, border-color .2s;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 1px 0 rgba(255,255,255,0.06) inset, 0 -1px 0 rgba(0,0,0,0.12) inset;
}
.friend:hover {
  background: var(--bg-elevated-hover);
  border-color: var(--border-blue);
}
.friend.inactive { opacity: 0.7; }
.friend.inactive:hover { opacity: 1; }

.friend-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  position: relative;
}
.friend-avatar.c1 { background: linear-gradient(135deg, #4a7cff, #2a5278); }
.friend-avatar.c2 { background: linear-gradient(135deg, #ff7878, #c04040); }
.friend-avatar.c3 { background: linear-gradient(135deg, #5ed4a3, #2e8060); }
.friend-avatar.c4 { background: linear-gradient(135deg, #ffb05c, #cc6a10); }
.friend-avatar.c5 { background: linear-gradient(135deg, #d4af6a, #8a6d30); }
.friend-avatar.c6 { background: linear-gradient(135deg, #a877ff, #5a35a0); }
.friend-avatar.c7 { background: linear-gradient(135deg, #6dd5ed, #2980b9); }
.friend-avatar.c8 { background: linear-gradient(135deg, #f093fb, #b66dd9); }
.friend.inactive .friend-avatar {
  background: linear-gradient(135deg, #2a2e3a, #1a1d26);
  color: var(--text-muted);
}
.friend:not(.inactive) .friend-avatar::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--green-bright);
  border: 2px solid var(--bg);
  box-shadow: 0 0 6px rgba(94,212,163,0.6);
}

.friend-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.friend-email {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.friend-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.friend-meta .dot-sep {
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.friend-earned {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.friend-earned-amount {
  font-size: 15px;
  font-weight: 500;
  color: var(--gold-bright);
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}
.friend-earned-label {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}
.friend.inactive .friend-earned-amount { color: var(--text-dim); }

.friend-pending {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 7px;
  flex-shrink: 0;
}

/* ---------- Empty state for anonymous ---------- */
.cab-anon {
  padding: 60px 28px;
  text-align: center;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(212,175,106,0.22);
  border-radius: 14px;
}
.cab-anon .ico {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.cab-anon .ico svg { width: 28px; height: 28px; }
.cab-anon h2 { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.015em; margin: 0 0 8px; }
.cab-anon p { font-size: 14px; color: var(--text-muted); margin: 0 0 22px; }
.cab-anon .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cab-anon .btn-primary {
  background: linear-gradient(135deg, #2d62ff 0%, #4a7cff 100%);
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.cab-anon .btn-primary:hover { filter: brightness(1.07); }
.cab-anon .btn-ghost {
  background: rgba(255,255,255,0.04);
  color: #fff;
  padding: 12px 22px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* ---------- Empty common ---------- */
.cab-empty-block {
  padding: 36px 22px;
  text-align: center;
  background: rgba(255,255,255,0.025);
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 12px;
}
.cab-empty-block h3 { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 6px; }
.cab-empty-block p { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; }
.cab-empty-block a.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #2d62ff 0%, #4a7cff 100%);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cab-wrap { grid-template-columns: 260px minmax(0, 1fr); gap: 20px; }
  .psn-fields { grid-template-columns: 1fr; }
  .accs-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hero-card { grid-template-columns: 1fr; padding: 28px 22px; gap: 24px; }
  .hero-right { min-width: 0; }
  .earn-value { font-size: 56px; }
  .friends-grid { grid-template-columns: 1fr; }
  .instr-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .cab-wrap { grid-template-columns: 1fr; }
  .cab-side { position: static; top: auto; }
  .ref-stats { grid-template-columns: 1fr; }
  .ref-cashback { grid-template-columns: 1fr; }
  .rv1 { padding: 18px 18px; }
  .rv1-row { grid-template-columns: 60px 1fr auto; gap: 10px; }
  .th-sm { width: 60px; }
  .rv1-foot { flex-direction: column; }
}

/* ===== MOBILE FOUNDATION (B7) ===== */
@media (max-width: 600px) {
  .cab-page { padding: 18px 0 56px; }
  .cab-page .crumbs { margin-bottom: 14px; }

  /* Sidebar stacks above content (already at 860); shrink chrome */
  .cab-side { padding: 18px 16px; border-radius: 12px; }
  .cab-name { font-size: 16px; }
  .cab-id { font-size: 10px; }
  .cab-balance { margin-top: 14px; padding: 12px; }
  .cab-balance-amt { font-size: 24px; }
  .cab-balance-lbl { font-size: 9px; letter-spacing: 0.08em; }
  .cab-nav { margin-top: 14px; }
  .cab-nav a { padding: 9px 10px; font-size: 12.5px; gap: 10px; }
  .cab-nav a svg { width: 15px; height: 15px; }
  .cab-logout-wrap { margin-top: 10px; padding-top: 10px; }

  /* Main column */
  .cab-main > section + section { margin-top: 28px; padding-top: 14px; }
  .tab-h { font-size: 22px; margin-bottom: 14px; }
  .cab-section-head { margin-bottom: 12px; gap: 8px; padding: 0 2px; }
  .cab-section-head h2 { font-size: 16px; }
  .cab-section-head .act,
  .cab-section-head .hint { font-size: 11px; }
  .cab-card { padding: 16px; border-radius: 12px; }
  .cab-main .page-head { margin-bottom: 18px; }
  .cab-main .page-head h1 { font-size: 22px; }
  .cab-main .page-head .subtitle { font-size: 13px; }
  .logout-btn { font-size: 12px; }

  /* Orders V4 carousel: hide overlay arrows (swipe replaces), compact rows */
  .v4-arrow { display: none; }
  .v4-list { gap: 8px; }
  .v4-row { padding: 12px; }
  .v4-row-title { font-size: 13px; }
  .v4-row-price { font-size: 14px; }
  .v4-regions button { padding: 6px 10px; font-size: 11px; }

  /* rv1 right-panel order detail */
  .rv1 { padding: 14px; border-radius: 12px; }
  .rv1-head { gap: 10px; margin-bottom: 12px; }
  .rv1-ord { font-size: 14px; }
  .rv1-date { font-size: 11px; }
  .rv1-total { font-size: 18px; }
  .rv1-row { padding: 8px 10px; }
  .rv1-tile { padding: 12px 14px; gap: 12px; border-radius: 10px; }
  .tile-ic { width: 38px; height: 38px; }
  .tile-ic svg { width: 17px; height: 17px; }
  .tile-title { font-size: 13px; }
  .tile-sub { font-size: 11px; }

  /* Instructions drawer (PS5/PS4/web/app — was 2x2 grid; 1fr already at 900) */
  .instr-drawer { margin-top: 12px; padding: 14px; }
  .instr-drawer .ttl { font-size: 10px; margin-bottom: 12px; }
  .instr-group { padding: 12px 14px; border-radius: 8px; }
  .instr-group .h { font-size: 12px; margin-bottom: 6px; padding-bottom: 6px; }
  .instr-group .h .ico { font-size: 9px; padding: 2px 6px; }
  .instr-group ol { font-size: 11.5px; padding-left: 16px; }

  /* PSN section + reserve codes */
  .psn-toggle button { padding: 9px 12px; font-size: 12.5px; }
  /* iOS auto-zoom triggers below 16px on text inputs */
  .psn-field input { padding: 12px 14px; font-size: 16px; }
  .psn-field label { font-size: 10px; }
  .psn-actions { gap: 10px; margin-top: 12px; }
  .psn-save-btn { padding: 11px 18px; font-size: 12.5px; }
  .psn-save-msg { font-size: 11.5px; }
  .psn-info { padding: 14px 16px; font-size: 12.5px; border-radius: 10px; }

  .rc-toggle { padding: 10px 12px; gap: 10px; margin-top: 12px; }
  .rc-toggle .rc-icon { width: 32px; height: 32px; border-radius: 9px; }
  .rc-toggle .rc-icon svg { width: 16px; height: 16px; }
  .rc-toggle .rc-title { font-size: 13px; }
  .rc-toggle .rc-hint { font-size: 11px; }
  .rc-toggle .rc-count { padding: 2px 7px; font-size: 10px; }
  .rc-list { gap: 6px; }
  .rc-item { padding: 10px 12px; gap: 8px; }
  .rc-item .rc-num { font-size: 12px; }
  .rc-item .rc-code { font-size: 12px; }
  /* iOS no-zoom on focus for reserve code add input */
  .rc-add-row input { padding: 11px 12px; font-size: 16px; }
  .rc-add-btn { padding: 10px 14px; font-size: 12px; }
  .rc-item .rc-btn { width: 30px; height: 30px; }
  .rc-status { padding: 4px 8px; font-size: 10px; }

  /* Referrals tab — hero card */
  .hero-card { padding: 22px 16px; gap: 18px; border-radius: 16px; }
  /* Grid background pattern looks noisy on small screen */
  .hero-card::before { background-size: 22px 22px; opacity: 0.6; }
  .hero-left { gap: 14px; }
  .hero-eyebrow { font-size: 10px; letter-spacing: 0.18em; }
  /* Was 56px at 900; on 360 still wrapped for "1 234 ₽" */
  .earn-value { font-size: 42px; letter-spacing: -0.04em; }
  .earn-value .currency { font-size: 0.55em; margin-left: 8px; }
  .earn-trend { font-size: 11px; padding: 4px 10px; }
  .hero-stats-row { gap: 14px; padding-top: 14px; flex-wrap: wrap; }
  .friends-stat-num { font-size: 26px; }
  .friends-stat-label { font-size: 10px; margin-top: 4px; letter-spacing: 0.04em; }
  .hero-right { min-width: 0; gap: 10px; }
  /* Hero CTA full-width on phones */
  .invite-cta { padding: 14px 18px; font-size: 12px; letter-spacing: 0.06em; width: 100%; }
  .invite-cta svg { width: 13px; height: 13px; }
  .ref-link { padding: 9px 12px; gap: 6px; border-radius: 9px; }
  .ref-link-label { font-size: 9px; letter-spacing: 0.08em; }
  .ref-link-code { font-size: 12px; }
  .ref-link-copy svg { width: 14px; height: 14px; }

  .section-divider { margin: 28px 0 14px; gap: 10px; }
  .section-divider-text { font-size: 9px; letter-spacing: 0.2em; gap: 8px; }
  .section-divider-text .count { font-size: 11px; }

  /* Friends grid (already 1fr at 900) — compact cards */
  .friends-grid { gap: 10px; }
  .friend { padding: 12px 14px; gap: 12px; border-radius: 10px; }
  .friend-avatar { width: 38px; height: 38px; font-size: 14px; }
  .friend-email { font-size: 13px; }
  .friend-meta { font-size: 11px; }
  .friend-earned-amount { font-size: 14px; }
  .friend-earned-label { font-size: 8px; }
  .friend-pending { font-size: 9px; padding: 5px 8px; }

  /* Ref stats (already 1fr at 860) */
  .ref-stat .num { font-size: 22px; }
  .ref-stat .num .currency { font-size: 11px; }
  .ref-stat .lbl { font-size: 10px; }

  /* accs grid is 1fr at 1100; just tighten */
  .accs-active { padding: 12px 14px; }
  .accs-active .meta .name { font-size: 13px; }
  .accs-active .meta .status { font-size: 10px; }
  .accs-btn { padding: 11px 14px; font-size: 13px; }

  /* Empty states */
  .cab-anon { padding: 44px 18px; }
  .cab-anon .ico { width: 56px; height: 56px; margin-bottom: 14px; }
  .cab-anon .ico svg { width: 24px; height: 24px; }
  .cab-anon h2 { font-size: 18px; }
  .cab-anon p { font-size: 13px; margin-bottom: 18px; }
  .cab-anon .actions { gap: 8px; }
  .cab-anon .btn-primary,
  .cab-anon .btn-ghost { padding: 11px 18px; font-size: 13px; }
  .cab-empty-block { padding: 28px 16px; }
  .cab-empty-block h3 { font-size: 15px; }
  .cab-empty-block p { font-size: 12.5px; }
}

@media (max-width: 480px) {
  .tab-h { font-size: 20px; }
  .cab-main .page-head h1 { font-size: 20px; }
  .earn-value { font-size: 36px; }
  .friends-stat-num { font-size: 22px; }
  .ref-stat .num { font-size: 20px; }
}
