:root {
  --bg: #f3f1ec;
  --panel: #ffffff;
  --ink: #1c1a17;
  --muted: #6b6560;
  --line: #ddd6cc;
  --accent: #2787f5;
  --accent-ink: #0b3d75;
  --ok: #1f7a4c;
  --err: #b42318;
  --warn: #9a6700;
  --sidebar: #151a22;
  --sidebar-ink: #d7dde7;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(28, 26, 23, 0.06);
  font-family: Inter, "Segoe UI", "IBM Plex Sans", sans-serif;
}

* { box-sizing: border-box; }

/* Guest auth (login / register) — Чёрный СММ */
.bh-guest-body {
  margin: 0;
  min-height: 100vh;
  font-family: Manrope, "Segoe UI", sans-serif;
  color: #12151c;
  background: #eef2f7;
}
.bh-guest {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.15rem 3.75rem;
  overflow: hidden;
}
.bh-guest__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
  z-index: 0;
}
.bh-guest__glow--a {
  width: min(52vw, 520px);
  height: min(52vw, 520px);
  left: -8%;
  top: -12%;
  background: rgba(39, 135, 245, 0.28);
  animation: bh-guest-drift 14s ease-in-out infinite alternate;
}
.bh-guest__glow--b {
  width: min(46vw, 460px);
  height: min(46vw, 460px);
  right: -10%;
  bottom: -16%;
  background: rgba(238, 31, 0, 0.14);
  animation: bh-guest-drift 18s ease-in-out infinite alternate-reverse;
}
.bh-guest__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}
@keyframes bh-guest-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(3%, 4%, 0) scale(1.06); }
}
.bh-guest__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 1.85rem 1.7rem 1.6rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 50px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: bh-guest-rise 0.55s ease both;
}
@keyframes bh-guest-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.bh-guest__brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.85rem;
}
.bh-guest__brand--logo-only {
  justify-content: center;
  margin-bottom: 1.35rem;
}
.bh-guest__logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 16px;
  background: #0f1218;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  flex: 0 0 auto;
}
.bh-guest__logo--hero {
  width: min(100%, 300px);
  height: auto;
  aspect-ratio: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.bh-guest__eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2787f5;
}
.bh-guest__title {
  margin: 0;
  font-size: clamp(1.45rem, 3.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0f172a;
}
.bh-guest__lead {
  margin: 0 0 1.35rem;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 550;
}
.bh-guest__form {
  display: grid;
  gap: 0.85rem;
}
.bh-guest__field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}
.bh-guest__input {
  width: 100%;
  border: 1px solid #d7dee8;
  border-radius: 12px;
  padding: 0.78rem 0.9rem;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bh-guest__input::placeholder { color: #94a3b8; font-weight: 500; }
.bh-guest__input:focus {
  outline: none;
  border-color: #2787f5;
  box-shadow: 0 0 0 4px rgba(39, 135, 245, 0.15);
}
.bh-guest__submit {
  margin-top: 0.25rem;
  border: 0;
  border-radius: 12px;
  padding: 0.88rem 1rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #3b94f7 0%, #2787f5 55%, #1f74d8 100%);
  box-shadow: 0 10px 22px rgba(39, 135, 245, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.bh-guest__submit:hover { filter: brightness(1.03); transform: translateY(-1px); }
.bh-guest__submit:active { transform: translateY(0); }
.bh-guest__vk-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 0;
  background: #0077ff;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(0, 119, 255, 0.22);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.bh-guest__vk-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  color: #fff;
}
.bh-guest__vk-btn:active { transform: translateY(0); }
.bh-guest__vk-btn-icon { flex: 0 0 auto; }
.bh-guest__onetap {
  width: 100%;
  min-height: 48px;
}
.bh-guest__onetap #bh-vkid-onetap-mount {
  width: 100%;
  display: flex;
  justify-content: center;
}
.bh-guest__onetap #bh-vkid-onetap-mount > * {
  width: 100% !important;
  max-width: 100%;
}
.bh-guest__onetap-status {
  margin: 0.55rem 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
  text-align: center;
}
.bh-guest__onetap-status.is-error {
  color: #b91c1c;
}
.bh-guest__vk-fallback {
  margin: 0.7rem 0 0;
  text-align: center;
}
.bh-guest__vk-link {
  font-size: 0.86rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bh-guest__vk-link:hover { color: #0f172a; }
.bh-guest__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0.85rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bh-guest__divider::before,
.bh-guest__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.bh-guest__vk-hint {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.86rem;
  line-height: 1.4;
}
.bh-guest__vk-setup {
  margin: 0.65rem 0 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 0.82rem;
  line-height: 1.45;
}
.bh-guest__vk-setup.is-open { display: block; }
.bh-guest__vk-setup summary {
  cursor: pointer;
  font-weight: 700;
  color: #334155;
}
.bh-guest__vk-setup ul {
  margin: 0.45rem 0 0.35rem;
  padding-left: 1.1rem;
}
.bh-guest__vk-setup code {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
  background: #eef2ff;
  color: #1e3a8a;
  font-size: 0.78rem;
  word-break: break-all;
}
.bh-guest__vk-setup a { color: #2563eb; font-weight: 700; }
.bh-guest__alt {
  margin: 1.15rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
}
.bh-guest__alt a {
  color: #2787f5;
  font-weight: 800;
  text-decoration: none;
}
.bh-guest__alt a:hover { text-decoration: underline; }
.bh-guest__foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.25rem;
  z-index: 1;
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 650;
  color: #94a3b8;
  letter-spacing: 0.01em;
}
.bh-guest__panel .alert { margin-bottom: 1rem; }
@media (max-width: 520px) {
  .bh-guest__panel { padding: 1.45rem 1.2rem 1.35rem; border-radius: 18px; }
  .bh-guest__logo { width: 56px; height: 56px; border-radius: 14px; }
  .bh-guest__logo--hero { width: min(100%, 260px); height: auto; }
}

/* Bottom toasts — do not shift page content. Module: bh_toasts + BhToast. */
.bh-toasts {
  position: fixed;
  z-index: 12000;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  width: min(440px, calc(100vw - 2rem));
  pointer-events: none;
}
.bh-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.8rem 0.75rem 0.8rem 0.85rem;
  border-radius: 12px;
  border: 1px solid;
  box-shadow: 0 12px 32px rgba(28, 26, 23, 0.14);
  background: #fff;
  animation: bh-toast-in 0.28s ease;
}
.bh-toast.is-out {
  animation: bh-toast-out 0.2s ease forwards;
}
.bh-toast__ico {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin-top: 0.05rem;
}
.bh-toast__msg {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  padding-top: 0.15rem;
}
.bh-toast__close {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.55;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.bh-toast__close:hover { opacity: 1; background: rgba(0, 0, 0, 0.05); }
.bh-toast--success { background: #e8f7ee; border-color: #b7e0c5; color: var(--ok); }
.bh-toast--success .bh-toast__ico { background: rgba(31, 122, 76, 0.12); }
.bh-toast--error { background: #fdeceb; border-color: #f3c0bb; color: var(--err); }
.bh-toast--error .bh-toast__ico { background: rgba(180, 35, 24, 0.1); }
.bh-toast--info { background: #eaf3ff; border-color: #c5dbf8; color: var(--accent-ink); }
.bh-toast--info .bh-toast__ico { background: rgba(39, 135, 245, 0.12); }
.bh-toast--warning { background: #fff6e5; border-color: #ecd59a; color: var(--warn); }
.bh-toast--warning .bh-toast__ico { background: rgba(154, 103, 0, 0.1); }
@keyframes bh-toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bh-toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #ece7df;
}
.badge-queued, .badge-sending { background: #dcecff; color: var(--accent-ink); }
.badge-done { background: #d9f0e3; color: var(--ok); }
.badge-cancelled, .badge-failed { background: #fde2df; color: var(--err); }
.badge-draft { background: #f4efe6; color: var(--muted); }

.toolbar { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }

