/* ── B9-style side drawer (BP999 blue theme) ── */

.side-drawer--b9 {
  width: min(100%, var(--app-w));
  max-width: 100%;
  padding: 0;
  background: rgba(4, 10, 22, 0.98);
  border-right: 1px solid rgba(96, 165, 250, 0.12);
  box-shadow: 8px 0 48px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}

.drawer-b9-head {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(96, 165, 250, 0.12);
  background:
    radial-gradient(ellipse 80% 120% at 50% -20%, rgba(56, 189, 248, 0.12), transparent 60%),
    rgba(8, 14, 28, 0.98);
}

.drawer-b9-head-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.drawer-b9-head-btn:hover {
  border-color: rgba(96, 165, 250, 0.4);
  color: var(--accent-cyan);
  background: rgba(30, 58, 138, 0.35);
}

.drawer-b9-head-btn--home {
  justify-self: end;
}

.drawer-b9-head-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-decoration: none;
}

.drawer-b9-logo {
  height: 40px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 14px rgba(56, 189, 248, 0.35));
}

.drawer-b9-scroll {
  flex: 1;
  min-height: 0;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 14px calc(24px + var(--safe-b));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.drawer-b9-scroll::-webkit-scrollbar {
  display: none;
}

.drawer-b9-cats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.drawer-b9-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(10, 18, 35, 0.98));
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.drawer-b9-cat:active {
  transform: scale(0.99);
}

.drawer-b9-cat:hover {
  border-color: rgba(96, 165, 250, 0.32);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.35), rgba(15, 23, 42, 0.98));
}

.drawer-b9-cat-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-b9-cat-icon svg {
  width: 40px;
  height: 40px;
}

.drawer-b9-cat-label {
  flex: 1;
  min-width: 0;
}

.drawer-b9-cat-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(248, 250, 252, 0.55);
}

.drawer-b9-cat-arrow svg {
  width: 14px;
  height: 14px;
}

.drawer-b9-card {
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(8, 14, 28, 0.98));
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.drawer-b9-link {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.drawer-b9-link:last-child {
  border-bottom: none;
}

.drawer-b9-link:hover {
  background: rgba(59, 130, 246, 0.08);
}

.drawer-b9-link--referral {
  color: #fbbf24;
}

.drawer-b9-link--logout {
  color: #f87171;
  border-top: 1px solid rgba(248, 113, 113, 0.15);
}

.drawer-b9-link--logout:hover {
  background: rgba(248, 113, 113, 0.1);
}

.drawer-b9-link-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(248, 250, 252, 0.88);
}

.drawer-b9-link-icon svg {
  width: 20px;
  height: 20px;
}

.drawer-b9-link-icon--wa {
  color: #22c55e;
}

.drawer-b9-link-icon--yt {
  color: #ef4444;
}

.drawer-b9-link-icon--ig {
  color: #f472b6;
}

.drawer-b9-app {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 14px 16px;
  margin-bottom: 12px;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  background:
    radial-gradient(ellipse 80% 100% at 0% 50%, rgba(56, 189, 248, 0.12), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 14, 28, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.drawer-b9-app-text {
  flex: 1;
  min-width: 0;
}

.drawer-b9-app-title {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.drawer-b9-app-sub {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.35;
}

.drawer-b9-app-art {
  flex-shrink: 0;
  position: relative;
  width: 72px;
  height: 64px;
}

.drawer-b9-app-phone {
  position: absolute;
  left: 0;
  top: 4px;
  width: 38px;
  height: 56px;
  border-radius: 8px;
  border: 2px solid rgba(96, 165, 250, 0.35);
  background: linear-gradient(180deg, #1e3a8a, #0f172a);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.drawer-b9-app-phone::after {
  content: "";
  position: absolute;
  inset: 6px 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.25), rgba(29, 78, 216, 0.15));
}

.drawer-b9-app-mascot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-brand);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.4);
}

.drawer-b9-app-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: var(--gradient-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.45);
  transition: transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.drawer-b9-app-btn:hover {
  transform: scale(1.04);
}

.drawer-b9-app-btn svg {
  width: 22px;
  height: 22px;
}

.drawer-b9-lang {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(10, 18, 35, 0.98));
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.drawer-b9-lang:hover {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(30, 58, 138, 0.2);
}

.drawer-b9-lang-flag {
  font-size: 20px;
  line-height: 1;
}

.drawer-b9-lang-label {
  flex: 1;
}

.drawer-b9-lang-arrow {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(248, 250, 252, 0.55);
}

.drawer-b9-lang-arrow svg {
  width: 14px;
  height: 14px;
}

.icon-btn--menu {
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(10, 18, 35, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 2px 8px rgba(0, 0, 0, 0.25);
}

.icon-btn--menu:hover {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(30, 58, 138, 0.25);
  color: var(--accent-cyan);
}

.icon-btn--back {
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(10, 18, 35, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 2px 8px rgba(0, 0, 0, 0.25);
}

.icon-btn--back:hover {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(30, 58, 138, 0.25);
  color: var(--accent-cyan);
}
