/* ============================================
   BarryBalto — Professional UI Design System
   Clean, Modern, Animal-Themed Social Platform
   ============================================ */

/* ---- Google Fonts + Design Tokens ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Primary */
  --bb-primary: #F97316;
  --bb-primary-hover: #EA580C;
  --bb-primary-light: #FFF7ED;
  --bb-primary-50: #FFF7ED;
  --bb-primary-100: #FFEDD5;
  --bb-primary-200: #FED7AA;
  --bb-primary-500: #F97316;
  --bb-primary-600: #EA580C;
  --bb-primary-700: #C2410C;

  /* Neutral / Slate */
  --bb-bg: #F9FAFB;
  --bb-bg-alt: #F3F4F6;
  --bb-white: #FFFFFF;
  --bb-gray-50: #F9FAFB;
  --bb-gray-100: #F3F4F6;
  --bb-gray-200: #E5E7EB;
  --bb-gray-300: #D1D5DB;
  --bb-gray-400: #9CA3AF;
  --bb-gray-500: #6B7280;
  --bb-gray-600: #4B5563;
  --bb-gray-700: #374151;
  --bb-gray-800: #1F2937;
  --bb-gray-900: #111827;

  /* Semantic */
  --bb-danger: #EF4444;
  --bb-danger-light: #FEF2F2;
  --bb-success: #22C55E;
  --bb-success-light: #F0FDF4;
  --bb-info: #3B82F6;
  --bb-info-light: #EFF6FF;
  --bb-warning: #F59E0B;
  --bb-warning-light: #FFFBEB;

  /* Shadows — Soft & Wide */
  --bb-shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --bb-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --bb-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --bb-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.06), 0 4px 6px -2px rgba(0,0,0,0.03);
  --bb-shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);

  /* Radius */
  --bb-radius-sm: 6px;
  --bb-radius-md: 8px;
  --bb-radius-lg: 12px;
  --bb-radius-xl: 16px;
  --bb-radius-full: 9999px;

  /* Font */
  --bb-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --bb-sidebar-w: 240px;
  --bb-sidebar-collapsed: 72px;
  --bb-max-feed: 700px;
  --bb-max-content: 1200px;

  /* Transition */
  --bb-fast: 150ms ease;
  --bb-normal: 250ms ease;
}

/* ---- Reset ---- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
body {
  font-family: var(--bb-font);
  color: var(--bb-gray-800);
  background: var(--bb-bg);
  line-height: 1.6;
  min-height: 100vh;
}
a { text-decoration:none; color:inherit; transition: color var(--bb-fast); }
a:hover { color: var(--bb-primary); }
img { max-width:100%; display:block; }
button { cursor:pointer; border:none; background:none; font-family:inherit; font-size:inherit; }
input,textarea,select { font-family:inherit; font-size:inherit; border:none; outline:none; }
ul,ol { list-style:none; }

/* Scrollbar */
::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--bb-gray-300); border-radius:var(--bb-radius-full); }
::-webkit-scrollbar-thumb:hover { background:var(--bb-gray-400); }

/* ---- Typography ---- */
.text-xs   { font-size:0.75rem; }
.text-sm   { font-size:0.875rem; }
.text-base { font-size:1rem; }
.text-lg   { font-size:1.125rem; }
.text-xl   { font-size:1.25rem; }
.text-2xl  { font-size:1.5rem; }
.text-3xl  { font-size:1.875rem; }

.font-medium   { font-weight:500; }
.font-semibold { font-weight:600; }
.font-bold     { font-weight:700; }
.font-extrabold { font-weight:800; }

.text-primary { color:var(--bb-primary); }
.text-muted   { color:var(--bb-gray-500); }
.text-danger  { color:var(--bb-danger); }
.text-center  { text-align:center; }
.truncate { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---- Layout System ---- */
.bb-layout { display:flex; min-height:100vh; }

.bb-sidebar {
  width: var(--bb-sidebar-w);
  background: var(--bb-white);
  border-right: 1px solid var(--bb-gray-200);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 24px 12px;
  transition: width var(--bb-normal);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.bb-main {
  flex: 1;
  margin-left: var(--bb-sidebar-w);
  min-height: 100vh;
  padding-left: 32px;
}

.bb-container {
  max-width: var(--bb-max-content);
  margin: 0 auto;
  padding: 32px 24px;
}

.bb-container-wide {
  max-width: var(--bb-max-content);
  margin: 0 auto;
  padding: 32px 24px;
}

/* ---- Logo ---- */
.bb-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 28px;
  border-radius: var(--bb-radius-md);
  transition: background var(--bb-fast);
}
.bb-logo:hover { background: var(--bb-gray-50); color:inherit; }

.bb-logo-icon {
  width: 36px; height: 36px;
  background: var(--bb-primary);
  border-radius: var(--bb-radius-md);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
}

.bb-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--bb-gray-900);
  letter-spacing: -0.02em;
}

/* ---- Sidebar Nav ---- */
.bb-nav { display:flex; flex-direction:column; gap:2px; width:100%; }

.bb-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--bb-radius-md);
  color: var(--bb-gray-600);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--bb-fast);
  position: relative;
  white-space: nowrap;
}
.bb-nav-item:hover {
  background: var(--bb-gray-50);
  color: var(--bb-gray-900);
}
.bb-nav-item.active {
  background: var(--bb-primary-light);
  color: var(--bb-primary);
  font-weight: 600;
}
.bb-nav-item .nav-icon {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.bb-nav-item .nav-icon i { font-size: 18px; }

.bb-nav-badge {
  position: absolute;
  top: 4px; left: 28px;
  min-width: 18px; height: 18px;
  background: var(--bb-danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--bb-radius-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  border: 2px solid white;
}

/* Sidebar User */
.bb-sidebar-spacer { flex:1; }
.bb-sidebar-user {
  border-top: 1px solid var(--bb-gray-200);
  padding-top: 12px;
  margin-top: 12px;
}
.bb-sidebar-user-link {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  border-radius: var(--bb-radius-md);
  transition: background var(--bb-fast);
}
.bb-sidebar-user-link:hover { background: var(--bb-gray-50); color:inherit; }
.bb-sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bb-gray-800);
}
.bb-logout-btn:hover { color: var(--bb-danger) !important; }

/* ---- Guest Sidebar (same layout, locked actions) ---- */
.bb-layout-guest {
    /* Sidebar is fixed, so the layout wrapper should not take vertical space */
    display: contents;
}
.bb-layout-guest .bb-sidebar {
    background: var(--bb-white);
    /* Same width and position as the logged-in sidebar */
}
.bb-sidebar-guest .bb-nav-item {
    /* Slightly muted to indicate locked state, but still inviting */
    color: var(--bb-gray-700);
    position: relative;
}
.bb-sidebar-guest .bb-nav-item::after {
    /* Subtle lock indicator on hover */
    content: "\f023"; /* fa-lock */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--bb-gray-400);
    opacity: 0;
    transition: opacity 0.15s;
}
.bb-sidebar-guest .bb-nav-item:hover {
    background: var(--bb-gray-50);
    color: var(--bb-gray-900);
}
.bb-sidebar-guest .bb-nav-item:hover::after {
    opacity: 1;
}
.bb-sidebar-guest .bb-nav-item.active {
    color: var(--bb-primary);
    background: var(--bb-primary-light, #FFF7ED);
}
.bb-sidebar-guest .bb-nav-item.active::after {
    opacity: 0;
}
.bb-sidebar-guest-cta {
    border-top: 1px solid var(--bb-gray-200);
    padding: 14px 12px 12px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: linear-gradient(180deg, var(--bb-primary-light, #FFF7ED) 0%, transparent 100%);
    border-radius: 0 0 12px 12px;
}
.bb-sidebar-guest-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--bb-primary), #FB923C);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 16px;
    margin-bottom: 10px;
}
.bb-sidebar-guest-text {
    margin-bottom: 12px;
    line-height: 1.4;
}
.bb-sidebar-guest-text strong {
    display: block;
    font-size: 0.9rem;
    color: var(--bb-gray-900);
    margin-bottom: 2px;
}
.bb-sidebar-guest-text span {
    display: block;
    font-size: 0.78rem;
    color: var(--bb-gray-500);
}

/* Guest mobile bottom-bar / top-bar tweaks */
.bb-top-bar-btn-primary {
    background: var(--bb-primary) !important;
    color: white !important;
    border-radius: 8px !important;
    width: auto !important;
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 0.78rem !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.bb-top-bar-btn-primary:hover { background: var(--bb-primary-hover, #EA580C) !important; }

/* On mobile, the guest sidebar is hidden; show only the top bar */
@media (max-width: 768px) {
    .bb-sidebar-guest { display: none; }
}

/* ---- Top Bar (Mobile only, hidden on desktop) ---- */
.bb-top-bar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bb-white);
  border-bottom: 1px solid var(--bb-gray-200);
  z-index: 200;
  align-items: center;
  padding: 0 16px;
  justify-content: space-between;
  box-shadow: var(--bb-shadow-xs);
  gap: 12px;
}
.bb-top-bar-back {
  width: 36px; height: 36px;
  border-radius: 0;
  background: transparent;
  border: none;
  color: var(--bb-dark);
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}
.bb-top-bar-back:hover { opacity: 0.65; }
.bb-top-bar-back:active { opacity: 0.4; }
.bb-top-bar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bb-top-bar-logo-icon {
  width: 32px; height: 32px;
  background: var(--bb-primary);
  border-radius: var(--bb-radius-md);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 14px;
}
.bb-top-bar-logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--bb-gray-900);
  letter-spacing: -0.02em;
}
.bb-top-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bb-top-bar-btn {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--bb-gray-600);
  font-size: 1.2rem;
  transition: background var(--bb-fast), color var(--bb-fast);
}
.bb-top-bar-btn:hover {
  background: var(--bb-gray-100);
  color: var(--bb-gray-900);
}
.bb-top-bar-btn .bb-nav-badge {
  position: absolute;
  top: 2px; left: 22px;
}

.bb-nav-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ---- Buttons ---- */
.bb-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:9px 18px; border-radius:var(--bb-radius-md);
  font-size:0.85rem; font-weight:600;
  cursor:pointer; border:1px solid transparent;
  transition:all var(--bb-fast);
  white-space:nowrap;
  outline:none;
  flex-shrink: 0;
  line-height: 1.4;
}
.bb-btn-primary {
  background: var(--bb-primary);
  color: white;
}
.bb-btn-primary:hover {
  background: var(--bb-primary-hover);
  color: white;
  box-shadow: var(--bb-shadow-md);
}
.bb-btn-secondary {
  background: var(--bb-gray-100);
  color: var(--bb-gray-800);
  border: 1px solid var(--bb-gray-200);
}
.bb-btn-secondary:hover {
  background: var(--bb-gray-200);
  color: var(--bb-gray-900);
}
.bb-btn-outline {
  border: 1.5px solid var(--bb-gray-300);
  color: var(--bb-gray-700);
  background: white;
}
.bb-btn-outline:hover {
  border-color: var(--bb-primary);
  color: var(--bb-primary);
}
.bb-btn-ghost {
  color: var(--bb-gray-600);
}
.bb-btn-ghost:hover {
  background: var(--bb-gray-100);
  color: var(--bb-gray-900);
}
.bb-btn-danger {
  background: var(--bb-danger);
  color: white;
}
.bb-btn-danger:hover { background:#DC2626; color:white; }
.bb-btn-sm { padding:5px 12px; font-size:0.8rem; }
.bb-btn-lg { padding:12px 24px; font-size:0.95rem; }
.bb-btn-icon {
  width:36px; height:36px; padding:0;
  border-radius:var(--bb-radius-md);
}
.bb-btn-follow {
  min-width: 110px;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}
/* Follow State — Orange primary */
.bb-btn-follow:not(.following):not(.pending) {
  background: var(--bb-primary);
  color: white;
  border: 1.5px solid var(--bb-primary);
}
.bb-btn-follow:not(.following):not(.pending):hover {
  background: var(--bb-primary-hover);
  border-color: var(--bb-primary-hover);
  color: white;
  box-shadow: 0 2px 8px rgba(249,115,22,0.3);
}
/* Following State — Outlined orange */
.bb-btn-follow.following {
  background: transparent;
  color: #374151;
  border: 1.5px solid var(--bb-primary);
}
.bb-btn-follow.following i {
  color: var(--bb-primary);
  transition: all 0.3s ease-in-out;
}
.bb-btn-follow.following:hover {
  background: rgba(239,68,68,0.05);
  border-color: var(--bb-danger);
  color: var(--bb-danger);
}
.bb-btn-follow.following:hover i {
  color: var(--bb-danger);
}
/* Unfollow reveal on hover — data attribute driven */
.bb-btn-follow.following .follow-label { display: inline; }
.bb-btn-follow.following .unfollow-label { display: none; }
.bb-btn-follow.following:hover .follow-label { display: none; }
.bb-btn-follow.following:hover .unfollow-label { display: inline; }

/* Pending State */
.bb-btn-follow.pending {
  background: transparent;
  color: var(--bb-gray-500);
  border: 1.5px solid var(--bb-gray-300);
  opacity: 0.85;
  cursor: default;
}
.bb-btn-follow.pending i {
  color: var(--bb-warning);
}

/* Click feedback — scale press */
.bb-btn-follow:active:not(.pending) {
  transform: scale(0.95);
}
.bb-btn-follow:active:not(.pending) {
  transition-duration: 0.1s;
}

/* Pop animation on state change */
@keyframes bbFollowPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.bb-btn-follow.pop {
  animation: bbFollowPop 0.35s ease-in-out;
}

/* ---- Avatar ---- */
.bb-avatar,
img.bb-avatar,
a > img.bb-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  aspect-ratio: 1 / 1 !important;
  background: var(--bb-gray-200);
  flex-shrink: 0 !important;
  display: block;
}

.bb-avatar-sm,
img.bb-avatar-sm,
a > img.bb-avatar-sm {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
  display: block;
}

.bb-avatar-md,
img.bb-avatar-md,
a > img.bb-avatar-md {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
  display: block;
}

.bb-avatar-lg,
img.bb-avatar-lg,
a > img.bb-avatar-lg {
  width: 72px !important;
  height: 72px !important;
  min-width: 72px !important;
  min-height: 72px !important;
  max-width: 72px !important;
  max-height: 72px !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
  display: block;
}

.bb-avatar-xl,
img.bb-avatar-xl,
a > img.bb-avatar-xl {
  width: 110px !important;
  height: 110px !important;
  min-width: 110px !important;
  min-height: 110px !important;
  max-width: 110px !important;
  max-height: 110px !important;
  border-radius: 50% !important;
  border: 3px solid var(--bb-white);
  box-shadow: var(--bb-shadow-md);
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
  display: block;
}

a:has(> .bb-avatar),
.bb-post-header a,
.bb-comment a,
.bb-suggestion-item a {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.bb-avatar-ring {
  padding:2px;
  background: var(--bb-primary);
  border-radius: var(--bb-radius-full);
  display: inline-block;
  line-height: 0;
}
.bb-avatar-ring .bb-avatar { border:2px solid white; }

.bb-avatar-story {
  padding:2px;
  background: linear-gradient(135deg, #F97316, #F59E0B, #22C55E);
  border-radius: var(--bb-radius-full);
  display: inline-block;
  cursor: pointer;
  transition: transform var(--bb-fast);
  line-height: 0;
}
.bb-avatar-story:hover { transform:scale(1.05); }
.bb-avatar-story .bb-avatar { border:2px solid white; }
.bb-avatar-story.seen { background: var(--bb-gray-300); }

/* ---- Card ---- */
.bb-card {
  background: var(--bb-white);
  border-radius: var(--bb-radius-lg);
  box-shadow: var(--bb-shadow-sm);
  border: 1px solid var(--bb-gray-200);
  overflow: hidden;
  transition: box-shadow var(--bb-fast);
}
.bb-card:hover { box-shadow: var(--bb-shadow-md); }

/* ---- Post Card ---- */
.bb-post {
  background: var(--bb-white);
  border-radius: var(--bb-radius-lg);
  box-shadow: var(--bb-shadow-sm);
  border: 1px solid var(--bb-gray-100);
  margin-bottom: 22px;
  overflow: hidden;
}

.bb-post-header {
  display: flex; align-items: center;
  padding: 14px 18px;
  gap: 12px;
}
.bb-post-header-info { flex:1; }

.bb-post-username {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--bb-gray-900);
}
.bb-post-username:hover { color: var(--bb-primary); }

.bb-post-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem;
  color: var(--bb-gray-500);
}

.bb-post-animal-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px;
  background: var(--bb-primary-50);
  color: var(--bb-primary);
  border-radius: var(--bb-radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.bb-feed-suggested {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--bb-gray-500);
  font-size: 0.7rem;
  font-weight: 600;
}
.bb-feed-suggested i { color: var(--bb-primary); }

.bb-post-image {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: var(--bb-gray-100);
  cursor: pointer;
}
.bb-post-image.portrait { aspect-ratio: 4/5; }

.bb-post-image-container { position:relative; overflow:hidden; }

.bb-post-actions {
  display: flex; align-items: center;
  padding: 6px 14px;
  gap: 0;
}
.bb-post-action-btn {
  width:40px; height:40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--bb-radius-md);
  font-size: 19px;
  color: var(--bb-gray-700);
  transition: all var(--bb-fast);
}
.bb-post-action-btn:hover {
  background: var(--bb-gray-100);
  color: var(--bb-gray-900);
}
.bb-post-action-btn.liked { color: var(--bb-danger); }
.bb-post-action-btn.liked i { font-weight: 900; }
.bb-post-action-btn.saved { color: var(--bb-gray-900); }
.bb-post-action-spacer { flex:1; }

.bb-post-likes {
  padding: 0 18px 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--bb-gray-900);
}

.bb-post-caption {
  padding: 4px 18px 10px;
  font-size: 0.925rem;
  line-height: 1.5;
  color: var(--bb-gray-800);
}
.bb-post-caption .username { font-weight:600; color:var(--bb-gray-900); margin-right:6px; }
.bb-post-caption .hashtag { color:var(--bb-info); font-weight:500; }
.bb-mention-link { color: var(--bb-primary); font-weight: 600; text-decoration: none; }
.bb-mention-link:hover { text-decoration: underline; }

.bb-post-comments-preview {
  padding: 0 18px 10px;
  font-size: 0.875rem;
  color: var(--bb-gray-500);
}

.bb-post-add-comment {
  display: flex; align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--bb-gray-100);
  gap: 12px;
}
.bb-post-add-comment input {
  flex: 1;
  padding: 6px 0;
  font-size: 0.875rem;
  color: var(--bb-gray-800);
  background: transparent;
}
.bb-post-add-comment input::placeholder { color:var(--bb-gray-400); }
.bb-post-add-comment button {
  color: var(--bb-primary);
  font-weight: 600;
  font-size: 0.875rem;
  opacity: 0.4;
  transition: opacity var(--bb-fast);
}
.bb-post-add-comment button.active { opacity:1; }

.bb-post-username-row { display:flex; align-items:center; gap:4px; }

/* ---- Stories Bar ---- */
.bb-stories-bar {
  background: var(--bb-white);
  border-radius: var(--bb-radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--bb-shadow-xs);
  border: 1px solid var(--bb-gray-100);
}
.bb-stories-bar-header {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:12px;
}
.bb-stories-bar-title { font-weight:700; font-size:0.95rem; color:var(--bb-gray-900); }
.bb-stories-list {
  display:flex; gap:16px;
  overflow-x:auto; padding:4px 0;
  scrollbar-width:none;
}
.bb-stories-list::-webkit-scrollbar { display:none; }

.bb-story-item {
  display:flex; flex-direction:column; align-items:center; gap:6px;
  cursor:pointer; flex-shrink:0;
}
.bb-story-item .bb-story-name {
  font-size:0.7rem; color:var(--bb-gray-600);
  max-width:64px; text-align:center;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

.bb-story-add { position:relative; }
.bb-story-add-btn {
  position:absolute; bottom:0; right:0;
  width:20px; height:20px;
  background:var(--bb-primary); color:white;
  border-radius:var(--bb-radius-full);
  display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700;
  border:2px solid white;
}

/* ---- Explore Grid (Instagram-style staggered masonry with squares only) ---- */
.bb-explore-grid {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 4px;
}
.bb-explore-item {
  position:relative;
  aspect-ratio: 1/1;
  overflow:hidden;
  cursor:pointer;
  border-radius: 2px;
  background: var(--bb-gray-100);
}
.bb-explore-item.big {
  grid-row: span 2;
  grid-column: span 2;
  aspect-ratio: 1/1;
}
.bb-explore-item img {
  width:100%; height:100%;
  object-fit:cover;
  transition: transform 0.4s ease;
}
.bb-explore-item:hover img { transform:scale(1.05); }

.bb-explore-overlay {
  position:absolute; inset:0;
  background: rgba(0,0,0,0.35);
  display:flex; align-items:center; justify-content:center; gap:24px;
  opacity:0; transition: opacity var(--bb-fast);
}
.bb-explore-item:hover .bb-explore-overlay { opacity:1; }

.bb-explore-stat {
  display:flex; align-items:center; gap:6px;
  color:white; font-weight:700; font-size:0.9rem;
}
.bb-explore-stat i { font-size:14px; }

/* ---- Profile Page ---- */
.bb-profile-header {
  background: var(--bb-white);
  border-radius: var(--bb-radius-lg);
  box-shadow: var(--bb-shadow-sm);
  border: 1px solid var(--bb-gray-100);
  margin-bottom: 20px;
  overflow: hidden;
}

.bb-profile-cover {
  height: 200px;
  background: linear-gradient(135deg, #F97316 0%, #FB923C 100%);
  position: relative;
  overflow: hidden;
}
.bb-profile-cover img { width:100%; height:100%; object-fit:cover; }
.bb-profile-cover-pattern {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,0.03) 20px, rgba(255,255,255,0.03) 40px);
  pointer-events: none;
}
.bb-profile-cover-icon {
  position: absolute; bottom: 8px; right: 12px;
  font-size: 56px; color: rgba(255,255,255,0.18); pointer-events: none;
}

.bb-profile-top {
  display:flex; align-items:flex-end; gap:24px;
  padding: 0 32px 24px;
  margin-top: -40px;
  position: relative;
}
.bb-profile-avatar { position:relative; z-index:1; }
.bb-profile-info { flex:1; padding-top:44px; }
.bb-profile-name {
  font-size:1.35rem; font-weight:800; color:var(--bb-gray-900);
  display:flex; align-items:center; gap:8px;
}
.bb-profile-username { font-size:0.875rem; color:var(--bb-gray-500); margin-top:2px; }
.bb-profile-bio { margin-top:12px; font-size:0.9rem; line-height:1.6; color:var(--bb-gray-700); }
.bb-profile-details {
  display:flex; flex-wrap:wrap; gap:16px; margin-top:12px;
  font-size:0.85rem; color:var(--bb-gray-500);
}
.bb-profile-detail { display:flex; align-items:center; gap:6px; }
.bb-profile-detail i { font-size:14px; color:var(--bb-gray-400); }

.bb-profile-stats {
  display:flex; gap:40px;
  padding:20px 32px;
  border-top:1px solid var(--bb-gray-100);
}
.bb-profile-stat { text-align:center; }
.bb-profile-stat-number { font-size:1.15rem; font-weight:800; color:var(--bb-gray-900); }
.bb-profile-stat-label { font-size:0.8rem; color:var(--bb-gray-500); }

.bb-profile-actions { display:flex; gap:8px; align-items:center; padding-top:44px; }

.bb-profile-tabs {
  display:flex;
  border-bottom:1px solid var(--bb-gray-200);
  background: var(--bb-white);
  border-radius: var(--bb-radius-lg) var(--bb-radius-lg) 0 0;
  border: 1px solid var(--bb-gray-100);
  border-bottom: none;
}
.bb-profile-tab {
  flex:1; text-align:center;
  padding:14px 16px;
  font-weight:600; font-size:0.85rem;
  color:var(--bb-gray-500);
  border-bottom:2px solid transparent;
  transition:all var(--bb-fast);
  display:flex; align-items:center; justify-content:center; gap:8px;
}
.bb-profile-tab:hover { color:var(--bb-gray-900); }
.bb-profile-tab.active { color:var(--bb-primary); border-bottom-color:var(--bb-primary); }
.bb-profile-tab i { font-size:14px; }

/* ---- Campaign Badge ---- */
.bb-campaign-badge {
  display:inline-flex; align-items:center; justify-content:center;
  color: var(--bb-info);
  font-size: 14px;
  line-height: 1;
}

/* ---- Chat / Messages ---- */
.bb-chat-layout {
  display:flex;
  height: calc(100vh - 64px);
  background: var(--bb-white);
  border-radius: var(--bb-radius-lg);
  overflow:hidden;
  box-shadow: var(--bb-shadow-sm);
  border: 1px solid var(--bb-gray-200);
}
.bb-chat-sidebar {
  width:350px;
  border-right:1px solid var(--bb-gray-200);
  display:flex; flex-direction:column;
}
.bb-chat-sidebar-header { padding:20px; border-bottom:1px solid var(--bb-gray-100); }
.bb-chat-sidebar-title { font-size:1.25rem; font-weight:800; margin-bottom:16px; color:var(--bb-gray-900); }
.bb-chat-search {
  display:flex; align-items:center; gap:10px;
  background: var(--bb-gray-50);
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius-md);
  padding: 9px 14px;
}
.bb-chat-search i { color:var(--bb-gray-400); font-size:14px; }
.bb-chat-search input { flex:1; background:transparent; font-size:0.85rem; padding:0; border:none; outline:none; }

.bb-chat-list { flex:1; overflow-y:auto; }
.bb-chat-item {
  display:flex; align-items:center; gap:12px;
  padding:12px 20px; cursor:pointer;
  transition: background var(--bb-fast);
  border-bottom:1px solid var(--bb-gray-50);
}
.bb-chat-item:hover { background:var(--bb-gray-50); }
.bb-chat-item.active { background:var(--bb-primary-50); }
.bb-chat-item-info { flex:1; min-width:0; }
.bb-chat-item-name { font-weight:600; font-size:0.875rem; color:var(--bb-gray-900); }
.bb-chat-item-preview { font-size:0.8rem; color:var(--bb-gray-500); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bb-chat-item-time { font-size:0.7rem; color:var(--bb-gray-400); }
.bb-chat-item-unread {
  width:8px; height:8px;
  background:var(--bb-primary); border-radius:var(--bb-radius-full); flex-shrink:0;
}

.bb-chat-main { flex:1; display:flex; flex-direction:column; }
.bb-chat-header {
  display:flex; align-items:center; gap:12px;
  padding:14px 20px;
  border-bottom:1px solid var(--bb-gray-200);
}
.bb-chat-header-info { flex:1; }
.bb-chat-header-name { font-weight:600; font-size:0.95rem; color:var(--bb-gray-900); }
.bb-chat-header-status { font-size:0.75rem; color:var(--bb-success); }

.bb-chat-messages {
  flex:1; overflow-y:auto;
  padding:20px;
  display:flex; flex-direction:column; gap:6px;
}
.bb-message {
  max-width:65%; padding:10px 14px;
  border-radius:var(--bb-radius-lg);
  font-size:0.875rem; line-height:1.5;
}
.bb-message.sent {
  align-self:flex-end;
  background:var(--bb-primary); color:white;
  border-bottom-right-radius:4px;
}
.bb-message.sent.has-image {
  background:transparent;
  padding:4px;
  border-bottom-right-radius:12px;
  box-shadow:0 1px 3px rgba(0,0,0,0.12);
}
.bb-message.sent.has-image .bb-message-img { border-radius:10px; }
.bb-message.sent.has-image .bb-message-text {
  background:var(--bb-primary);
  color:white;
  margin-top:6px;
  border-radius:8px;
  padding:8px 10px;
}
.bb-message.received {
  align-self:flex-start;
  background:var(--bb-gray-100); color:var(--bb-gray-800);
  border-bottom-left-radius:4px;
}
.bb-message.received.has-image {
  background:transparent;
  padding:4px;
  border-bottom-left-radius:12px;
  box-shadow:0 1px 3px rgba(0,0,0,0.12);
}
.bb-message.received.has-image .bb-message-img { border-radius:10px; }
.bb-message.received.has-image .bb-message-text {
  background:var(--bb-gray-100);
  color:var(--bb-gray-800);
  margin-top:6px;
  border-radius:8px;
  padding:8px 10px;
}
.bb-message-time { font-size:0.65rem; opacity:0.6; margin-top:4px; }

.bb-chat-input {
  display:flex; align-items:center; gap:10px;
  padding:14px 20px;
  border-top:1px solid var(--bb-gray-200);
}
.bb-chat-input-field {
  flex:1; display:flex; align-items:center; gap:8px;
  background:var(--bb-gray-50);
  border:1px solid var(--bb-gray-200);
  border-radius:var(--bb-radius-full);
  padding:9px 16px;
}
.bb-chat-input-field input { flex:1; background:transparent; font-size:0.875rem; }
.bb-chat-send-btn {
  width:38px; height:38px;
  background:var(--bb-primary); color:white;
  border-radius:var(--bb-radius-full);
  display:flex; align-items:center; justify-content:center;
  transition: all var(--bb-fast);
}
.bb-chat-send-btn:hover { background:var(--bb-primary-hover); }

/* ---- Notifications ---- */
.bb-notif-item {
  display:flex; align-items:center; gap:12px;
  padding:14px 16px;
  border-radius:var(--bb-radius-md);
  transition: background var(--bb-fast);
}
.bb-notif-item:hover { background:var(--bb-gray-50); }
.bb-notif-item.unread { background:var(--bb-primary-50); }
.bb-notif-text { flex:1; font-size:0.85rem; line-height:1.5; color:var(--bb-gray-700); }
.bb-notif-text .username { font-weight:600; color:var(--bb-gray-900); }
.bb-notif-icon { width:40px; height:40px; border-radius:var(--bb-radius-full); display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
.bb-notif-icon.like { background:var(--bb-danger-light); color:var(--bb-danger); }
.bb-notif-icon.comment { background:var(--bb-info-light); color:var(--bb-info); }
.bb-notif-icon.follow { background:var(--bb-success-light); color:var(--bb-success); }
.bb-notif-icon.follow-request { background:var(--bb-warning-light); color:var(--bb-warning); }
.bb-notif-icon.message-request { background:var(--bb-primary-50); color:var(--bb-primary); }
.bb-notif-icon.mention { background:var(--bb-info-light); color:var(--bb-info); }
.bb-notif-time { font-size:0.7rem; color:var(--bb-gray-400); white-space:nowrap; }

/* ---- Form Elements ---- */
.bb-input-group { margin-bottom:16px; }
.bb-input-group label {
  display:block; font-weight:600; font-size:0.8rem;
  color:var(--bb-gray-700); margin-bottom:6px;
  text-transform: uppercase; letter-spacing:0.03em;
}
.bb-input {
  width:100%; padding:10px 14px;
  background: var(--bb-white);
  border:1.5px solid var(--bb-gray-300);
  border-radius:var(--bb-radius-md);
  font-size:0.9rem; color:var(--bb-gray-800);
  transition: all var(--bb-fast);
}
.bb-input:focus {
  border-color:var(--bb-primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
  outline:none;
}
.bb-input::placeholder { color:var(--bb-gray-400); }
.bb-textarea { resize:vertical; min-height:100px; }
.bb-select {
  appearance:none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  padding-right:36px;
}

/* ---- Search Bar ---- */
.bb-search-bar {
  display:flex; align-items:center; gap:10px;
  background:var(--bb-white);
  border:1.5px solid var(--bb-gray-300);
  border-radius:var(--bb-radius-md);
  padding:9px 14px;
  transition: all var(--bb-fast);
}
.bb-search-bar:focus-within {
  border-color:var(--bb-primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
}
form.bb-search-bar input,
.bb-explore-search .bb-search-bar input { flex:1; background:transparent; font-size:0.9rem; padding:0; border:none; outline:none; }
.bb-search-bar .search-icon { color:var(--bb-gray-400); font-size:14px; }

/* ---- Toggle Switch ---- */
.bb-toggle {
  position:relative; width:44px; height:24px;
  background:var(--bb-gray-300); border-radius:var(--bb-radius-full);
  cursor:pointer; transition:background var(--bb-fast);
}
.bb-toggle.active { background:var(--bb-primary); }
.bb-toggle::after {
  content:''; position:absolute; top:2px; left:2px;
  width:20px; height:20px; background:white;
  border-radius:var(--bb-radius-full);
  transition: transform var(--bb-fast);
  box-shadow: var(--bb-shadow-xs);
}
.bb-toggle.active::after { transform:translateX(20px); }

/* ---- Modal ---- */
.bb-modal-overlay {
  position:fixed; inset:0;
  background:rgba(0,0,0,0.5);
  z-index:1000;
  display:flex; align-items:center; justify-content:center;
  padding:20px;
  opacity:0; visibility:hidden;
  transition: all var(--bb-normal);
}
.bb-modal-overlay.active { opacity:1; visibility:visible; overflow:hidden; }

/* Prevent background scroll when any modal is open */
body.modal-open { overflow:hidden !important; }

.bb-modal {
  background:var(--bb-white);
  border-radius:var(--bb-radius-xl);
  max-width:500px; width:100%;
  max-height:90vh; overflow-y:auto;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--bb-normal);
  box-shadow: var(--bb-shadow-xl);
}
.bb-modal-overlay.active .bb-modal { transform:scale(1) translateY(0); }

.bb-modal-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 24px; border-bottom:1px solid var(--bb-gray-100);
}
.bb-modal-title { font-size:1.05rem; font-weight:700; color:var(--bb-gray-900); }
.bb-modal-close {
  width:32px; height:32px;
  display:flex; align-items:center; justify-content:center;
  border-radius:var(--bb-radius-md);
  color:var(--bb-gray-500); font-size:14px;
  transition: background var(--bb-fast);
}
.bb-modal-close:hover { background:var(--bb-gray-100); color:var(--bb-gray-700); }
.bb-modal-body { padding:24px; }
.bb-modal-footer {
  padding:14px 24px; border-top:1px solid var(--bb-gray-100);
  display:flex; justify-content:flex-end; gap:8px;
}

/* ---- Empty State ---- */
.bb-empty {
  text-align:center; padding:80px 20px;
}
.bb-empty-icon {
  font-size:48px; color:var(--bb-gray-300); margin-bottom:16px;
}
.bb-empty-icon i { font-size:48px; }
.bb-empty-title {
  font-size:1.15rem; font-weight:700; color:var(--bb-gray-800);
  margin-bottom:8px;
}
.bb-empty-text {
  font-size:0.9rem; color:var(--bb-gray-500);
  max-width:400px; margin:0 auto; line-height:1.6;
}

/* ---- Suggestions Sidebar ---- */
.bb-suggestions {
  background:var(--bb-white);
  border-radius:var(--bb-radius-lg);
  padding:16px;
  box-shadow:var(--bb-shadow-xs);
  border:1px solid var(--bb-gray-100);
}
.bb-suggestions-header {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:14px;
}
.bb-suggestions-title { font-weight:700; font-size:0.85rem; color:var(--bb-gray-500); text-transform:uppercase; letter-spacing:0.04em; }
.bb-suggestion-item {
  display:flex; align-items:center; gap:10px;
  margin-bottom:10px;
}
.bb-suggestion-info { flex:1; min-width:0; }
.bb-suggestion-name { 
  font-weight:600; font-size:0.85rem; color:var(--bb-gray-900); 
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.bb-suggestion-animal { font-size:0.75rem; color:var(--bb-gray-500); }

/* ---- Tags ---- */
.bb-tag {
  display:inline-flex; align-items:center; gap:4px;
  padding:4px 10px;
  background:var(--bb-gray-100);
  border-radius:var(--bb-radius-full);
  font-size:0.8rem; font-weight:500; color:var(--bb-gray-600);
  transition:all var(--bb-fast);
}
.bb-tag:hover { background:var(--bb-primary-50); color:var(--bb-primary); }
.bb-tag-animal { background:var(--bb-primary-50); color:var(--bb-primary); }

/* ---- Settings ---- */
.bb-settings-layout { display:flex; gap:24px; }
.bb-settings-nav { width:220px; flex-shrink:0; }
.bb-settings-nav-item {
  display:flex; align-items:center; gap:10px;
  padding:10px 14px; font-size:0.875rem;
  color:var(--bb-gray-600); border-radius:var(--bb-radius-md);
  transition:all var(--bb-fast);
}
.bb-settings-nav-item:hover { background:var(--bb-gray-50); color:var(--bb-gray-900); }
.bb-settings-nav-item.active { background:var(--bb-primary-50); color:var(--bb-primary); font-weight:600; }
.bb-settings-nav-item i { width:18px; text-align:center; font-size:14px; }
.bb-settings-content { flex:1; max-width:600px; }
.bb-settings-section { margin-bottom:32px; }
.bb-settings-section h3 { font-size:1.05rem; font-weight:700; margin-bottom:16px; color:var(--bb-gray-900); }

/* ---- Feed Layout ---- */
.bb-feed-layout {
  display:grid;
  grid-template-columns: 1fr 300px;
  gap:24px;
  align-items:start;
  max-width: 1080px;
}
.bb-feed-column { max-width:var(--bb-max-feed); }
.bb-feed-sidebar {
  position:sticky;
  top:24px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--bb-gray-300) transparent;
}
.bb-feed-sidebar::-webkit-scrollbar { width: 6px; }
.bb-feed-sidebar::-webkit-scrollbar-thumb { background: var(--bb-gray-300); border-radius: 3px; }
.bb-feed-sidebar::-webkit-scrollbar-track { background: transparent; }

/* ---- Dropdown ---- */
.bb-dropdown { position:relative; display:inline-block; }
.bb-dropdown-menu {
  position:absolute; top:100%; right:0;
  background:var(--bb-white); border-radius:var(--bb-radius-md);
  box-shadow:var(--bb-shadow-lg); border:1px solid var(--bb-gray-200);
  min-width:200px; padding:6px;
  z-index:200; opacity:0; visibility:hidden;
  transform:translateY(-4px);
  transition:all var(--bb-fast);
}
.bb-dropdown-menu.show { opacity:1; visibility:visible; transform:translateY(4px); }
.bb-dropdown-item {
  display:flex; align-items:center; gap:10px;
  padding:9px 12px; font-size:0.85rem;
  color:var(--bb-gray-700); border-radius:var(--bb-radius-sm);
  transition: background var(--bb-fast);
}
.bb-dropdown-item:hover { background:var(--bb-gray-50); }
.bb-dropdown-item.danger { color:var(--bb-danger); }
.bb-dropdown-item i { width:16px; text-align:center; font-size:14px; }

/* ---- Auth / Landing Pages ---- */
.bb-auth-wrapper {
  min-height:100vh; display:flex;
  background: var(--bb-bg);
}

/* Left Hero Section */
.bb-auth-left {
  flex:1; display:flex; align-items:center; justify-content:center;
  position: relative; overflow: hidden;
}

.bb-auth-hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bb-auth-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.45) 50%, rgba(249,115,22,0.25) 100%);
}

.bb-auth-hero-content {
  position: relative; z-index: 2;
  max-width: 520px; padding: 48px;
  text-align: center;
}

.bb-auth-hero-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  background: var(--bb-primary);
  border-radius: var(--bb-radius-lg);
  margin-bottom: 24px;
}
.bb-auth-hero-logo i {
  font-size: 28px; color: white;
}

.bb-auth-hero-title {
  font-size: 2.5rem; font-weight: 800;
  color: #FFFFFF; line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.bb-auth-hero-subtitle {
  font-size: 1.1rem; color: rgba(255,255,255,0.8);
  line-height: 1.7; margin-bottom: 32px;
  max-width: 420px; margin-left: auto; margin-right: auto;
}

.bb-auth-hero-features {
  display: flex; flex-direction: column; gap: 14px;
  text-align: left; margin-bottom: 32px;
}

.bb-auth-hero-feature {
  display: flex; align-items: center; gap: 14px;
  color: rgba(255,255,255,0.9); font-size: 0.95rem; font-weight: 500;
}
.bb-auth-hero-feature-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--bb-radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}
.bb-auth-hero-feature-icon i {
  font-size: 16px; color: #FFFFFF;
}

.bb-auth-hero-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: rgba(255,255,255,0.6); font-size: 0.85rem;
}
.bb-auth-hero-cta i { font-size: 12px; }

/* Right Form Section */
.bb-auth-right {
  flex:1; display:flex; align-items:center; justify-content:center;
  padding:40px;
  background: var(--bb-white);
}

.bb-auth-card {
  background: var(--bb-white);
  border-radius: var(--bb-radius-xl);
  padding:40px;
  width:100%; max-width:440px;
  box-shadow: var(--bb-shadow-lg);
  border:1px solid var(--bb-gray-200);
}

.bb-auth-card h2 {
  font-size:1.4rem; font-weight:800; text-align:center;
  color:var(--bb-gray-900); margin-bottom:6px;
}
.bb-auth-subtitle-form {
  text-align:center; color:var(--bb-gray-500);
  margin-bottom:28px; font-size:0.9rem;
}

.bb-auth-form .bb-input-group { margin-bottom:18px; }

.bb-input-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.bb-input-row-between { display:flex; align-items:center; justify-content:space-between; }

.bb-checkbox-group { display:flex; align-items:center; gap:8px; font-size:0.85rem; color:var(--bb-gray-600); }
.bb-checkbox { width:16px; height:16px; accent-color:var(--bb-primary); }

.bb-link { color:var(--bb-primary); font-weight:600; }
.bb-link:hover { color:var(--bb-primary-hover); }
.bb-link-small { font-size:0.8rem; }

.bb-alert { padding:12px 16px; border-radius:var(--bb-radius-md); margin-bottom:20px; font-size:0.85rem; }
.bb-alert-error { background:var(--bb-danger-light); color:var(--bb-danger); border:1px solid rgba(239,68,68,0.2); }
.bb-alert-success { background:var(--bb-success-light); color:var(--bb-success); }

.bb-auth-footer {
  text-align:center; margin-top:24px;
  font-size:0.85rem; color:var(--bb-gray-500);
}
.bb-auth-footer a { color:var(--bb-primary); font-weight:600; }

/* ---- Auth: Input Icon Wrapper ---- */
.bb-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.bb-input-icon {
  position: absolute;
  left: 14px;
  color: var(--bb-gray-400);
  font-size: 14px;
  pointer-events: none;
  transition: color var(--bb-fast);
  z-index: 1;
}
.bb-input-wrapper:focus-within .bb-input-icon {
  color: var(--bb-primary);
}
.bb-input-has-icon {
  padding-left: 40px !important;
}
.bb-password-toggle {
  position: absolute;
  right: 12px;
  color: var(--bb-gray-400);
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--bb-fast);
  z-index: 1;
}
.bb-password-toggle:hover {
  color: var(--bb-gray-600);
}

/* ---- Auth: Register Card (slightly wider) ---- */
.bb-auth-card-register {
  max-width: 500px;
}

/* ---- Default Avatar Placeholder (Aligned with circular website logo style) ---- */
.bb-avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bb-primary);
  color: white;
  font-size: 16px;
  border-radius: var(--bb-radius-full);
  flex-shrink: 0;
}
.bb-avatar-placeholder.sm { width: 32px; height: 32px; font-size: 12px; border-radius: var(--bb-radius-full); }
.bb-avatar-placeholder.md { width: 40px; height: 40px; font-size: 16px; border-radius: var(--bb-radius-full); }
.bb-avatar-placeholder.lg { width: 72px; height: 72px; font-size: 28px; border-radius: var(--bb-radius-full); }
.bb-avatar-placeholder.xl { width: 110px; height: 110px; font-size: 44px; border: 3px solid var(--bb-white); box-shadow: var(--bb-shadow-md); border-radius: var(--bb-radius-full); }

/* ---- Explore Post Placeholder ---- */
.bb-explore-placeholder {
  width: 100%; height: 100%;
  background: var(--bb-primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}
.bb-explore-item.big .bb-explore-placeholder {
  font-size: 96px;
}

/* ---- Follow Requests ---- */
.bb-request-item {
  display:flex; align-items:center; gap:12px;
  padding:12px 0;
}
.bb-request-item .bb-request-info { flex:1; }
.bb-request-item .bb-request-actions { display:flex; gap:8px; }

/* ---- Loading Spinner ---- */
.bb-spinner {
  width:24px; height:24px;
  border:3px solid var(--bb-gray-200);
  border-top-color:var(--bb-primary);
  border-radius:var(--bb-radius-full);
  animation:spin 0.7s linear infinite;
}
.bb-spinner-sm { width:16px; height:16px; border-width:2px; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ---- Animations ---- */
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes scaleIn { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:scale(1); } }
.fade-in { animation:fadeIn 0.35s ease forwards; }
.slide-up { animation:slideUp 0.4s ease forwards; }

/* ---- Responsive ---- */
@media (max-width:1024px) {
  .bb-sidebar {
    top:auto; bottom:0; left:0; right:0;
    height:60px; width:100%;
    flex-direction:row; justify-content:space-around;
    padding:0 4px;
    border-right:none; border-top:1px solid var(--bb-gray-200);
  }
  .bb-sidebar .bb-nav-item .nav-label { font-size:0.55rem; }
  .bb-sidebar .bb-logo { display:none; }
  .bb-main { margin-left:0; margin-bottom:60px; padding-left:0; }
  .bb-nav { flex-direction:row; gap:0; justify-content:space-around; width:100%; }
  .bb-nav-item { flex-direction:column; gap:2px; padding:6px 10px; }
  .bb-nav-item .nav-label { display:block !important; font-size:0.6rem; }
  .bb-nav-item .nav-icon { width:22px; height:22px; }
  .bb-nav-item .nav-icon i { font-size:18px; }
  .bb-nav-badge { top:0; left:22px; }
  .bb-sidebar-spacer, .bb-sidebar-user, .bb-logout-btn { display:none; }
  .bb-feed-layout { grid-template-columns:1fr; }
  .bb-feed-sidebar { display:none; }
  .bb-settings-layout { flex-direction:column; }
  .bb-settings-nav { width:100%; overflow-x:auto; }
}

@media (max-width:768px) {
  /* ===== Top & Bottom Navigation Overrides ===== */
  .bb-top-bar { display: flex; }

  /* Push content down for fixed top bar, up for fixed bottom nav */
  .bb-main {
    padding-top: 56px;
    margin-bottom: 76px;
  }

  /* ===== Bottom Nav — Flat Design ===== */
  .bb-sidebar {
    height: 68px;
    padding: 4px 0;
    z-index: 150;
    background: white;
    border-top: none;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  }

  .bb-nav {
    height: 100%;
    flex-direction: row;
    gap: 0;
    justify-content: space-around;
    align-items: center;
  }

  /* Hide non-mobile items from bottom nav */
  .bb-nav li[data-mobile-nav="hide"] { display: none; }
  .bb-nav li[data-mobile-nav="show"] {
    display: flex;
    flex: 1;
    justify-content: center;
  }

  /* Nav items: icon-only, no labels */
  .bb-nav-item {
    flex-direction: column;
    gap: 0;
    padding: 6px;
    border-radius: var(--bb-radius-full);
  }
  .bb-nav-item .nav-label { display: none !important; }
  .bb-nav-item .nav-icon {
    width: 28px; height: 28px;
  }
  .bb-nav-item .nav-icon i { font-size: 1.5rem; }

  /* Badge on bottom nav */
  .bb-nav-badge {
    top: -2px; left: 18px;
    min-width: 16px; height: 16px;
    font-size: 0.55rem;
    padding: 0 4px;
  }

  /* Create Post: prominent orange circle centered inside the nav */
  .bb-nav li[data-mobile-nav="show"]:has([data-action="create-post"]) {
    flex: 0 0 auto;
  }
  .bb-nav li[data-mobile-nav="show"]:has([data-action="create-post"]) .bb-nav-item {
    width: 40px; height: 40px;
    background: var(--bb-primary);
    border-radius: 50%;
    color: white;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(249,115,22,0.3);
    position: relative;
    z-index: 1;
  }
  .bb-nav li[data-mobile-nav="show"]:has([data-action="create-post"]) .bb-nav-item:hover {
    background: var(--bb-primary-hover);
  }
  .bb-nav li[data-mobile-nav="show"]:has([data-action="create-post"]) .bb-nav-item .nav-icon {
    width: auto; height: auto;
  }
  .bb-nav li[data-mobile-nav="show"]:has([data-action="create-post"]) .bb-nav-item .nav-icon i {
    font-size: 1.5rem;
  }

  /* Profile nav avatar */
  .bb-nav-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
  .bb-nav-avatar-placeholder {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bb-primary, #F97316); color: white;
    font-size: 14px;
  }

  /* Profile as last mobile nav item (far right, with circular avatar) */
  .bb-nav li[data-mobile-profile="1"] {
    display: flex !important;
    flex: 1;
    justify-content: center;
  }
  .bb-nav li[data-mobile-profile="1"] .bb-nav-item {
    padding: 6px 10px;
    flex-direction: column;
    gap: 2px;
  }
  .bb-nav li[data-mobile-profile="1"] .nav-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid transparent;
    transition: all 0.2s ease;
  }
  .bb-nav li[data-mobile-profile="1"] .nav-icon img,
  .bb-nav li[data-mobile-profile="1"] .nav-icon .bb-nav-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: cover;
  }
  .bb-nav li[data-mobile-profile="1"] .bb-nav-item.active .nav-icon {
    border-color: var(--bb-primary, #F97316);
  }
  .bb-nav li[data-mobile-profile="1"] .bb-nav-item .nav-label {
    display: none !important;
  }

  /* Hide sidebar-only elements */
  .bb-sidebar-spacer, .bb-sidebar-user, .bb-logout-btn { display: none; }
  .bb-sidebar .bb-logo { display: none; }

  .bb-container { padding:16px 12px; width:100%; max-width:100%; box-sizing:border-box; }
  html, body { overflow-x: hidden; }
  .bb-feed-layout { width:100%; max-width:100%; }
  .bb-feed-column { width:100%; max-width:100%; min-width:0; }
  .bb-main { width:100%; box-sizing:border-box; }
  .bb-post { max-width:100%; overflow:hidden; }

  /* ===== Profile Header — Mobile (Instagram-style) ===== */
  .bb-profile-header {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    overflow: visible;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  /* Flatten the DOM so all profile sections become direct flex children of .bb-profile-header */
  .bb-profile-top { display: contents; }
  .bb-profile-info { display: contents; }
  .bb-profile-info > div:first-child { display: contents !important; }

  /* Cover: full-width first row */
  .bb-profile-cover {
    width: 100%;
    height: 120px;
    order: 0;
  }

  /* === Row 1: Avatar (left) + Stats (right) in same row === */
  .bb-profile-avatar {
    order: 1;
    flex: 0 0 auto;
    margin-top: -35px;
    margin-left: 16px;
    position: relative;
    z-index: 2;
  }
  .bb-profile-avatar .bb-avatar-xl,
  .bb-profile-avatar .bb-avatar-placeholder.xl {
    width: 77px; height: 77px;
  }
  .bb-avatar-ring { width: fit-content; }
  .bb-avatar-ring .bb-avatar-xl { width: 77px; height: 77px; }
  .bb-avatar-story { width: fit-content; }
  .bb-avatar-story .bb-avatar-xl { width: 77px; height: 77px; }
  .bb-avatar-placeholder.xl i { font-size: 28px; }

  .bb-profile-stats {
    order: 2;
    flex: 1;
    min-width: 0;
    padding: 12px 16px 0 8px;
    border: none;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
  }
  .bb-profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
  .bb-profile-stat-number { font-size: 1rem; font-weight: 700; }
  .bb-profile-stat-label { font-size: 0.65rem; color: var(--bb-gray-500); }

  /* === Row 2: Name + @handle — full width, left-aligned === */
  .bb-profile-name-wrap {
    order: 3;
    width: 100%;
    padding: 4px 16px 0;
  }
  .bb-profile-name { font-size: 1rem; margin: 0; }
  .bb-profile-username { font-size: 0.78rem; margin-top: 0; }

  /* === Row 3: Bio === */
  .bb-profile-bio {
    order: 4;
    width: 100%;
    padding: 0 16px;
    margin-top: 6px;
    font-size: 0.85rem;
    line-height: 1.5;
  }

  /* === Row 4: Details (tags) === */
  .bb-profile-details {
    order: 5;
    width: 100%;
    padding: 0 16px;
    margin-top: 6px;
    gap: 6px;
    font-size: 0.75rem;
  }

  /* === Row 5: Action Button (full-width, BELOW details) === */
  .bb-profile-actions {
    order: 6;
    width: 100%;
    padding: 12px 16px 20px;
    justify-content: stretch;
    border-bottom: 1px solid var(--bb-gray-100, #F3F4F6);
    margin-bottom: 4px;
  }
  .bb-profile-actions > a,
  .bb-profile-actions > button:not(.bb-btn-icon) {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 10px 12px;
    font-size: 0.85rem;
    border-radius: var(--bb-radius-md);
  }
  /* 3-dot button on mobile */
  .bb-profile-dropdown { display: flex; }
  .bb-profile-dropdown .bb-btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bb-gray-100, #F3F4F6);
    border: 1px solid var(--bb-gray-200, #E5E7EB);
    font-size: 18px;
    color: var(--bb-dark);
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .bb-profile-dropdown .bb-btn-icon:hover {
    background: var(--bb-gray-200, #E5E7EB);
  }

  /* === Row 6: Tabs (full-width, evenly distributed) === */
  .bb-profile-tabs {
    order: 7;
    width: 100%;
    margin: 4px 0 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .bb-profile-tab {
    flex: 1;
    padding: 12px 8px;
    font-size: 0.78rem;
  }
  .bb-profile-tab i { font-size: 12px; }

  /* Other mobile overrides */
  .bb-explore-grid { gap:2px; }
  .bb-container-wide { width:100%; max-width:100%; padding:12px 8px; box-sizing:border-box; }
  .bb-chat-layout { width:100%; max-width:100%; box-sizing:border-box; }
  .bb-chat-sidebar { width:100%; max-width:100%; box-sizing:border-box; }
  .bb-chat-main { display:none; width:100%; max-width:100%; box-sizing:border-box; }
  .bb-chat-layout.chat-open .bb-chat-sidebar { display:none; }
  .bb-chat-layout.chat-open .bb-chat-main { display:flex; }
  .bb-chat-messages { overflow-x:hidden; padding:12px 10px; }
  .bb-message { max-width:80%; font-size:0.9rem; }
  .bb-message-img { max-width:200px; }
  .bb-auth-left { display:none; }

  /* Hide top bar and bottom nav when in chat conversation */
  body.chat-open-body .bb-top-bar { display:none !important; }
  body.chat-open-body .bb-sidebar { display:none !important; }
  body.chat-open-body .bb-main { margin-bottom:0 !important; padding-top:0 !important; }
  body.chat-open-body .bb-chat-layout { height:100vh; border-radius:0; border:none; box-shadow:none; }

  /* Mobile chat header: compact, hide call buttons */
  .bb-chat-header { padding:10px 12px; gap:8px; }
  .bb-chat-header .bb-chat-header-actions { gap:2px; }
  .bb-chat-header .bb-chat-header-action { width:32px; height:32px; font-size:14px; }
  .bb-chat-header .bb-chat-header-action:nth-child(1),
  .bb-chat-header .bb-chat-header-action:nth-child(2) { display:none; }
  .bb-chat-header-name { font-size:0.9rem; }
  .bb-chat-header-status { font-size:0.7rem; }
  .bb-chat-back-btn { width:34px; height:34px; font-size:15px; }
  .bb-chat-avatar-wrap .bb-avatar { width:36px !important; height:36px !important; }
  .bb-chat-online-dot { width:8px; height:8px; }

  /* Mobile chat input: compact, comfortable tap targets */
  .bb-chat-input { padding:8px 10px; gap:6px; }
  .bb-chat-input-field { padding:7px 12px; gap:6px; }
  .bb-chat-input-field input { font-size:0.9rem; min-width:0; }
  .bb-chat-emoji-btn { width:30px; height:30px; font-size:18px; flex-shrink:0; }
  .bb-chat-upload-btn { width:30px; height:30px; font-size:15px; flex-shrink:0; }
  .bb-chat-send-btn { width:36px; height:36px; font-size:14px; flex-shrink:0; }

  /* Mobile message date separator */
  .bb-message-date-sep { padding:6px 0; }
  .bb-message-date-sep span { font-size:0.65rem; padding:3px 10px; }
  .bb-message-time { font-size:0.6rem; }

  .bb-auth-right { padding:20px; width:100%; }
  .bb-auth-card { padding:28px 20px; }
  .bb-input-row { grid-template-columns:1fr; }
}

/* ============================================
   Comment Bottom-Sheet Drawer (Instagram-style)
   ============================================ */
.bb-comment-drawer-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.bb-comment-drawer-overlay.active {
  display: block;
  opacity: 1;
}
.bb-comment-drawer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bb-white);
  border-radius: 16px 16px 0 0;
  z-index: 501;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.bb-comment-drawer.active {
  transform: translateY(0);
}
.bb-comment-drawer-draghandle {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  cursor: grab;
}
.bb-comment-drawer-draghandle::after {
  content: '';
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--bb-gray-300);
}
.bb-comment-drawer-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 16px 12px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--bb-gray-900);
  border-bottom: 1px solid var(--bb-gray-100);
  position: relative;
}
.bb-comment-drawer-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--bb-gray-500);
  cursor: pointer;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.bb-comment-drawer-close:hover {
  background: var(--bb-gray-100);
  color: var(--bb-gray-900);
}
.bb-comment-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  overscroll-behavior: contain;
  min-height: 100px;
}
.bb-comment-drawer-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--bb-gray-400);
}
.bb-comment-drawer-empty i {
  font-size: 2rem;
  margin-bottom: 8px;
}
.bb-comment-drawer-comment {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
}
.bb-comment-drawer-comment .bb-avatar {
  width: 32px; height: 32px;
  flex-shrink: 0;
}
.bb-comment-drawer-comment-content {
  flex: 1;
  min-width: 0;
}
.bb-comment-drawer-comment-text {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--bb-gray-900);
}
.bb-comment-drawer-comment-text .username {
  font-weight: 700;
  color: var(--bb-gray-900);
  margin-right: 6px;
}
.bb-comment-drawer-comment-meta {
  font-size: 0.7rem;
  color: var(--bb-gray-400);
  margin-top: 4px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.bb-comment-drawer-delete {
  background: none; border: none; color: var(--bb-gray-400); font-size: 0.7rem;
  cursor: pointer; padding: 0 2px; margin-left: auto; opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}
.bb-comment-drawer-comment:hover .bb-comment-drawer-delete { opacity: 1; }
.bb-comment-drawer-delete:hover { color: var(--bb-danger, #EF4444); }
.bb-comment-drawer-input {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--bb-gray-100);
  gap: 10px;
}
.bb-comment-drawer-input .bb-avatar {
  width: 28px; height: 28px;
  flex-shrink: 0;
}
.bb-comment-drawer-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.875rem;
  background: transparent;
  color: var(--bb-gray-900);
}
.bb-comment-drawer-input input::placeholder {
  color: var(--bb-gray-400);
}
.bb-comment-drawer-input button {
  color: var(--bb-primary);
  font-weight: 700;
  font-size: 0.875rem;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
}
.bb-comment-drawer-input button.active {
  opacity: 1;
}

/* ---- Utility ---- */
.flex { display:flex; }
.flex-col { flex-direction:column; }
.items-center { align-items:center; }
.justify-center { justify-content:center; }
.justify-between { justify-content:space-between; }
.gap-2 { gap:8px; }
.gap-3 { gap:12px; }
.gap-4 { gap:16px; }
.w-full { width:100%; }
.hidden { display:none; }
.mt-2 { margin-top:8px; }
.mt-4 { margin-top:16px; }
.mb-2 { margin-bottom:8px; }
.mb-4 { margin-bottom:16px; }
.p-4 { padding:16px; }
.font-bold { font-weight:700; }

/* ---- Category Tabs ---- */
.bb-category-tabs {
  display:flex; gap:8px; flex-wrap:wrap; margin-bottom:20px;
}
.bb-category-tab {
  padding:7px 16px;
  border-radius:var(--bb-radius-full);
  font-size:0.82rem; font-weight:600;
  color:var(--bb-gray-600);
  background:var(--bb-white);
  border:1px solid var(--bb-gray-200);
  cursor:pointer;
  transition:all var(--bb-fast);
}
.bb-category-tab:hover { border-color:var(--bb-primary); color:var(--bb-primary); }
.bb-category-tab.active {
  background:var(--bb-primary); color:white;
  border-color:var(--bb-primary);
}

/* ---- Explore Layout ---- */
.bb-explore-layout {
  display:grid; grid-template-columns:1fr 280px; gap:24px; align-items:start;
}
.bb-explore-sidebar { position:sticky; top:24px; }

/* ---- Post Detail ---- */
.bb-post-detail {
  display:grid; grid-template-columns:1fr 400px; 
  background:var(--bb-white);
  border-radius:var(--bb-radius-lg);
  box-shadow:var(--bb-shadow-sm);
  border:1px solid var(--bb-gray-100);
  overflow:hidden;
  min-height:600px;
}
.bb-post-detail-image { background:var(--bb-gray-100); display:flex; align-items:center; justify-content:center; }
.bb-post-detail-image img { width:100%; height:100%; object-fit:cover; }
.bb-post-detail-content { display:flex; flex-direction:column; border-left:1px solid var(--bb-gray-100); }

@media (max-width:768px) {
  .bb-post-detail { grid-template-columns:1fr; }
  .bb-explore-layout { grid-template-columns:1fr; }
  .bb-explore-sidebar { display:none; }
}

/* ---- Upload Dropzone ---- */
.bb-upload-dropzone {
  border:2px dashed var(--bb-gray-300);
  border-radius:var(--bb-radius-lg);
  padding:48px 24px;
  text-align:center;
  cursor:pointer;
  transition:all var(--bb-fast);
  background:var(--bb-gray-50);
}
.bb-upload-dropzone:hover { border-color:var(--bb-primary); background:var(--bb-primary-50); }
.bb-upload-dropzone.dragover { border-color:var(--bb-primary); background:var(--bb-primary-50); }
.bb-upload-dropzone i { font-size:40px; color:var(--bb-gray-400); margin-bottom:12px; }
.bb-upload-dropzone p { color:var(--bb-gray-500); font-size:0.9rem; }

/* ============================================
   Landing Page — SEO-Rich Scrollable Sections
   ============================================ */

/* Hero Wrapper — force 100vh split screen */
.bb-landing-hero {
  min-height: 100vh;
}

.bb-landing-hero .bb-auth-wrapper {
  min-height: 100vh;
}

/* Shared container for landing sections */
.bb-landing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Section Header (reusable) ---- */
.bb-landing-section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.bb-landing-section-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--bb-primary-light);
  color: var(--bb-primary);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--bb-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.bb-landing-section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--bb-gray-900);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.bb-landing-section-subtitle {
  font-size: 1.05rem;
  color: var(--bb-gray-500);
  line-height: 1.7;
}

/* ---- SECTION 2: Features ("Why BarryBalto?") ---- */
.bb-landing-features {
  background: var(--bb-gray-50);
  padding: 96px 0;
}

.bb-landing-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.bb-landing-feature-card {
  background: var(--bb-white);
  border-radius: var(--bb-radius-lg);
  padding: 36px 28px;
  border: 1px solid var(--bb-gray-200);
  box-shadow: var(--bb-shadow-sm);
  transition: all 0.3s ease;
  /* Scroll animation initial state */
  opacity: 0;
  transform: translateY(24px);
}
.bb-landing-feature-card.bb-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.bb-landing-feature-card:nth-child(2).bb-visible { transition-delay: 0.12s; }
.bb-landing-feature-card:nth-child(3).bb-visible { transition-delay: 0.24s; }

.bb-landing-feature-card:hover {
  box-shadow: var(--bb-shadow-lg);
  transform: translateY(-4px);
  border-color: var(--bb-primary-200);
}

.bb-landing-feature-icon {
  width: 56px;
  height: 56px;
  background: var(--bb-primary-light);
  border-radius: var(--bb-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.bb-landing-feature-icon i {
  font-size: 24px;
  color: var(--bb-primary);
}

.bb-landing-feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bb-gray-900);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.bb-landing-feature-desc {
  font-size: 0.92rem;
  color: var(--bb-gray-500);
  line-height: 1.7;
}

/* ---- SECTION 3: How It Works ---- */
.bb-landing-how {
  background: var(--bb-white);
  padding: 96px 0;
}

.bb-landing-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 32px;
  position: relative;
}

/* Connector line between steps */
.bb-landing-steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: calc(16.666% + 28px);
  right: calc(16.666% + 28px);
  height: 2px;
  background: var(--bb-gray-200);
  z-index: 0;
}

.bb-landing-step {
  text-align: center;
  position: relative;
  z-index: 1;
  /* Scroll animation */
  opacity: 0;
  transform: translateY(24px);
}
.bb-landing-step.bb-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.bb-landing-step:nth-child(2).bb-visible { transition-delay: 0.15s; }
.bb-landing-step:nth-child(3).bb-visible { transition-delay: 0.3s; }

.bb-landing-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--bb-primary);
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: var(--bb-radius-full);
  margin-bottom: 16px;
}

.bb-landing-step-icon {
  width: 72px;
  height: 72px;
  background: var(--bb-gray-50);
  border-radius: var(--bb-radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  border: 2px solid var(--bb-gray-200);
}
.bb-landing-step-icon i {
  font-size: 28px;
  color: var(--bb-primary);
}

.bb-landing-step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bb-gray-900);
  margin-bottom: 10px;
}

.bb-landing-step-desc {
  font-size: 0.9rem;
  color: var(--bb-gray-500);
  line-height: 1.7;
  max-width: 340px;
  margin: 0 auto;
}

/* ---- SECTION 4: CTA Banner ---- */
.bb-landing-cta {
  background: var(--bb-primary);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}

/* Decorative background pattern */
.bb-landing-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--bb-radius-full);
}
.bb-landing-cta::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--bb-radius-full);
}

.bb-landing-cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  /* Scroll animation */
  opacity: 0;
  transform: translateY(20px);
}
.bb-landing-cta-content.bb-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.bb-landing-cta-text {
  flex: 1;
}

.bb-landing-cta-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.bb-landing-cta-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  max-width: 560px;
}

.bb-landing-cta-action {
  flex-shrink: 0;
}

.bb-landing-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  background: white;
  color: var(--bb-primary);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--bb-radius-lg);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  white-space: nowrap;
}
.bb-landing-cta-btn:hover {
  background: var(--bb-gray-50);
  color: var(--bb-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.bb-landing-cta-btn:active {
  transform: translateY(0);
}
.bb-landing-cta-btn i {
  font-size: 16px;
}

/* ---- SECTION 5: SEO Footer ---- */
.bb-landing-footer {
  background: var(--bb-gray-900);
  padding: 64px 0 0;
  color: var(--bb-gray-400);
}

.bb-landing-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.bb-landing-footer-brand {
  max-width: 320px;
}

.bb-landing-footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.bb-landing-footer-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--bb-primary);
  border-radius: var(--bb-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bb-landing-footer-logo-icon i {
  font-size: 16px;
  color: white;
}

.bb-landing-footer-logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
}

.bb-landing-footer-about {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--bb-gray-400);
  margin-bottom: 20px;
}

.bb-landing-footer-social {
  display: flex;
  gap: 12px;
}

.bb-landing-footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--bb-radius-md);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bb-gray-400);
  transition: all var(--bb-fast);
  font-size: 14px;
}
.bb-landing-footer-social a:hover {
  background: var(--bb-primary);
  color: white;
}

.bb-landing-footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.bb-landing-footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bb-landing-footer-links a {
  font-size: 0.88rem;
  color: var(--bb-gray-400);
  transition: color var(--bb-fast);
}
.bb-landing-footer-links a:hover {
  color: white;
}

.bb-landing-footer-bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--bb-gray-500);
}

/* ---- Landing: Social Proof / Testimonials ---- */
.bb-landing-proof {
  padding: 80px 0;
  background: var(--bb-white);
}

.bb-landing-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}

.bb-landing-proof-card {
  background: var(--bb-bg);
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius-xl);
  padding: 28px;
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(16px);
}

.bb-landing-proof-card.bb-visible {
  opacity: 1;
  transform: translateY(0);
}

.bb-landing-proof-card:nth-child(2).bb-visible { transition-delay: 0.12s; }
.bb-landing-proof-card:nth-child(3).bb-visible { transition-delay: 0.24s; }

.bb-landing-proof-card:hover {
  box-shadow: var(--bb-shadow-lg);
  border-color: var(--bb-primary-200);
  transform: translateY(-4px);
}

.bb-landing-proof-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
}

.bb-landing-proof-stars i {
  color: #F59E0B;
  font-size: 14px;
}

.bb-landing-proof-text {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--bb-gray-700);
  margin-bottom: 20px;
  font-style: italic;
}

.bb-landing-proof-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bb-landing-proof-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--bb-radius-full);
  background: var(--bb-primary-light);
  color: var(--bb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.bb-landing-proof-name {
  display: block;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--bb-gray-900);
}

.bb-landing-proof-role {
  display: block;
  font-size: 0.78rem;
  color: var(--bb-gray-500);
}

/* ---- Landing: FAQ Section ---- */
.bb-landing-faq {
  padding: 80px 0;
  background: var(--bb-bg);
}

.bb-landing-faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bb-landing-faq-item {
  background: var(--bb-white);
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
}

.bb-landing-faq-item.bb-visible {
  opacity: 1;
  transform: translateY(0);
}

.bb-landing-faq-item:nth-child(2).bb-visible { transition-delay: 0.08s; }
.bb-landing-faq-item:nth-child(3).bb-visible { transition-delay: 0.16s; }
.bb-landing-faq-item:nth-child(4).bb-visible { transition-delay: 0.24s; }
.bb-landing-faq-item:nth-child(5).bb-visible { transition-delay: 0.32s; }
.bb-landing-faq-item:nth-child(6).bb-visible { transition-delay: 0.40s; }

.bb-landing-faq-item:hover {
  border-color: var(--bb-primary-200);
}

.bb-landing-faq-item.active {
  border-color: var(--bb-primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.08);
}

.bb-landing-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  gap: 16px;
}

.bb-landing-faq-question h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bb-gray-900);
  line-height: 1.4;
}

.bb-landing-faq-icon {
  font-size: 12px;
  color: var(--bb-gray-400);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.bb-landing-faq-item.active .bb-landing-faq-icon {
  transform: rotate(180deg);
  color: var(--bb-primary);
}

.bb-landing-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.bb-landing-faq-item.active .bb-landing-faq-answer {
  max-height: 300px;
}

.bb-landing-faq-answer p {
  padding: 0 24px 20px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--bb-gray-600);
}

/* ---- Landing Page Responsive ---- */
@media (max-width:1024px) {
  .bb-landing-features-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .bb-landing-steps { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; gap: 40px; }
  .bb-landing-steps::before { display: none; }
  .bb-landing-cta-content { flex-direction: column; text-align: center; }
  .bb-landing-cta-subtitle { margin: 0 auto; }
  .bb-landing-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .bb-landing-proof-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .bb-landing-faq-list { max-width: 100%; }
}

@media (max-width:768px) {
  .bb-landing-section-title { font-size: 1.5rem; }
  .bb-landing-section-subtitle { font-size: 0.95rem; }
  .bb-landing-features { padding: 64px 0; }
  .bb-landing-how { padding: 64px 0; }
  .bb-landing-cta { padding: 48px 0; }
  .bb-landing-cta-title { font-size: 1.35rem; }
  .bb-landing-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .bb-landing-footer-brand { max-width: 100%; }
  .bb-landing-hero { min-height: auto; }
  .bb-landing-hero .bb-auth-wrapper { min-height: auto; }
  .bb-landing-proof { padding: 64px 0; }
  .bb-landing-proof-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .bb-landing-faq { padding: 64px 0; }
  .bb-landing-faq-question h3 { font-size: 0.88rem; }
}

/* ---- Auth: Seamless Flat Card (Login Page) ---- */
.bb-auth-card-flat {
  background: transparent;
  border-radius: 0;
  padding: 40px 0;
  width: 100%;
  max-width: 400px;
  box-shadow: none;
  border: none;
}

.bb-auth-card-flat h2 {
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
  color: var(--bb-gray-900);
  margin-bottom: 6px;
}

/* Flat input fields: gray bg, subtle border, orange focus */
.bb-auth-card-flat .bb-input {
  background: var(--bb-gray-100);
  border: 1.5px solid var(--bb-gray-200);
  border-radius: var(--bb-radius-md);
  font-size: 0.9rem;
  color: var(--bb-gray-800);
  transition: all var(--bb-fast);
}

.bb-auth-card-flat .bb-input:focus {
  background: var(--bb-white);
  border-color: var(--bb-primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
  outline: none;
}

.bb-auth-card-flat .bb-input::placeholder {
  color: var(--bb-gray-400);
}

/* Flat select */
.bb-auth-card-flat .bb-select {
  background-color: var(--bb-gray-100);
  border: 1.5px solid var(--bb-gray-200);
}

/* ---- Legal / Static Page Nav Template ---- */
.bb-legal-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bb-white);
  border-bottom: 1px solid var(--bb-gray-200);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.bb-legal-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bb-gray-900);
}

.bb-legal-nav-brand:hover {
  color: var(--bb-gray-900);
}

.bb-legal-nav-brand-icon {
  width: 32px;
  height: 32px;
  background: var(--bb-primary);
  border-radius: var(--bb-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.bb-legal-nav-brand-text {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.bb-legal-nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bb-legal-nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--bb-gray-600);
  transition: color var(--bb-fast);
}

.bb-legal-nav-links a:hover {
  color: var(--bb-primary);
}

/* ---- Post Menu Dropdown ---- */
.bb-post-menu-dropdown {
  background: var(--bb-white);
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius-md);
  box-shadow: var(--bb-shadow-lg);
  min-width: 140px;
  padding: 4px 0;
  overflow: hidden;
}
.bb-post-menu-item {
  padding: 10px 16px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background var(--bb-fast);
  white-space: nowrap;
}
.bb-post-menu-item:hover {
  background: var(--bb-gray-50);
}
.bb-post-menu-danger {
  color: var(--bb-danger);
}
.bb-post-menu-danger:hover {
  background: #fef2f2;
}

/* ============================================
   Accessibility: focus visibility & reduced motion
   ============================================ */
*:focus { outline: none; }
*:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visually-hidden helper for screen-reader-only labels */
.bb-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   Static Pages — About, Contact, Help,
   Privacy, Terms
   ============================================ */

/* --- Header --- */
.bb-static-header {
  background: var(--bb-white);
  border-bottom: 1px solid var(--bb-gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.bb-static-header-inner {
  max-width: var(--bb-max-content);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bb-static-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bb-gray-900);
  font-weight: 800;
  font-size: 1.25rem;
}
.bb-static-header-logo .bb-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--bb-primary);
  border-radius: var(--bb-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}
.bb-static-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Main Layout --- */
.bb-static-main {
  padding: 48px 24px 64px;
}
.bb-static-container {
  max-width: var(--bb-max-content);
  margin: 0 auto;
}

/* --- Hero --- */
.bb-static-hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}
.bb-static-hero-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--bb-primary), var(--bb-primary-600));
  border-radius: var(--bb-radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(249,115,22,0.25);
}
.bb-static-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--bb-gray-900);
  line-height: 1.25;
  margin-bottom: 16px;
}
.bb-static-hero-subtitle {
  font-size: 1.05rem;
  color: var(--bb-gray-500);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto;
}
.bb-static-last-updated {
  font-size: 0.85rem;
  color: var(--bb-gray-400);
  margin-top: 8px;
}

/* --- Sections --- */
.bb-static-section {
  max-width: 800px;
  margin: 0 auto 40px;
}
.bb-static-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bb-gray-900);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bb-primary-200);
}
.bb-static-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--bb-gray-800);
  margin-bottom: 8px;
}
.bb-static-section p {
  font-size: 1rem;
  color: var(--bb-gray-600);
  line-height: 1.75;
  margin-bottom: 16px;
}
.bb-static-section p:last-child {
  margin-bottom: 0;
}

/* --- Mission Grid (3 columns) --- */
.bb-static-mission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.bb-static-mission-card {
  background: var(--bb-white);
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: box-shadow var(--bb-normal), transform var(--bb-normal);
}
.bb-static-mission-card:hover {
  box-shadow: var(--bb-shadow-lg);
  transform: translateY(-2px);
}
.bb-static-mission-icon {
  width: 48px;
  height: 48px;
  background: var(--bb-primary-100);
  border-radius: var(--bb-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--bb-primary);
  font-size: 1.25rem;
}

/* --- Values Grid (list style) --- */
.bb-static-values-grid {
  display: grid;
  gap: 24px;
}
.bb-static-value-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bb-white);
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius-lg);
  padding: 24px;
  transition: box-shadow var(--bb-normal);
}
.bb-static-value-item:hover {
  box-shadow: var(--bb-shadow-md);
}
.bb-static-value-item > [class*="fa-"] {
  font-size: 1.5rem;
  color: var(--bb-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.bb-static-value-item > div {
  flex: 1;
}
.bb-static-value-item h3 {
  margin-bottom: 4px;
}
.bb-static-value-item p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --- CTA --- */
.bb-static-cta {
  text-align: center;
  background: linear-gradient(135deg, var(--bb-primary-50), var(--bb-primary-100));
  border-radius: var(--bb-radius-xl);
  padding: 48px 32px;
  max-width: 800px;
  margin: 0 auto;
}
.bb-static-cta h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bb-gray-900);
  margin-bottom: 12px;
}
.bb-static-cta p {
  font-size: 1rem;
  color: var(--bb-gray-600);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 24px;
}
.bb-static-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Footer --- */
.bb-static-footer {
  border-top: 1px solid var(--bb-gray-200);
  background: var(--bb-white);
  padding: 24px;
}
.bb-static-footer-inner {
  max-width: var(--bb-max-content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.bb-static-footer-links {
  display: flex;
  gap: 20px;
}
.bb-static-footer-links a {
  color: var(--bb-gray-500);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--bb-fast);
}
.bb-static-footer-links a:hover {
  color: var(--bb-primary);
}
.bb-static-footer p {
  font-size: 0.85rem;
  color: var(--bb-gray-400);
}

/* --- Contact Grid --- */
.bb-static-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.bb-static-contact-card {
  background: var(--bb-white);
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius-lg);
  padding: 24px;
  text-align: center;
  transition: box-shadow var(--bb-normal);
}
.bb-static-contact-card:hover {
  box-shadow: var(--bb-shadow-md);
}
.bb-static-contact-icon {
  width: 44px;
  height: 44px;
  background: var(--bb-primary-100);
  border-radius: var(--bb-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--bb-primary);
  font-size: 1.1rem;
}

/* --- Form --- */
.bb-static-form {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.bb-static-form .bb-form-group {
  display: grid;
  gap: 6px;
}
.bb-static-form label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--bb-gray-700);
}
.bb-static-form input,
.bb-static-form textarea,
.bb-static-form select {
  font-family: var(--bb-font);
  font-size: 0.95rem;
  padding: 10px 14px;
  border: 1px solid var(--bb-gray-300);
  border-radius: var(--bb-radius-md);
  outline: none;
  transition: border-color var(--bb-fast), box-shadow var(--bb-fast);
  background: var(--bb-white);
  color: var(--bb-gray-800);
}
.bb-static-form input:focus,
.bb-static-form textarea:focus,
.bb-static-form select:focus {
  border-color: var(--bb-primary);
  box-shadow: 0 0 0 3px var(--bb-primary-100);
}
.bb-static-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- FAQ --- */
.bb-static-faq-list {
  display: grid;
  gap: 12px;
}
.bb-static-faq-item {
  background: var(--bb-white);
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius-md);
  padding: 16px 20px;
  cursor: pointer;
  transition: box-shadow var(--bb-fast);
}
.bb-static-faq-item:hover {
  box-shadow: var(--bb-shadow-sm);
}
.bb-static-faq-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bb-gray-800);
  margin-bottom: 4px;
}
.bb-static-faq-item p {
  font-size: 0.9rem;
  color: var(--bb-gray-500);
  margin-bottom: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .bb-static-hero h1 { font-size: 1.5rem; }
  .bb-static-hero { margin-bottom: 32px; padding: 0 8px; }
  .bb-static-main { padding: 32px 16px 48px; }
  .bb-static-section { max-width: 100%; }
  .bb-static-mission-grid { grid-template-columns: 1fr; }
  .bb-static-contact-grid { grid-template-columns: 1fr; }
  .bb-static-cta { padding: 32px 20px; }
  .bb-static-footer-inner { flex-direction: column; text-align: center; }
}

/* ---- Auth Modal ---- */
#bbAuthModal .bb-modal {
    max-width: 400px;
    text-align: center;
    padding: 40px 32px 32px;
}
.bb-auth-close {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: var(--bb-gray-100); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: var(--bb-gray-500); transition: all 0.2s;
}
.bb-auth-close:hover { background: var(--bb-gray-200); color: var(--bb-gray-700); }
.bb-auth-modal-icon {
    font-size: 48px; margin-bottom: 12px;
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--bb-primary-50, #FFF7ED);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.bb-auth-modal-icon i { color: var(--bb-primary, #F97316); }
#bbAuthModal h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 6px; color: var(--bb-gray-900); }
#bbAuthModal p { font-size: 0.85rem; color: var(--bb-gray-500); margin: 0 0 24px; line-height: 1.5; }
.bb-auth-modal-actions { display: flex; gap: 10px; justify-content: center; }
.bb-auth-modal-actions .bb-btn { min-width: 120px; }

/* ---- Campaign Cards ---- */
.bb-campaigns-layout {
    max-width: 1100px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 300px; gap: 24px;
}
.bb-campaigns-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px; padding: 0;
}

/* ---- Sidebar campaign mini-card (compact for sidebar widget) ---- */
.bb-campaign-mini-card {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 8px; margin: 0 -4px;
    border-radius: 8px; text-decoration: none; color: inherit;
    transition: background 0.15s;
}
.bb-campaign-mini-card:hover { background: rgba(249, 115, 22, 0.08); }
.bb-campaign-mini-thumb {
    width: 44px; height: 44px; border-radius: 8px;
    flex-shrink: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #F97316, #FB923C);
    color: white; font-size: 16px;
}
.bb-campaign-mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bb-campaign-mini-info { flex: 1; min-width: 0; }
.bb-campaign-mini-title {
    font-size: 0.83rem; font-weight: 600; color: var(--bb-gray-900);
    line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bb-campaign-mini-meta {
    font-size: 0.72rem; color: var(--bb-gray-500); margin-top: 1px;
    display: flex; align-items: center; gap: 6px;
}
.bb-campaign-mini-progress {
    height: 3px; background: var(--bb-gray-100);
    border-radius: 999px; overflow: hidden; margin-top: 5px;
}
.bb-campaign-mini-progress-bar {
    height: 100%; background: linear-gradient(90deg, #F97316, #FB923C);
    border-radius: 999px;
}
.bb-campaign-mini-featured {
    display: inline-flex; align-items: center; gap: 2px;
    font-size: 0.65rem; font-weight: 700; color: #92400E;
    background: #FEF3C7; padding: 1px 6px; border-radius: 999px;
    margin-left: 4px;
}
.bb-campaign-card {
    background: white; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: all 0.3s;
    border: 1px solid var(--bb-gray-200); display: flex; flex-direction: column;
}
.bb-campaign-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.bb-campaign-card-image {
    width: 100%; aspect-ratio: 16/9; object-fit: cover;
    background: var(--bb-gray-100);
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 48px;
}
.bb-campaign-card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.bb-campaign-card-creator {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.bb-campaign-card-creator img {
    width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
}
.bb-campaign-card-creator span { font-size: 0.8rem; color: var(--bb-gray-500); font-weight: 500; }
.bb-campaign-card-title {
    font-size: 0.95rem; font-weight: 700; color: var(--bb-gray-900);
    margin: 0 0 8px; line-height: 1.4; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bb-campaign-card-desc {
    font-size: 0.8rem; color: var(--bb-gray-500); line-height: 1.5;
    margin: 0 0 auto; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bb-campaign-progress {
    height: 4px; background: var(--bb-gray-200); border-radius: 999px;
    margin: 12px 0 8px; overflow: hidden;
}
.bb-campaign-progress-bar {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #F97316, #FB923C);
    transition: width 0.6s ease;
}
.bb-campaign-card-stats {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.75rem; color: var(--bb-gray-500);
}
.bb-campaign-card-stats .goal { font-weight: 600; color: var(--bb-gray-700); }
.bb-campaign-sidebar { position: sticky; top: 80px; align-self: start; }
.bb-campaign-sidebar-section {
    background: white; border-radius: 12px; padding: 20px;
    border: 1px solid var(--bb-gray-200); margin-bottom: 16px;
}
.bb-campaign-sidebar-section h3 {
    font-size: 0.95rem; font-weight: 700; margin: 0 0 12px; color: var(--bb-gray-900);
}

/* ---- Campaign Detail ---- */
.bb-campaign-detail { max-width: 800px; margin: 0 auto; }
.bb-campaign-hero {
    width: 100%; aspect-ratio: 16/9; border-radius: 16px;
    object-fit: cover; background: var(--bb-gray-100); margin-bottom: 24px;
}
.bb-campaign-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.bb-campaign-creator-info {
    display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.bb-campaign-creator-info img {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
}
.bb-campaign-creator-info .name {
    font-weight: 600; font-size: 0.9rem; color: var(--bb-gray-900);
    text-decoration: none;
}
.bb-campaign-creator-info .name:hover { color: var(--bb-primary); }
.bb-campaign-creator-info .followers {
    font-size: 0.75rem; color: var(--bb-gray-500);
}
.bb-campaign-main-title {
    font-size: 1.4rem; font-weight: 800; color: var(--bb-gray-900);
    margin: 0 0 16px; line-height: 1.3;
}
.bb-campaign-meta {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    padding: 16px 0; border-top: 1px solid var(--bb-gray-200);
    border-bottom: 1px solid var(--bb-gray-200); margin-bottom: 20px;
}
.bb-campaign-meta-item { text-align: center; }
.bb-campaign-meta-item .value {
    font-size: 1.1rem; font-weight: 700; color: var(--bb-gray-900);
}
.bb-campaign-meta-item .label {
    font-size: 0.75rem; color: var(--bb-gray-500); margin-top: 2px;
}
.bb-campaign-meta .progress-wide {
    flex: 1; min-width: 200px;
}
.bb-campaign-meta .progress-wide .bb-campaign-progress { margin: 4px 0; }
.bb-campaign-support-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 24px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
    border: 2px solid var(--bb-primary); cursor: pointer; transition: all 0.2s;
    color: var(--bb-primary); background: white;
}
.bb-campaign-support-btn:hover { background: var(--bb-primary); color: white; }
.bb-campaign-support-btn.supported { background: var(--bb-primary); color: white; }
.bb-campaign-desc {
    font-size: 0.95rem; line-height: 1.7; color: var(--bb-gray-700);
    white-space: pre-wrap; margin-bottom: 32px;
}
.bb-campaign-supporters-title {
    font-size: 1rem; font-weight: 700; margin: 0 0 12px; color: var(--bb-gray-900);
}
.bb-campaign-supporters-grid {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.bb-campaign-supporter {
    width: 40px; height: 40px; border-radius: 50%;
    object-fit: cover; border: 2px solid white; box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.bb-campaign-supporter-more {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bb-gray-100); display: flex;
    align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 600; color: var(--bb-gray-500);
}

/* ---- Create Campaign Form ---- */
.bb-campaign-form { max-width: 600px; margin: 0 auto; }
.bb-campaign-form h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; }
.bb-campaign-form .subtitle { font-size: 0.85rem; color: var(--bb-gray-500); margin: 0 0 24px; }
.bb-campaign-form-group { margin-bottom: 20px; }
.bb-campaign-form-group label {
    display: block; font-size: 0.85rem; font-weight: 600; color: var(--bb-gray-700);
    margin-bottom: 6px;
}
.bb-campaign-form-group input[type="text"],
.bb-campaign-form-group input[type="number"],
.bb-campaign-form-group select,
.bb-campaign-form-group textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--bb-gray-300);
    border-radius: 8px; font-size: 0.9rem; font-family: inherit;
    background: white; box-sizing: border-box;
}
.bb-campaign-form-group input:focus,
.bb-campaign-form-group textarea:focus { border-color: var(--bb-primary); outline: none; }
.bb-campaign-form-group textarea { resize: vertical; min-height: 120px; }
.bb-campaign-upload-zone {
    border: 2px dashed var(--bb-gray-300); border-radius: 12px;
    padding: 32px; text-align: center; cursor: pointer; transition: all 0.2s;
    background: var(--bb-gray-50); position: relative;
}
.bb-campaign-upload-zone:hover { border-color: var(--bb-primary); background: var(--bb-primary-50, #FFF7ED); }
.bb-campaign-upload-zone.has-image { padding: 4px; }
.bb-campaign-upload-zone img { max-width: 100%; max-height: 300px; border-radius: 8px; }
.bb-campaign-upload-zone input { display: none; }
.bb-campaign-upload-icon { font-size: 32px; color: var(--bb-gray-400); margin-bottom: 8px; }
.bb-campaign-upload-text { font-size: 0.85rem; color: var(--bb-gray-500); }
.bb-campaign-eligible-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
    background: #ECFDF5; color: #059669; margin-bottom: 20px;
}
.bb-campaign-locked-state {
    text-align: center; padding: 60px 20px;
}
.bb-campaign-locked-icon { font-size: 48px; color: var(--bb-gray-300); margin-bottom: 12px; }
.bb-campaign-locked-title { font-size: 1.2rem; font-weight: 700; color: var(--bb-gray-900); margin-bottom: 8px; }
.bb-campaign-locked-desc { font-size: 0.9rem; color: var(--bb-gray-500); max-width: 400px; margin: 0 auto; }
.bb-campaign-locked-progress {
    max-width: 300px; margin: 20px auto;
}
.bb-campaign-locked-progress .bb-campaign-progress { height: 6px; }
.bb-campaign-locked-progress .progress-text {
    font-size: 0.8rem; color: var(--bb-gray-500); margin-top: 6px;
}

/* ---- Profile Campaign Tab ---- */
.bb-profile-campaigns {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px; padding: 16px 0;
}

/* ---- Static Header (for guest public pages) ---- */
.bb-guest-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; height: 56px; background: white;
    border-bottom: 1px solid var(--bb-gray-200); position: fixed;
    top: 0; left: 0; right: 0; z-index: 100;
}
.bb-guest-header-logo {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: var(--bb-gray-900); font-weight: 800; font-size: 1.1rem;
}
.bb-guest-header-logo .bb-logo-icon { font-size: 20px; }
.bb-guest-header-actions { display: flex; align-items: center; gap: 10px; }
.bb-guest-main { padding-top: 56px; }

/* Responsive */
@media (max-width: 768px) {
    .bb-campaigns-layout { grid-template-columns: 1fr; }
    .bb-campaigns-grid { grid-template-columns: 1fr; }
    .bb-campaign-header { flex-direction: column; }
    .bb-campaign-meta .progress-wide { min-width: 100%; }
    .bb-campaign-form { padding: 0 12px; }
    .bb-profile-campaigns { grid-template-columns: 1fr; }
}

/* ============================================
   Admin Panel
   ============================================ */

.bb-admin-page { background: var(--bb-gray-50); min-height: 100vh; }

.bb-admin-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white; padding: 32px 0 64px; margin-bottom: -48px;
    position: relative; overflow: hidden;
}
.bb-admin-header::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(249,115,22,0.15), transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(249,115,22,0.1), transparent 50%);
    pointer-events: none;
}
.bb-admin-header h1 {
    color: white; font-size: 1.875rem; font-weight: 800; margin: 0 0 6px;
    display: flex; align-items: center; gap: 12px; position: relative;
}
.bb-admin-header h1 i { color: var(--bb-primary); }
.bb-admin-header p {
    color: rgba(255,255,255,0.7); margin: 0; font-size: 0.95rem; position: relative;
}
.bb-admin-tabs {
    display: flex; gap: 4px; margin-top: 24px; flex-wrap: wrap; position: relative;
}
.bb-admin-tab {
    padding: 10px 18px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7);
    border-radius: var(--bb-radius-md); text-decoration: none; font-weight: 600;
    font-size: 0.9rem; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}
.bb-admin-tab:hover { background: rgba(255,255,255,0.15); color: white; }
.bb-admin-tab.active { background: var(--bb-primary); color: white; border-color: var(--bb-primary); }
.bb-admin-tab .bb-tab-count {
    background: rgba(255,255,255,0.25); padding: 2px 8px; border-radius: 9999px;
    font-size: 0.75rem; font-weight: 700;
}
.bb-admin-tab.active .bb-tab-count { background: rgba(255,255,255,0.3); }

.bb-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px; margin-bottom: 28px;
}
.bb-stat-card {
    background: white; border-radius: var(--bb-radius-lg); padding: 22px;
    box-shadow: var(--bb-shadow-sm); border: 1px solid var(--bb-gray-200);
    display: flex; align-items: flex-start; gap: 16px;
    transition: all 0.2s;
}
.bb-stat-card:hover { box-shadow: var(--bb-shadow-md); transform: translateY(-1px); }
.bb-stat-icon {
    width: 48px; height: 48px; border-radius: var(--bb-radius-md);
    display: flex; align-items: center; justify-content: center; font-size: 22px;
    flex-shrink: 0;
}
.bb-stat-icon.orange { background: var(--bb-primary-light); color: var(--bb-primary); }
.bb-stat-icon.blue   { background: #DBEAFE; color: var(--bb-info); }
.bb-stat-icon.green  { background: #DCFCE7; color: var(--bb-success); }
.bb-stat-icon.red    { background: #FEE2E2; color: var(--bb-danger); }
.bb-stat-icon.purple { background: #F3E8FF; color: #A855F7; }
.bb-stat-icon.yellow { background: #FEF3C7; color: var(--bb-warning); }
.bb-stat-content { flex: 1; min-width: 0; }
.bb-stat-label { font-size: 0.8rem; color: var(--bb-gray-500); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.bb-stat-value { font-size: 1.75rem; font-weight: 800; color: var(--bb-gray-900); line-height: 1.1; margin: 4px 0 0; }
.bb-stat-trend { font-size: 0.8rem; color: var(--bb-gray-500); margin-top: 4px; }
.bb-stat-trend.up { color: var(--bb-success); }
.bb-stat-trend.down { color: var(--bb-danger); }

.bb-admin-section {
    background: white; border-radius: var(--bb-radius-lg); padding: 24px;
    box-shadow: var(--bb-shadow-sm); border: 1px solid var(--bb-gray-200);
    margin-bottom: 20px;
}
.bb-admin-section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px; flex-wrap: wrap; gap: 12px;
}
.bb-admin-section-title {
    font-size: 1.1rem; font-weight: 700; color: var(--bb-gray-900);
    margin: 0; display: flex; align-items: center; gap: 8px;
}
.bb-admin-section-title i { color: var(--bb-primary); }
.bb-admin-section-link {
    color: var(--bb-primary); text-decoration: none; font-weight: 600;
    font-size: 0.875rem; display: inline-flex; align-items: center; gap: 4px;
}
.bb-admin-section-link:hover { text-decoration: underline; }

.bb-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.bb-table thead th {
    text-align: left; padding: 12px 14px; font-weight: 600; color: var(--bb-gray-600);
    background: var(--bb-gray-50); border-bottom: 1px solid var(--bb-gray-200);
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
    white-space: nowrap;
}
.bb-table tbody td {
    padding: 14px; border-bottom: 1px solid var(--bb-gray-100);
    vertical-align: middle;
}
.bb-table tbody tr:last-child td { border-bottom: none; }
.bb-table tbody tr:hover { background: var(--bb-gray-50); }
.bb-table .bb-table-user { display: flex; align-items: center; gap: 10px; }
.bb-table .bb-table-user-info { display: flex; flex-direction: column; }
.bb-table .bb-table-user-name { font-weight: 600; color: var(--bb-gray-900); }
.bb-table .bb-table-user-meta { font-size: 0.78rem; color: var(--bb-gray-500); }
.bb-table .bb-table-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bb-table .bb-table-empty {
    text-align: center; padding: 48px 20px; color: var(--bb-gray-500);
}
.bb-table .bb-table-empty i { font-size: 2rem; opacity: 0.4; margin-bottom: 8px; display: block; }

.bb-status-pill {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
    border-radius: 9999px; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.bb-status-pill.pending  { background: #FEF3C7; color: #92400E; }
.bb-status-pill.active   { background: #DCFCE7; color: #166534; }
.bb-status-pill.approved { background: #DCFCE7; color: #166534; }
.bb-status-pill.paused   { background: #DBEAFE; color: #1E40AF; }
.bb-status-pill.completed{ background: #E0E7FF; color: #3730A3; }
.bb-status-pill.cancelled,
.bb-status-pill.rejected { background: #FEE2E2; color: #991B1B; }
.bb-status-pill.reviewed { background: #DCFCE7; color: #166534; }
.bb-status-pill.dismissed{ background: var(--bb-gray-200); color: var(--bb-gray-700); }
.bb-status-pill.open     { background: #FEF3C7; color: #92400E; }
.bb-status-pill.resolved { background: #DCFCE7; color: #166534; }

.bb-role-pill {
    display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--bb-radius-sm);
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; vertical-align: middle; line-height: 1.2;
}
.bb-role-pill.user  { background: var(--bb-gray-200); color: var(--bb-gray-700); }
.bb-role-pill.moderator { background: #DBEAFE; color: #1E40AF; }
.bb-role-pill.admin { background: #FEF3C7; color: #92400E; }

div.bb-search-bar { position: relative; min-width: 240px; flex: 1; max-width: 360px; border: none; padding: 0; background: transparent; }
div.bb-search-bar input {
    width: 100%; padding: 10px 14px 10px 38px; border: 1px solid var(--bb-gray-300);
    border-radius: var(--bb-radius-md); font-size: 0.9rem; background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}
div.bb-search-bar input:focus { outline: none; border-color: var(--bb-primary); box-shadow: 0 0 0 3px var(--bb-primary-light); }
div.bb-search-bar i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--bb-gray-400); font-size: 0.9rem;
}

.bb-campaign-card {
    display: grid; grid-template-columns: 80px 1fr auto; gap: 16px;
    padding: 16px; border: 1px solid var(--bb-gray-200); border-radius: var(--bb-radius-md);
    margin-bottom: 12px; align-items: center; background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.bb-campaign-card:hover { border-color: var(--bb-primary); box-shadow: var(--bb-shadow-sm); }
.bb-campaign-card > img {
    width: 80px; height: 80px; object-fit: cover; border-radius: var(--bb-radius-sm);
    background: var(--bb-gray-100);
}
.bb-campaign-card-info h4 { margin: 0 0 4px; font-size: 1rem; font-weight: 700; color: var(--bb-gray-900); }
.bb-campaign-card-info p { margin: 0 0 8px; font-size: 0.85rem; color: var(--bb-gray-600); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bb-campaign-card-meta { display: flex; gap: 14px; font-size: 0.78rem; color: var(--bb-gray-500); flex-wrap: wrap; }
.bb-campaign-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.bb-campaign-card-actions { display: flex; flex-direction: column; gap: 6px; }
.bb-campaign-card-actions .bb-btn { font-size: 0.82rem; padding: 7px 12px; }

.bb-admin-empty {
    text-align: center; padding: 60px 20px; color: var(--bb-gray-500);
}
.bb-admin-empty i { font-size: 3rem; opacity: 0.3; display: block; margin-bottom: 12px; color: var(--bb-success); }
.bb-admin-empty h3 { color: var(--bb-gray-700); font-size: 1.1rem; margin: 0 0 6px; font-weight: 700; }
.bb-admin-empty p { margin: 0; font-size: 0.9rem; }

.bb-admin-toolbar {
    display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap;
}

.bb-pagination {
    display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap;
}
.bb-pagination a, .bb-pagination span {
    padding: 8px 14px; border: 1px solid var(--bb-gray-300); border-radius: var(--bb-radius-sm);
    color: var(--bb-gray-700); text-decoration: none; font-size: 0.875rem; font-weight: 500;
    background: white; transition: all 0.15s;
}
.bb-pagination a:hover { background: var(--bb-gray-50); border-color: var(--bb-gray-400); }
.bb-pagination .active { background: var(--bb-primary); color: white; border-color: var(--bb-primary); }
.bb-pagination .disabled { opacity: 0.5; pointer-events: none; }

@media (max-width: 768px) {
    .bb-admin-header h1 { font-size: 1.5rem; }
    .bb-admin-section { padding: 16px; }
    .bb-campaign-card { grid-template-columns: 60px 1fr; }
    .bb-campaign-card > img { width: 60px; height: 60px; }
    .bb-campaign-card-actions { grid-column: 1 / -1; flex-direction: row; }
    .bb-campaign-card-actions .bb-btn { flex: 1; }
    .bb-table thead { display: none; }
    .bb-table tbody td { display: block; padding: 6px 14px; border: none; }
    .bb-table tbody td:first-child { padding-top: 14px; }
    .bb-table tbody td:last-child { padding-bottom: 14px; }
    .bb-table tbody tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--bb-gray-200); }
    .bb-table .bb-table-actions { margin-top: 8px; }
    .bb-table .bb-table-user { padding: 0; }
    .bb-admin-page .bb-nav li[data-mobile-nav="show"] { display: none !important; }
    .bb-admin-page .bb-nav li[data-mobile-profile="1"] { display: none !important; }
    .bb-admin-page .bb-main { padding-bottom: 24px; }
}

/* ---- Admin Dashboard ---- */
.bb-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.bb-stat-card {
    display: flex;
    gap: 14px;
    align-items: center;
    background: var(--bb-white);
    border: 1px solid var(--bb-gray-200);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}
.bb-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.bb-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}
.bb-stat-info { flex: 1; min-width: 0; }
.bb-stat-value { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.bb-stat-label { font-size: 0.85rem; color: var(--bb-gray-600); margin-top: 2px; }
.bb-stat-sub { font-size: 0.75rem; color: var(--bb-gray-500); margin-top: 4px; }

.bb-admin-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 900px) {
    .bb-admin-grid-2col { grid-template-columns: 1fr; }
}

.bb-admin-card {
    background: var(--bb-white);
    border: 1px solid var(--bb-gray-200);
    border-radius: 12px;
    overflow: hidden;
}
.bb-admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--bb-gray-200);
}
.bb-admin-card-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bb-admin-list { padding: 4px 8px; }
.bb-admin-list-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    cursor: pointer;
}
a.bb-admin-list-item:hover {
    background: var(--bb-gray-50);
}
.bb-admin-list-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bb-gray-100);
}
.bb-admin-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bb-admin-list-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F97316, #FB923C);
    color: white;
    font-size: 20px;
}
.bb-admin-list-info { flex: 1; min-width: 0; }
.bb-admin-list-title {
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bb-admin-list-meta {
    font-size: 0.78rem;
    color: var(--bb-gray-500);
    margin-top: 2px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.bb-admin-list-sub {
    font-size: 0.78rem;
    color: var(--bb-gray-600);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.bb-admin-list-chevron {
    color: var(--bb-gray-300);
    flex-shrink: 0;
}
.bb-mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.bb-admin-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--bb-gray-500);
}
.bb-admin-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
    color: var(--bb-gray-300);
}
.bb-admin-empty h3 { margin: 0 0 4px; color: var(--bb-gray-700); }
.bb-admin-empty p { margin: 0; font-size: 0.9rem; }

.bb-admin-user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    padding: 8px;
}
.bb-admin-user-card {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.bb-admin-user-card:hover { background: var(--bb-gray-50); }
.bb-admin-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.bb-admin-user-info { flex: 1; min-width: 0; }
.bb-admin-user-name {
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    gap: 4px;
    align-items: center;
}
.bb-admin-user-handle {
    font-size: 0.78rem;
    color: var(--bb-gray-500);
}
.bb-admin-user-meta {
    font-size: 0.72rem;
    color: var(--bb-gray-500);
    margin-top: 2px;
}

.bb-admin-user-stats {
    display: flex;
    gap: 18px;
    margin-top: 8px;
}
.bb-admin-user-stats > div {
    display: flex;
    flex-direction: column;
}
.bb-admin-user-stats strong {
    font-size: 1.05rem;
    font-weight: 800;
}
.bb-admin-user-stats span {
    font-size: 0.7rem;
    color: var(--bb-gray-500);
}

.bb-admin-filters {
    display: flex;
    gap: 4px;
    background: var(--bb-gray-100);
    padding: 4px;
    border-radius: 10px;
    width: fit-content;
}
.bb-admin-filter {
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--bb-gray-700);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}
.bb-admin-filter:hover { background: var(--bb-white); }
.bb-admin-filter.active {
    background: var(--bb-white);
    color: var(--bb-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ---- Campaign review layout ---- */
.bb-campaign-review-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}
@media (max-width: 1024px) {
    .bb-campaign-review-layout { grid-template-columns: 1fr; }
}
.bb-campaign-review-main {
    background: var(--bb-white);
    border: 1px solid var(--bb-gray-200);
    border-radius: 12px;
    overflow: hidden;
}
.bb-campaign-review-hero {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bb-gray-100);
    position: relative;
    overflow: hidden;
}
.bb-campaign-review-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bb-campaign-review-hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F97316, #FB923C);
    color: white;
    font-size: 64px;
    opacity: 0.7;
}
.bb-campaign-review-status-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
}
.bb-campaign-review-body { padding: 24px; }
.bb-campaign-review-description {
    background: var(--bb-gray-50);
    padding: 16px;
    border-radius: 10px;
    line-height: 1.6;
    color: var(--bb-gray-700);
    font-size: 0.95rem;
}
.bb-campaign-review-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---- Moderator / Admin disabled-state indicators ---- */
.bb-post-detail-add-comment.disabled {
    background: var(--bb-gray-50);
}
.bb-post-detail-action-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}
.bb-disabled-flag {
    font-size: 0.68rem;
    color: var(--bb-gray-400);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* ---- Donation Modal ---- */
.bb-donate-preset {
    padding: 10px;
    border: 1px solid var(--bb-gray-200);
    border-radius: 8px;
    background: var(--bb-white);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--bb-gray-700);
}
.bb-donate-preset:hover {
    border-color: var(--bb-primary);
    background: var(--bb-primary-light, #FFF7ED);
    color: var(--bb-primary);
}
.bb-donate-preset.active {
    border-color: var(--bb-primary);
    background: var(--bb-primary);
    color: white;
}

/* ---- Wallet Page ---- */
.bb-wallet-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .bb-wallet-layout { grid-template-columns: 1fr; }
}
.bb-wallet-card {
    background: var(--bb-white);
    border: 1px solid var(--bb-gray-200);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bb-wallet-card.primary {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
}
.bb-wallet-card.primary .bb-wallet-label { color: rgba(255,255,255,0.6); }
.bb-wallet-amount {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
}
.bb-wallet-label {
    font-size: 0.82rem;
    color: var(--bb-gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.bb-wallet-table {
    width: 100%;
    border-collapse: collapse;
}
.bb-wallet-table th {
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--bb-gray-500);
    text-transform: uppercase;
    padding: 10px 0;
    border-bottom: 2px solid var(--bb-gray-200);
}
.bb-wallet-table td {
    font-size: 0.85rem;
    padding: 12px 0;
    border-bottom: 1px solid var(--bb-gray-100);
    vertical-align: middle;
}
.bb-wallet-table td:last-child { text-align: right; }
.bb-wallet-table tr:last-child td { border-bottom: none; }

/* Withdraw modal */
.bb-withdraw-preset {
    padding: 14px;
    border: 2px dashed var(--bb-gray-200);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--bb-gray-600);
}
.bb-withdraw-preset:hover {
    border-color: var(--bb-primary);
    background: var(--bb-primary-light, #FFF7ED);
    color: var(--bb-primary);
}
.bb-withdraw-preset .amount {
    font-size: 1.3rem;
    font-weight: 800;
    display: block;
}
.bb-withdraw-preset .label {
    font-size: 0.75rem;
    color: var(--bb-gray-500);
}

/* Status pills for withdrawals */
.bb-status-pill.pending { background: #FEF3C7; color: #92400E; }
.bb-status-pill.processing { background: #DBEAFE; color: #1E40AF; }
.bb-status-pill.completed { background: #D1FAE5; color: #065F46; }
.bb-status-pill.rejected { background: #FEE2E2; color: #991B1B; }
.bb-status-pill.cancelled { background: #F3F4F6; color: #6B7280; }

/* ---- Global Sidebar Search ---- */
.bb-sidebar-search {
    padding: 8px 12px 4px;
}
.bb-sidebar-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bb-gray-100);
    border-radius: 10px;
    padding: 8px 12px;
    transition: background 0.15s;
}
.bb-sidebar-search-form:focus-within {
    background: var(--bb-white);
    box-shadow: 0 0 0 2px var(--bb-primary);
}
.bb-sidebar-search-form i {
    color: var(--bb-gray-400);
    font-size: 14px;
    flex-shrink: 0;
}
.bb-sidebar-search-form input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.82rem;
    color: var(--bb-gray-700);
    width: 100%;
    min-width: 0;
}
.bb-sidebar-search-form input::placeholder {
    color: var(--bb-gray-400);
}

/* ---- Search Suggest Dropdown ---- */
.bb-search-suggest {
    position: fixed;
    width: 320px;
    background: var(--bb-white);
    border: 1px solid var(--bb-gray-200);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 9999;
    overflow: hidden;
    margin-top: 4px;
}
.bb-search-suggest-section {
    border-bottom: 1px solid var(--bb-gray-100);
    padding: 6px 0;
}
.bb-search-suggest-section:last-child { border-bottom: none; }
.bb-search-suggest-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--bb-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 14px 2px;
}
.bb-search-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    text-decoration: none;
    color: inherit;
    font-size: 0.85rem;
    transition: background 0.1s;
}
.bb-search-suggest-item:hover,
.bb-search-suggest-item.active {
    background: var(--bb-gray-50);
}
.bb-search-suggest-item img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.bb-search-suggest-item i {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bb-gray-100);
    border-radius: 6px;
    color: var(--bb-gray-500);
    flex-shrink: 0;
}
.bb-search-suggest-footer {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bb-primary);
    text-decoration: none;
    border-top: 1px solid var(--bb-gray-100);
}
.bb-search-suggest-footer:hover {
    background: var(--bb-primary-50);
}
.bb-search-suggest-empty {
    padding: 20px;
    text-align: center;
    color: var(--bb-gray-500);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .bb-sidebar-search { display: none; }
    .bb-search-suggest { left: 8px !important; right: 8px !important; width: auto !important; }
}

/* Prevent background scrolling completely when modal / bottom sheet is active */
html.modal-open,
body.modal-open {
    overflow: hidden !important;
    height: 100% !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
}

#postModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999 !important;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    touch-action: none;
    overscroll-behavior: none;
}

.bb-post-modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    touch-action: none;
}

.bb-post-modal-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(0,0,0,0.5);
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 100002;
    transition: background 0.2s, transform 0.2s;
}
.bb-post-modal-close:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

/* Desktop Split Modal */
.bb-post-modal-dialog {
    display: flex;
    flex-direction: row;
    width: 95vw;
    max-width: 1080px;
    height: 88vh;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    z-index: 100001;
    animation: bbScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bbScaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.bb-post-modal-media {
    flex: 1.35;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.bb-post-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bb-post-modal-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 360px;
    max-width: 440px;
    background: #ffffff;
    border-left: 1px solid var(--bb-gray-200);
}

.bb-post-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--bb-gray-200);
    background: #ffffff;
    flex-shrink: 0;
}

.bb-post-modal-comments-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    background: #ffffff;
}

.bb-post-modal-footer {
    border-top: 1px solid var(--bb-gray-200);
    background: #ffffff;
    flex-shrink: 0;
}

.modal-comment-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--bb-gray-100);
}
.modal-comment-input input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9rem;
    background: transparent;
}
.modal-comment-input button {
    background: none;
    border: none;
    color: var(--bb-primary);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: opacity 0.2s;
}
.modal-comment-input button:hover {
    opacity: 0.8;
}

/* Mobile Bottom Sheet Drawer */
.bb-mobile-comments-sheet {
    display: none;
}

@media (max-width: 768px) {
    .bb-post-modal-dialog {
        display: none !important;
    }
    .bb-post-modal-close {
        display: none !important;
    }
    .bb-mobile-comments-sheet {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 82vh;
        max-height: 88vh;
        background: #ffffff;
        border-radius: 20px 20px 0 0;
        z-index: 100001;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
        animation: bbSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        overflow: hidden;
    }

    @keyframes bbSlideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .bb-mobile-sheet-handle {
        width: 40px;
        height: 5px;
        background: var(--bb-gray-300);
        border-radius: 999px;
        margin: 10px auto 4px;
        flex-shrink: 0;
    }

    .bb-mobile-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 18px 12px;
        border-bottom: 1px solid var(--bb-gray-200);
        flex-shrink: 0;
    }
    .bb-mobile-sheet-header h3 {
        font-size: 1.05rem;
        font-weight: 700;
        margin: 0;
        color: var(--bb-dark);
    }
    .bb-mobile-sheet-close {
        background: none;
        border: none;
        font-size: 1.2rem;
        color: var(--bb-gray-500);
        cursor: pointer;
        padding: 4px 8px;
    }

    .bb-mobile-sheet-comments {
        flex: 1;
        overflow-y: auto;
        padding: 14px 18px;
        -webkit-overflow-scrolling: touch;
    }

    .bb-mobile-sheet-input {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 18px;
        border-top: 1px solid var(--bb-gray-200);
        background: #ffffff;
        flex-shrink: 0;
    }
    .bb-mobile-sheet-input input {
        flex: 1;
        border: 1px solid var(--bb-gray-300);
        border-radius: 20px;
        padding: 8px 14px;
        font-size: 0.9rem;
        outline: none;
    }
    .bb-mobile-sheet-input button {
        background: var(--bb-primary);
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 20px;
        font-weight: 600;
        font-size: 0.88rem;
        cursor: pointer;
    }
}

