/* =====================================================================
   Главная в дизайне behappy.exchange. Всё под .dash-bh — остальные экраны
   не трогает. Тона те же, что на лендинге: серые #f8f9fc…#111827,
   фиолетовый #7c3aed → #a78bfa, зелёная пилюля, карточки радиусом 20.
   ===================================================================== */

.dash-bh {
  --bh-v400: #a78bfa; --bh-v200: #ddd6fe;
  --bh-green-bd: #a7f3d0; --bh-green-tx: #065f46;
  --bh-sh-md: 0 4px 20px rgba(17, 24, 39, .09);
  --bh-sh-violet: 0 8px 32px rgba(124, 58, 237, .28);
}
:root[data-theme="dark"] .dash-bh {
  --bh-v200: #3b2d6b; --bh-green-bd: #1f5a44; --bh-green-tx: #6ee7b7;
  --bh-sh-md: 0 4px 20px rgba(0, 0, 0, .45);
  --bh-sh-violet: 0 8px 32px rgba(167, 139, 250, .25);
}

/* ---- хиро ---- */
.bh-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr minmax(300px, 400px); gap: 40px; align-items: center;
  padding: 44px 44px 40px; margin-bottom: 24px;
  background: linear-gradient(160deg, var(--surface-2) 0%, var(--surface) 60%);
  border: 1px solid var(--border); border-radius: 28px;
}
.bh-hero--single { grid-template-columns: 1fr; }
.bh-hero::before, .bh-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.bh-hero::before { top: -220px; right: -180px; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(139, 92, 246, .10) 0%, transparent 70%); }
.bh-hero::after  { bottom: -140px; left: -120px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(42, 171, 238, .07) 0%, transparent 70%); }
.bh-hero__copy, .bh-hero__visual { position: relative; z-index: 1; }

.bh-hero h1 {
  margin: 14px 0 12px; font-size: clamp(30px, 3.4vw, 46px); font-weight: 900;
  line-height: 1.08; letter-spacing: -.03em; color: var(--text);
}
.bh-grad {
  background: linear-gradient(135deg, var(--brand), var(--bh-v400));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.bh-lead { margin: 0 0 24px; max-width: 460px; font-size: 16px; line-height: 1.7; color: var(--text-dim); }
.bh-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }

/* строка цифр под лидом — как «с 2022 · 1500+ клиентов» */
.bh-stats { display: flex; gap: 20px 24px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--border); }
.bh-stat { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
.bh-stat:hover { text-decoration: none; }
.bh-stat b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--text); }
.bh-stat span { font-size: 12px; color: var(--text-dim); }
.bh-stat:hover b { color: var(--brand); }

/* ---- пилюли, кнопки, подписи ---- */
.bh-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 9999px; font-size: 13px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
}
.bh-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.bh-pill--green { background: var(--ok-soft); border-color: var(--bh-green-bd); color: var(--bh-green-tx); }
.bh-pill--green i { background: var(--ok); box-shadow: 0 0 0 3px rgba(16, 185, 129, .2); }
.bh-pill--red { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

.bh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 9999px; font-size: 14px; font-weight: 600; line-height: 1;
  border: 0; cursor: pointer; text-decoration: none; transition: all .2s var(--ease);
}
.bh-btn:hover { text-decoration: none; }
.bh-btn--primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--bh-sh-violet); }
.bh-btn--primary:hover { background: var(--brand-hi); transform: translateY(-1px); }
.bh-btn--secondary { background: var(--surface-2); color: var(--text); }
.bh-btn--secondary:hover { background: var(--surface-3); }
.bh-btn--ghost { padding: 8px 14px; font-size: 13px; background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.bh-btn--ghost:hover:not(:disabled) { color: var(--text); border-color: var(--border-str); }
.bh-btn:disabled { opacity: .5; cursor: not-allowed; }

.bh-label { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }

/* ---- курс: карточка калькулятора с лендинга ---- */
.bh-rate {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 28px; padding: 28px 30px; box-shadow: var(--bh-sh-md);
}
.bh-rate__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bh-rate__row {
  display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: end;
  padding: 16px 0; border-top: 1px solid var(--border);
}
.bh-rate__cbr { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 6px 0 4px; color: var(--text); }
.bh-rate__cbr small { font-size: 13px; font-weight: 700; margin-left: 8px; letter-spacing: 0; }
.bh-rate__cbr small.up { color: var(--ok); }
.bh-rate__cbr small.down { color: var(--danger); }
.bh-rate__sub { font-size: 12px; color: var(--text-faint); }
.bh-rate__own { text-align: right; }
.bh-rate__input {
  display: flex; align-items: center; margin-top: 6px;
  border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden;
  transition: border-color .15s var(--ease);
}
.bh-rate__input:focus-within { border-color: var(--brand); }
.bh-rate__input input {
  width: 104px; height: 44px; padding: 0 12px; border: 0; background: none; outline: none;
  font-size: 20px; font-weight: 800; text-align: right; color: var(--text);
}
.bh-rate__input input::-webkit-inner-spin-button { -webkit-appearance: none; }
.bh-rate__input button {
  height: 44px; padding: 0 14px; border: 0; border-left: 1.5px solid var(--border);
  background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--text-dim); cursor: pointer;
}
.bh-rate__input button:hover { background: var(--brand-soft); color: var(--brand); }

.bh-float {
  position: absolute; display: flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: 12px; font-size: 12px; font-weight: 600; color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--bh-sh-md);
  animation: bhFloat 5s ease-in-out infinite;
}
.bh-float svg { width: 15px; height: 15px; color: var(--brand); }
.bh-float--tr { top: -14px; right: -12px; }
.bh-float--bl { bottom: -14px; left: -12px; animation-delay: 1.6s; }
@keyframes bhFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.bh-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--ok); vertical-align: middle; }
.bh-dot--bad { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

/* ---- сетка карточек ---- */
.bh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.bh-card--2 { grid-column: span 2; }
@media (max-width: 1100px) { .bh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bh-card--2 { grid-column: span 2; } }
.bh-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px 26px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.bh-card:hover { transform: translateY(-4px); box-shadow: var(--bh-sh-md); border-color: var(--bh-v200); }
.bh-card--wide { grid-column: 1 / -1; }
.bh-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bh-card__head h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.bh-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.bh-icon svg { width: 19px; height: 19px; }
.bh-more { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.bh-bignum {
  position: absolute; right: 22px; bottom: 14px; font-size: 56px; font-weight: 900;
  letter-spacing: -.04em; line-height: 1; color: var(--brand); opacity: .10; pointer-events: none;
}

.bh-metric { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bh-metric b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--text); }
.bh-metric span { font-size: 13px; color: var(--text-dim); }
.bh-sub { margin: 6px 0 0; font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.bh-hint { margin: 8px 0 0; font-size: 12px; color: var(--text-faint); }
.bh-mix { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--text-dim); }
.bh-mix b { font-size: 14px; color: var(--text); margin-right: 4px; }

.bh-list { display: flex; flex-direction: column; }
.bh-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 9px 0; border-top: 1px solid var(--border); font-size: 13.5px; color: inherit; text-decoration: none;
}
.bh-row:first-child { border-top: 0; }
a.bh-row:hover { color: var(--brand); text-decoration: none; }
.bh-row b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-row em { font-style: normal; color: var(--text-faint); font-size: 12px; }
.bh-row .down { color: var(--danger); font-weight: 600; }
.bh-list--3 .bh-row { grid-template-columns: 1fr minmax(80px, auto) minmax(90px, auto); }
.bh-chip { padding: 2px 9px; border-radius: 9999px; background: var(--surface-2); font-size: 11.5px; font-weight: 600; color: var(--text-dim); white-space: nowrap; }

.bh-notes { display: grid; gap: 8px; padding: 14px 18px; }
.bh-note { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; font-weight: 500; }
.bh-note svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.bh-note--info { color: var(--brand); }
.bh-note--warn { color: var(--warn); }

.bh-embed { width: 100%; height: 620px; border: 0; border-radius: 14px; background: var(--surface-2); }
.bh-empty { text-align: center; padding: 44px 20px; }
.bh-empty h3 { margin: 0 0 6px; font-size: 16px; }
.bh-empty p { margin: 0 0 16px; color: var(--text-dim); }


@media (max-width: 900px) {
  .bh-hero { grid-template-columns: 1fr; padding: 28px 22px 24px; border-radius: 20px; }
  .bh-float { display: none; }
}
@media (max-width: 640px) { .bh-grid { grid-template-columns: 1fr; } .bh-rate { padding: 22px; } }
@media (prefers-reduced-motion: reduce) { .bh-float { animation: none; } .bh-card:hover { transform: none; } }
