

:root {
  --bg-base: #0a0514;
  --bg-surface: #120a1f;
  --bg-glass: rgba(26, 15, 40, 0.6);
  --purple-primary: #a855f7;
  --purple-light: #d8b4fe;
  --purple-dark: #7c3aed;
  --purple-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 25%, #d8b4fe 50%, #a855f7 75%, #7c3aed 100%);
  --purple-gradient-hover: linear-gradient(135deg, #d8b4fe 0%, #a855f7 25%, #7c3aed 50%, #a855f7 75%, #d8b4fe 100%);
  --purple-glow: 0 4px 20px rgba(168, 85, 247, 0.4);
  --purple-glow-intense: 0 0 30px rgba(168, 85, 247, 0.6);
  --crystal-accent: #c084fc;
  --crystal-glow: 0 0 40px rgba(192, 132, 252, 0.3);
  
  --platinum-gradient: linear-gradient(135deg, #888888 0%, #E5E4E2 25%, #FFFFFF 50%, #E5E4E2 75%, #B0B0B0 100%);
  --platinum-glow: 0 4px 20px rgba(229, 228, 226, 0.4);
  
  --text-main: #fdf4ff;
  --text-secondary: #d8b4e2;
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-purple: rgba(168, 85, 247, 0.3);
  
  --success: #00E676;
  --success-bg: rgba(0, 230, 118, 0.1);
  --danger: #FF1744;
  --danger-bg: rgba(255, 23, 68, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: radial-gradient(circle at 50% 0%, #1c0a2a 0%, #0a0514 80%);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  justify-content: center;
}

/* Mobile App Container Constraint for Desktop view */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--bg-base);
  position: relative;
  overflow-x: hidden;
  padding-bottom: 90px; /* Space for bottom nav */
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

/*
 * Public pages use <body class="app-container"> with <header> + <div> as direct siblings.
 * Global body { display:flex } defaults to row — that put the header beside content (broken layout).
 */
body.app-container {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  margin-left: auto;
  margin-right: auto;
}

body.app-container > .public-top-header,
body.app-container > .p-3 {
  width: 100%;
  min-width: 0;
  flex-shrink: 0;
}

/* Horizontal scroll areas: keep swipe/scroll, hide visible scrollbar */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Typography & Utilities */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

.gold-text {
  background: var(--purple-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  background-size: 200% auto;
  animation: shine 3s linear infinite;
}

.platinum-text {
  background: var(--platinum-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-muted {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Glassmorphism Panels */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 1rem;
  border-radius: 14px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-gold {
  background: var(--purple-gradient);
  color: #fff;
  box-shadow: var(--purple-glow);
  background-size: 200% auto;
}

.btn-gold:hover, .btn-gold:active {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: var(--purple-glow-intense);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.btn-outline:hover {
  border-color: var(--purple-primary);
  color: var(--purple-primary);
}

/* Form Inputs */
.form-group {
  margin-bottom: 1.2rem;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 1rem 1.2rem;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--purple-primary);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
  background: rgba(168, 85, 247, 0.02);
}

/* Floating Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 440px;
  height: 70px;
  background: rgba(15, 15, 20, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 35px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
}

.nav-item i {
  font-size: 1.3rem;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.nav-item span {
  font-size: 0.65rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-item.active {
  color: var(--purple-primary);
}

.nav-item.active i {
  transform: translateY(-4px);
  text-shadow: var(--purple-glow);
}

.nav-item.active span {
  opacity: 1;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--purple-primary);
  border-radius: 50%;
  box-shadow: var(--purple-glow);
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  position: sticky;
  top: 0;
  background: rgba(5, 5, 7, 0.8);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger span:nth-child(2) { width: 18px; }

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple-gradient);
  padding: 2px;
  position: relative;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-base);
}

/* Balance Card */
.balance-card {
  margin: 0 1.5rem;
  padding: 1.5rem;
  border-radius: 24px;
  background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png'), linear-gradient(135deg, #1A1A1A 0%, #0A0A0A 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.05);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(168, 85, 247, 0.1) 25%, transparent 50%);
  animation: rotate 10s linear infinite;
  pointer-events: none;
}

.balance-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.balance-amount {
  font-size: 2.5rem;
  font-weight: 800;
  position: relative;
  z-index: 2;
  letter-spacing: -1px;
}

.balance-currency {
  font-size: 1rem;
  font-weight: 500;
  color: var(--purple-primary);
  vertical-align: super;
}

.card-chip {
  width: 40px;
  height: 30px;
  background: linear-gradient(135deg, #e5e4e2, #b0b0b0);
  border-radius: 6px;
  position: relative;
  z-index: 2;
  opacity: 0.8;
}

/* Animations */
@keyframes shine {
  to { background-position: 200% center; }
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

/* Platinum Ticket UI */
.ticket-premium {
  background: url('https://www.transparenttextures.com/patterns/brushed-alum.png'), var(--platinum-gradient);
  border-radius: 16px;
  padding: 2px;
  position: relative;
  box-shadow: var(--platinum-glow);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.ticket-inner {
  background: rgba(10, 10, 12, 0.95);
  border-radius: 14px;
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(255,255,255,0.2);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.ticket-logo {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.ticket-price {
  background: rgba(255,255,255,0.1);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
}

.ticket-body {
  display: flex;
  justify-content: space-between;
}

.ticket-barcode {
  width: 100%;
  height: 40px;
  background: repeating-linear-gradient(
    90deg,
    #fff,
    #fff 2px,
    transparent 2px,
    transparent 4px,
    #fff 4px,
    #fff 5px,
    transparent 5px,
    transparent 8px
  );
  opacity: 0.5;
  margin-top: 1rem;
}

/* Bottom Sheet */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  background: var(--bg-surface);
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  padding: 2rem;
  z-index: 2000;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
  border-top: 1px solid var(--border-gold);
}

.bottom-sheet.open {
  transform: translateX(-50%) translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 0 auto 1.5rem auto;
}

.sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Dashboard Sections */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 1.5rem 1rem 1.5rem;
}

.section-title h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.view-all {
  color: var(--gold-primary);
  font-size: 0.85rem;
  text-decoration: none;
}

/* Active Lottery Card */
.active-lottery-card {
  margin: 0 1.5rem;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.active-lottery-card img {
  width: 100%;
  height: auto;
  display: block;
}

.lottery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.countdown-timer {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.time-box {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 8px;
  border-radius: 8px;
  text-align: center;
  min-width: 50px;
  backdrop-filter: blur(5px);
}

.time-box span {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--purple-primary);
  text-shadow: 0 0 10px rgba(168,85,247,0.5);
}

.time-box label {
  font-size: 0.6rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Country Select */
.country-select-wrapper {
  display: flex;
  gap: 10px;
}

.country-select {
  width: 100px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-radius: 12px;
  padding: 0 10px;
  outline: none;
}

/* Referral Tree */
.tree-node {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  position: relative;
  margin: 0 auto;
  width: fit-content;
  min-width: 120px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tree-node.root {
  border-color: var(--purple-primary);
  box-shadow: var(--purple-glow);
}

.tree-level {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  position: relative;
}

.tree-level::before {
  content: '';
  position: absolute;
  top: -2rem;
  left: 50%;
  width: 2px;
  height: 2rem;
  background: rgba(255,255,255,0.1);
}

.tree-level .tree-node::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: 50%;
  width: 2px;
  height: 1rem;
  background: rgba(255,255,255,0.1);
}

.tree-line-horizontal {
  position: absolute;
  top: -1rem;
  left: 25%;
  width: 50%;
  height: 2px;
  background: rgba(255,255,255,0.1);
}

/* Wallet History */
.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-glass);
}

.tx-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tx-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.tx-icon.income { background: var(--success-bg); color: var(--success); }
.tx-icon.expense { background: var(--danger-bg); color: var(--danger); }

.tx-amount.income { color: var(--success); }
.tx-amount.expense { color: var(--text-main); }

/* Sidebar Navigation */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active,
.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-surface);
  z-index: 3000;
  transition: left 0.3s ease;
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

.sidebar.active {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-shrink: 0;
}

.sidebar-close {
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
}

/* Scrollable link list; keeps header/footer fixed inside drawer */
.sidebar-nav--scroll {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 2px;
  margin-right: -2px;
}

.sidebar-nav--scroll::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav--scroll::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.28);
  border-radius: 99px;
}

.sidebar-nav--scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  margin-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 12px 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
  min-height: 48px;
  box-sizing: border-box;
}

.sidebar-footer a:hover {
  background: rgba(168, 85, 247, 0.1);
  color: var(--purple-primary);
}

.sidebar-footer a.sidebar-footer__danger {
  color: var(--danger);
}

.sidebar-footer a.sidebar-footer__danger:hover {
  background: rgba(255, 82, 82, 0.1);
  color: #ff8a80;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 12px 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(168, 85, 247, 0.1);
  color: var(--purple-primary);
}

/* Admin Desktop Layout */
.admin-layout {
  justify-content: flex-start;
}

.admin-layout .app-container {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding-left: 280px;
  padding-bottom: 0;
  box-shadow: none;
}

.admin-layout .sidebar {
  left: 0 !important;
  box-shadow: none;
  border-right: 1px solid var(--border-glass);
}

.admin-layout .sidebar-overlay {
  display: none;
}

.admin-layout .sidebar-close {
  display: none;
}

.admin-layout .hamburger {
  display: none;
}

/* Mobile adjustments for Admin */
@media (max-width: 991px) {
  .admin-layout .app-container {
    padding-left: 0;
  }
  .admin-layout .sidebar {
    left: -280px !important;
  }
  .admin-layout .sidebar.open {
    left: 0 !important;
  }
  .admin-layout .sidebar-overlay {
    display: block;
  }
  .admin-layout .sidebar-close {
    display: block;
  }
  .admin-layout .hamburger {
    display: flex;
  }
}

/* -------- Public pages: back + brand row, then 3-up nav (mobile-first) -------- */
.public-top-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.12);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--bg-base);
  position: relative;
  z-index: 4;
}

.public-top-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
}

.public-back {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  text-decoration: none;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.public-back:active {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.35);
}

/* Stats strip (landing + transparency + anywhere) */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
  align-items: stretch;
}

.stat {
  flex: 1 1 min(140px, 100%);
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  box-sizing: border-box;
  min-width: 0;
}

.stat small {
  display: block;
  margin-bottom: 6px;
}

.stat b {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-primary);
  line-height: 1.2;
  word-break: break-word;
}

.public-brand {
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 8px;
  color: var(--purple-light);
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  animation: none !important;
  text-shadow: 0 0 22px rgba(168, 85, 247, 0.35);
  font-size: clamp(1rem, 4vw, 1.15rem);
}

.public-nav-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.public-nav-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 0;
  padding: 10px 8px;
  border-radius: 12px;
  font-size: clamp(0.62rem, 3.2vw, 0.78rem);
  font-weight: 600;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  hyphens: auto;
  word-break: break-word;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.public-nav-pill:hover {
  color: var(--purple-primary);
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.08);
}

.public-nav-pill.is-active {
  color: var(--bg-base);
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #d8b4fe 100%);
  border-color: rgba(255, 255, 255, 0.25);
  font-weight: 700;
}

@media (min-width: 480px) {
  .public-nav-pill {
    font-size: clamp(0.72rem, 1.8vw, 0.85rem);
    padding: 10px 12px;
  }
}

/* Sidebar: section label + tighter wrap on small phones */
.sidebar-nav-group {
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  padding: 0 12px 10px;
  opacity: 0.85;
}

.sidebar-nav a {
  min-height: 48px;
  box-sizing: border-box;
}

.sidebar-nav a i {
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
}

@media (max-width: 360px) {
  .sidebar {
    width: min(280px, 92vw);
    padding: 1.5rem 1rem;
  }

  .sidebar-nav a {
    font-size: 1rem;
    padding: 11px 12px;
    gap: 12px;
  }
}

