/* byJJ Pro polish — additive only. Remove this file link to undo theme polish. */
body.theme-byjj,
body.theme-old {
  --bg-primary: #f7f7f8;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --foreground: #0a0a0a;
  --muted-foreground: #52525b;
  --primary: #0a0a0a;
  --primary-rgb: 10, 10, 10;
  --primary-foreground: #ffffff;
  --border: #e4e4e7;
  --muted: #f4f4f5;
  --input: #ffffff;
  --accent: #18181b;
  --radius-card: 1rem;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  background:
    radial-gradient(900px 420px at 0% -5%, rgba(0, 0, 0, 0.035), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(0, 0, 0, 0.025), transparent 50%),
    #f7f7f8;
  background-attachment: fixed;
  letter-spacing: -0.011em;
}

body.theme-byjj::after,
body.theme-old::after {
  opacity: 0.28;
  background-size: 56px 56px;
}

body.theme-byjj .red-stars .star,
body.theme-old .red-stars .star {
  opacity: 0.55;
  width: 1.5px;
  height: 1.5px;
}

body.theme-byjj .sidebar,
body.theme-old .sidebar {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid rgba(0, 0, 0, 0.07) !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.03);
}

body.theme-byjj .sidebar-header,
body.theme-old .sidebar-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

body.theme-byjj .nav-link,
body.theme-old .nav-link {
  border-radius: 0.65rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, color 0.15s ease;
  overflow: hidden;
}

body.theme-byjj .nav-link:hover,
body.theme-old .nav-link:hover {
  background: rgba(0, 0, 0, 0.04) !important;
}

body.theme-byjj .nav-link.active,
body.theme-old .nav-link.active {
  background: #0a0a0a !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
  border-color: transparent !important;
}

/* Full black pill already marks active — hide left accent bar that bled past radius */
body.theme-byjj .nav-link::before,
body.theme-old .nav-link::before,
body.theme-byjj .nav-link.active::before,
body.theme-old .nav-link.active::before {
  display: none !important;
  transform: none !important;
  box-shadow: none !important;
}

body.theme-byjj .card,
body.theme-old .card,
body.theme-byjj .dash-card,
body.theme-old .dash-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-card) !important;
}

body.theme-byjj .card:hover,
body.theme-old .card:hover,
body.theme-byjj .dash-card:hover,
body.theme-old .dash-card:hover {
  transform: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 12px 28px rgba(0, 0, 0, 0.07) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

body.theme-byjj h1,
body.theme-old h1 {
  letter-spacing: -0.035em;
  font-weight: 800;
}

body.theme-byjj h2,
body.theme-old h2 {
  letter-spacing: -0.025em;
  font-weight: 750;
}

body.theme-byjj .btn,
body.theme-byjj button.btn,
body.theme-old .btn,
body.theme-old button.btn {
  border-radius: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.theme-byjj input,
body.theme-byjj select,
body.theme-byjj textarea,
body.theme-old input,
body.theme-old select,
body.theme-old textarea {
  border-radius: 0.65rem !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.theme-byjj input:focus,
body.theme-byjj select:focus,
body.theme-byjj textarea:focus,
body.theme-old input:focus,
body.theme-old select:focus,
body.theme-old textarea:focus {
  border-color: rgba(0, 0, 0, 0.35) !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06) !important;
  outline: none;
}

body.theme-byjj .main-content,
body.theme-old .main-content,
body.theme-byjj .content,
body.theme-old .content {
  position: relative;
  z-index: 1;
}

/* Profile / section icon tiles */
body.theme-byjj .card .w-10.h-10,
body.theme-old .card .w-10.h-10,
body.theme-byjj .card .w-8.h-8,
body.theme-old .card .w-8.h-8 {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

body.theme-byjj .fas,
body.theme-byjj .far,
body.theme-byjj .fab,
body.theme-old .fas,
body.theme-old .far,
body.theme-old .fab {
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  line-height: 1;
}

/* Hamburger removed — not needed */
.mobile-menu-toggle,
.sidebar-toggle {
  display: none !important;
}

/* Top bar chips back to the right + tighter */
body.theme-byjj .top-bar,
body.theme-old .top-bar {
  justify-content: flex-end !important;
  padding: 0.65rem 1.25rem !important;
  gap: 0.5rem;
}

body.theme-byjj .top-bar-content,
body.theme-old .top-bar-content {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem !important;
}

body.theme-byjj .top-bar .user-info,
body.theme-old .top-bar .user-info {
  padding: 0.28rem 0.45rem 0.28rem 0.65rem !important;
  gap: 0.45rem !important;
  border-radius: 0.55rem !important;
  font-size: 0.8rem !important;
}

body.theme-byjj .top-bar .username,
body.theme-old .top-bar .username {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
}

body.theme-byjj .top-bar .user-rank,
body.theme-old .top-bar .user-rank {
  padding: 0.18rem 0.5rem !important;
  font-size: 0.72rem !important;
  border-radius: 0.4rem !important;
}

body.theme-byjj .cat-toggle-btn,
body.theme-old .cat-toggle-btn {
  padding: 0.32rem 0.65rem !important;
  border-radius: 0.55rem !important;
  font-size: 0.78rem !important;
  gap: 0.4rem !important;
}

/* Public pages */
body.theme-byjj .public-nav a,
body.theme-old .public-nav a {
  border-radius: 999px;
  font-weight: 600;
}

/* Admin tools sub-nav — keep inactive tabs light, active solid black */
body.theme-byjj nav[aria-label="Admin tools"] a,
body.theme-old nav[aria-label="Admin tools"] a {
  background: #ffffff !important;
  color: #52525b !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 0.55rem !important;
  box-shadow: none !important;
}
body.theme-byjj nav[aria-label="Admin tools"] a:hover,
body.theme-old nav[aria-label="Admin tools"] a:hover {
  background: #f4f4f5 !important;
  color: #0a0a0a !important;
}
body.theme-byjj nav[aria-label="Admin tools"] a.bg-primary,
body.theme-old nav[aria-label="Admin tools"] a.bg-primary {
  background: #0a0a0a !important;
  color: #ffffff !important;
  border-color: #0a0a0a !important;
}

/* Stat / filter cards must never inherit black button paint */
body.theme-byjj .admin-stat-btn,
body.theme-old .admin-stat-btn,
body.theme-byjj button.admin-stat-btn,
body.theme-old button.admin-stat-btn,
body.theme-byjj button.admin-stat-btn:hover,
body.theme-old button.admin-stat-btn:hover,
body.theme-byjj button.admin-stat-btn:focus,
body.theme-old button.admin-stat-btn:focus {
  background: #ffffff !important;
  color: #0a0a0a !important;
  box-shadow: none !important;
  transform: none !important;
}

body.theme-byjj button.admin-menu-btn,
body.theme-old button.admin-menu-btn,
body.theme-byjj button.admin-menu-btn:hover,
body.theme-old button.admin-menu-btn:hover {
  background: #ffffff !important;
  color: #0a0a0a !important;
  border: 1px solid rgba(0, 0, 0, 0.14) !important;
  box-shadow: none !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  body.theme-byjj .red-stars .star,
  body.theme-old .red-stars .star {
    animation: none !important;
    display: none;
  }
}
