:root {
  --ui-radius: 5px;
  --header-bg: #ffffff;
  --header-border: rgba(226, 232, 240, 0.9);
  --header-text: #0f172a;
  --header-muted: #334155;
  --header-h: 64px;
}

/* Cards */
.card,
.panel,
.stat-card,
.post-card,
.story-row,
.tip-card,
.supporters-card,
.pm-banner,
.fundme-card,
.fundme-sidebar,
.fundme-main,
.desc-red-box,
.featured-green-box,
.product-card,
.shop-card,
.wallet-card,
.tx-item,
.notif-card,
.modal-content,
.wallet-popup-card,
.tip-popup-card,
.tip-detail-sheet,
.full-image-stage,
.action-dropdown-menu {
  border-radius: var(--ui-radius) !important;
}

/* Modal wrappers/sheets */
.modal,
.modal-overlay,
.tip-detail-modal,
.tip-popup,
.wallet-popup,
.notif-detail-modal,
.full-image-modal {
  border-radius: 0 !important;
}

/* Images inside cards (keep corners consistent) */
.post-media,
.post-media img,
.story-thumb,
.story-thumb img,
.image-wrapper,
.image-wrapper img,
.article-image,
.desc-inline-img {
  border-radius: var(--ui-radius) !important;
}

/* Buttons/input fields that are styled as cards */
.btn,
.btn-primary,
.btn-outline,
.btn-close,
.form-control,
input,
textarea,
select {
  border-radius: var(--ui-radius) !important;
}

.bb-navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
}
.bb-navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.bb-navbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 110px;
}
.bb-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(226, 232, 240, 1);
  border-radius: var(--ui-radius);
  color: var(--header-text);
  text-decoration: none;
  font-weight: 900;
  font-size: 0.85rem;
  background: #fff;
}
.bb-navbar-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: var(--header-text);
}
.bb-navbar-logo img {
  height: 34px;
  width: auto;
  display: block;
}
.bb-navbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 110px;
  justify-content: flex-end;
}

.bb-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(226, 232, 240, 1);
  border-radius: var(--ui-radius);
  background: #fff;
  color: var(--header-muted);
  font-weight: 900;
  font-size: 0.8rem;
  user-select: none;
}
.bb-switch {
  position: relative;
  width: 34px;
  height: 18px;
  display: inline-block;
}
.bb-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.bb-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  transition: 0.2s;
}
.bb-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 999px;
  transition: 0.2s;
}
.bb-switch input:checked + .bb-slider {
  background: rgba(15, 118, 110, 0.85);
}
.bb-switch input:checked + .bb-slider:before {
  transform: translateX(16px);
}

.bb-hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--ui-radius);
  border: 1px solid rgba(226, 232, 240, 1);
  color: var(--header-text);
  background: #fff;
  cursor: pointer;
}
.bb-mobile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 14px;
  left: 14px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 1);
  border-radius: var(--ui-radius);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  padding: 8px;
  z-index: 1000;
}
.bb-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--ui-radius);
  text-decoration: none;
  color: var(--header-text);
  font-weight: 900;
}
.bb-mobile-menu a:hover { background: rgba(15, 23, 42, 0.06); }
.bb-mobile-menu.show { display: block; }
.bb-nav {
  display: none;
  align-items: center;
  gap: 18px;
}
.bb-nav a {
  text-decoration: none;
  color: var(--header-muted);
  font-weight: 900;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--ui-radius);
}
.bb-nav a.active,
.bb-nav a:hover {
  color: var(--header-text);
  background: rgba(15, 23, 42, 0.06);
}
.bb-add-post {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--ui-radius);
  background: #0f766e;
  border: 1px solid #0f766e;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  font-size: 0.9rem;
  gap: 8px;
  white-space: nowrap;
}
.bb-bell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--ui-radius);
  border: 1px solid rgba(226, 232, 240, 1);
  color: var(--header-text);
  background: #fff;
  position: relative;
  text-decoration: none;
}
.bb-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid #fff;
}
@media (min-width: 1024px) {
  .bb-nav { display: flex; }
  .bb-hamburger { display: none; }
  .bb-mobile-menu { display: none !important; }
}
