
:root {
  --primary:          #C8102E;
  --primary-hover:    #A00D25;
  --primary-active:   #8B0B1F;
  --primary-soft:     #FFF1F3;

  --gold:             #F4B400;
  --gold-deep:        #D89A00;
  --gold-soft:        #FFF8E6;

  --blue:             #2563EB;
  --blue-soft:        #EFF6FF;

  --green:            #22C55E;
  --green-deep:       #16A34A;
  --green-soft:       #F0FDF4;

  --orange:           #F97316;
  --orange-deep:      #EA580C;
  --orange-soft:      #FFF7ED;

  --purple:           #7C3AED;
  --purple-deep:      #5B21B6;

  --bg-main:          #F5F4F7;
  --bg-card:          #FFFFFF;
  --bg-elevated:      #FAFAFB;
  --bg-sidebar:       #F0EFF3;
  --bg-input:         rgba(0,0,0,0.04);

  --bg:               #F4F3F6;
  --white:            #FFFFFF;

  --text:             #16181D;
  --text-secondary:   #3D4048;
  --text-muted:       #5C616B;
  --text-faint:       #868B96;

  --border:           rgba(0,0,0,0.07);
  --border-strong:    rgba(0,0,0,0.12);
  --border-card:      rgba(0,0,0,0.09);

  --shadow-xs: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 4px 14px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.09), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 56px rgba(0,0,0,0.12), 0 4px 14px rgba(0,0,0,0.06);
  --shadow-xl: 0 40px 100px rgba(0,0,0,0.16), 0 8px 24px rgba(0,0,0,0.08);

  /* Brand-colored shadows */
  --shadow-red:       0 6px 22px rgba(200,16,46,0.20), 0 2px 6px rgba(200,16,46,0.10);
  --shadow-red-lg:    0 12px 36px rgba(200,16,46,0.28), 0 4px 12px rgba(200,16,46,0.14);

  --glass:            rgba(255,255,255,0.80);
  --glass-strong:     rgba(255,255,255,0.92);
  --glass-nav:        rgba(252,251,248,0.94);
  --glass-blur:       blur(20px) saturate(180%);
  --glass-blur-sm:    blur(12px) saturate(150%);

  --radius:            22px;
  --radius-sm:         14px;
  --radius-xs:         10px;
  --radius-pill:       50px;
  --nav-width:         264px;
  --right-width:       320px;
  --bottom-nav-height: 64px;

  --ease:              cubic-bezier(0.175, 0.885, 0.32, 1.275);   /* Duolingo bounce */
  --ease-spring:       cubic-bezier(0.34,  1.56,  0.64, 1);       /* Apple spring */
  --ease-out:          cubic-bezier(0.25,  0.46,  0.45, 0.94);
  --ease-smooth:       cubic-bezier(0.32,  0.72,  0,    1);       /* macOS smooth */
  --transition:        0.2s  var(--ease-out);
  --transition-bounce: 0.22s var(--ease);
  --transition-spring: 0.28s var(--ease-spring);

  /* ── Global card typography tokens (shared by home + pasal) ── */
  --card-price-color:  var(--primary);   /* brand red — one price language */
  --card-price-size:   1.08rem;
  --card-price-weight: 900;
  --card-title-size:   .92rem;
  --card-title-weight: 800;
  --card-meta-size:    .74rem;
  --card-badge-size:   .60rem;
  --card-loc-size:     .74rem;
  --card-desc-size:    .80rem;

  /* Backward compat aliases */
  --maroon:            var(--primary);
  --maroon-dark:       var(--primary-hover);
  --maroon-light:      var(--primary-soft);
  --yellow:            var(--gold);
  --yellow-dark:       var(--gold-deep);
  --yellow-light:      var(--gold-soft);
  --blue-dark:         #1D4ED8;
  --blue-light:        var(--blue-soft);
  --orange-dark:       var(--orange-deep);
  --orange-light:      var(--orange-soft);
  --green-dark:        var(--green-deep);
  --green-light:       var(--green-soft);
}

/* ── DARK MODE */
[data-theme="dark"] {
  --bg-main:          #0F1115;
  --bg-card:          #1D212B;
  --bg-elevated:      #171A21;
  --bg-sidebar:       #13161D;
  --bg:               #0F1115;
  --white:            #1D212B;

  --text:             #ECEEF2;
  --text-secondary:   #B8BCC8;
  --text-muted:       #6B7080;
  --text-faint:       #3E424F;

  --border:           rgba(255,255,255,0.06);
  --border-strong:    rgba(255,255,255,0.11);
  --border-card:      rgba(255,255,255,0.08);
  --bg-input:         rgba(255,255,255,0.05);

  --shadow-sm:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.7);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.8);

  --glass:      rgba(29,33,43,0.88);
  --glass-strong: rgba(23,26,33,0.96);
  --glass-nav:  rgba(15,17,21,0.96);

  --primary-soft:     #1E060E;
  --gold-soft:        #120E00;
  --blue-soft:        #03091E;
  --green-soft:       #041408;
  --orange-soft:      #120800;
}

/* RESET & BASE */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  /* ── Reddish/warm left, peachy center, bluish/cool right ── */
  background-color: #f1eef3;
  background-image:
    radial-gradient(ellipse 78% 62% at 30% 35%, rgba(255,200,160,0.34) 0%, transparent 65%),
    radial-gradient(ellipse 75% 70% at 45% 75%, rgba(255,180,200,0.22) 0%, transparent 70%),
    radial-gradient(ellipse 85% 65% at 90% 20%, rgba(200,210,240,0.30) 0%, transparent 65%);
  background-attachment: fixed;
  color: var(--text);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  transition: color .3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* APP SHELL */
.app {
  display: flex;
  width: 100%;
  max-width: 1300px;
  min-height: 100vh;
  position: relative;
  background: transparent;
}

/* DARK MODE TOGGLE */
.dark-mode-toggle {
  background: none;
  border: 1.5px solid var(--border-strong);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: .74rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: all .2s var(--ease-out);
}
.dark-mode-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.dark-mode-toggle i { transition: transform .3s var(--ease-spring); }
[data-theme="dark"] .dark-mode-toggle { background: rgba(255,255,255,0.04); color: var(--gold); border-color: rgba(255,255,255,0.10); }
[data-theme="dark"] .dark-mode-toggle:hover { border-color: var(--gold); background: rgba(244,180,0,0.08); }

/* LEFT NAV — glass panel over gradient */
.nav {
  width: var(--nav-width);
  padding: 16px 12px 16px;
  background: linear-gradient(135deg, #E5D6E8 0%, #ECECF6 50%, #E8E4F3 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,0.35);
  box-shadow: 8px 0 32px rgba(149,157,165,0.10);
  clip-path: inset(0 -24px 0 0);
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
[data-theme="dark"] .nav {
  border-right-color: rgba(255,255,255,0.05);
  box-shadow: 8px 0 20px rgba(0,0,0,0.24);
}
.nav::-webkit-scrollbar              { width: 6px; }
.nav::-webkit-scrollbar-track        { background: transparent; }
.nav::-webkit-scrollbar-thumb        { background: transparent; border-radius: 3px; transition: background 0.3s ease; }
.nav:hover::-webkit-scrollbar-thumb  { background: rgba(0,0,0,0.20); border-radius: 3px; }

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 20px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.nw-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--primary), var(--primary-hover));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 16px rgba(200,16,46,0.36), inset 0 1px 0 rgba(255,255,255,0.22);
  transition: transform var(--transition-spring), box-shadow var(--transition);
}
.nav-logo:hover .nw-icon {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 24px rgba(200,16,46,0.46), inset 0 1px 0 rgba(255,255,255,0.22);
}
.nw-text   { display: flex; flex-direction: column; line-height: 1; }
.nw-mr     { font-size: 0.50rem; font-weight: 800; color: var(--text-muted); letter-spacing: 2.5px; text-transform: uppercase; }
.nw-brand  { font-size: 1.02rem; font-weight: 900; color: var(--primary); letter-spacing: -0.6px; margin-top: 1px; }

/* Nav links */
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin: 1px 0;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.90rem;
  color: #6B7280;
  background: transparent;
  transition: all 0.3s ease;
  position: relative;
}
/* ── Dark-mode toggle switch (used in nav-left + profile dropdown) ── */
.dark-mode-toggle { justify-content: flex-start; }
.nav-toggle-label { flex: 1; }
.nav-toggle-switch {
  flex-shrink: 0;
  width: 34px; height: 20px; border-radius: 999px;
  background: rgba(0,0,0,0.14);
  position: relative;
  transition: background .2s var(--ease-out);
}
.nav-toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .22s var(--ease-spring);
}
.nav-toggle-switch.on { background: var(--primary); }
.nav-toggle-switch.on .nav-toggle-thumb { transform: translateX(14px); }
[data-theme="dark"] .nav-toggle-switch { background: rgba(255,255,255,0.14); }

.nav-link i {
  width: 20px;
  font-size: 1.08rem;
  text-align: center;
  color: #374151;
  transition: color var(--transition), transform var(--transition);
  flex-shrink: 0;
}
/* Community tile icons must stay crisp white on their colored tiles */
.nav-comm-icon i { color: #fff !important; }
.nav-link:hover {
  background: rgba(255,255,255,0.35);
  color: #23253A;
}
[data-theme="dark"] .nav-link:hover { background: rgba(255,255,255,0.06); }
.nav-link:hover i { color: var(--text); transform: scale(1.1); }
.nav-link.active {
  background: rgba(255,255,255,0.55);
  color: #E11D48;
  font-weight: 800;
  box-shadow: inset 3px 0 0 #E11D48;
}
.nav-link.active i { color: var(--primary); }
[data-theme="dark"] .nav-link.active { background: rgba(200,16,46,0.12); box-shadow: inset 3px 0 0 var(--primary); }

/* Nav divider */
.nav-divider { height: 0.5px; background: var(--border-strong); margin: 14px 6px; }

/* Sell / Post button */
.btn-post {
  display: block;
  background: linear-gradient(135deg, var(--primary) 0%, #e0203e 60%, var(--primary-hover) 100%);
  color: white !important;
  text-align: center;
  padding: 13px 16px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.92rem;
  margin-top: 10px;
  border: none;
  box-shadow: var(--shadow-red);
  transition: transform var(--transition-spring), box-shadow var(--transition), filter var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.1px;
}
.btn-post::after {
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 50%; height: 200%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s var(--ease-smooth);
}
.btn-post:hover  { transform: translateY(-2px); box-shadow: var(--shadow-red-lg); filter: brightness(1.06); }
.btn-post:hover::after { left: 130%; }
.btn-post:active { transform: translateY(1px); box-shadow: var(--shadow-red); filter: brightness(0.96); }

/* Nav user row */
.nav-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition-spring);
}
.nav-user:hover {
  background: var(--primary-soft);
  box-shadow: var(--shadow-xs);
  transform: translateY(-1px);
  border-color: rgba(200,16,46,0.2);
}
.nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E11D48, #F43F5E);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.82rem; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(200,16,46,0.25);
  overflow: hidden;
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nav-user-info { flex: 1; min-width: 0; }
.nav-user-name   { font-weight: 700; font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user-handle { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }

/* Nav badge */
.nav-badge {
  background: #FF4B4B;
  color: white;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: auto;
  animation: pulse-red 2.5s infinite;
}

/* Nav dropdown */
.nav-dropdown {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  min-width: 180px;
}
.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  color: var(--text);
}
.nav-dropdown-item:hover { background: var(--bg-main); }
.nav-dropdown-item i     { width: 16px; color: var(--text-muted); font-size: 0.9rem; }
[data-theme="dark"] .nav-dropdown   { background: #1a1a26; border-color: var(--border-strong); }
[data-theme="dark"] .nav-dropdown-item:hover { background: #111118; }

/* Locked nav item */
.nav-locked { opacity: 0.5; pointer-events: none; }
[data-theme="dark"] .nav-locked:hover { background: rgba(255,255,255,0.06); }

/* CENTER MAIN — transparent, gradient shows through */
.main {
  flex: 1;
  background: transparent;
  border-left: none;
  border-right: none;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* TOPBAR */
.topbar {
  padding: 11px 18px;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-title {
  font-weight: 900;
  font-size: 1.18rem;
  white-space: nowrap;
  letter-spacing: -0.7px;
  color: var(--text);
  flex-shrink: 0;
}
[data-theme="dark"] .topbar {
  background: rgba(15,17,21,0.92);
  border-bottom-color: var(--border-strong);
}

/* Search */
.search-wrap {
  flex: 1;
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}
.search-wrap i {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 0.88rem;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  background: rgba(0,0,0,0.045);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3.5px rgba(200,16,46,0.10);
}
[data-theme="dark"] .search-input { background: rgba(255,255,255,0.06); }

.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.78rem;
  cursor: pointer; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(200,16,46,0.28);
  transition: transform var(--transition-spring), box-shadow var(--transition);
  border: 1.5px solid rgba(255,255,255,0.3);
}
.topbar-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 18px rgba(200,16,46,0.44);
}

.feed { padding: 0; }

/* RIGHT SIDEBAR — transparent, gradient shows through */
.right {
  width: var(--right-width);
  padding: 14px 13px;
  background: transparent;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-left: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.12) transparent;
}
.right::-webkit-scrollbar         { width: 4px; }
.right::-webkit-scrollbar-track   { background: transparent; }
.right::-webkit-scrollbar-thumb   { background: rgba(0,0,0,0.12); border-radius: 4px; }
.right::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.22); }
[data-theme="dark"] .right,
[data-theme="dark"] .sidebar-right {
  background: transparent !important;
  border-left-color: rgba(255,255,255,0.07) !important;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

/* GAMIFICATION BAR */
.gam-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gam-badge {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-bottom: 3px solid rgba(0,0,0,0.10);
  border-radius: 16px;
  padding: 14px 10px;
  font-weight: 800; font-size: 0.80rem; color: var(--text);
  cursor: pointer;
  transition: transform var(--transition-spring), box-shadow var(--transition), border-color var(--transition);
}
.gam-badge:hover  { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.gam-badge:active { transform: translateY(1px);  box-shadow: var(--shadow-xs); }
.gam-badge i       { font-size: 1.4rem; margin-bottom: 2px; }
.gam-badge .gam-val { font-size: 1.1rem; font-weight: 900; line-height: 1; letter-spacing: -0.5px; }
.gam-badge .gam-sub { font-size: 0.63rem; color: var(--text-muted); font-weight: 600; margin-top: 1px; }

.gam-badge.streak {
  background: linear-gradient(150deg, #fff0f0 0%, var(--bg-card) 100%);
  border-color: rgba(255,75,75,0.22);
  border-bottom-color: rgba(224,68,68,0.30);
}
.gam-badge.streak:hover { border-color: rgba(255,75,75,0.42); box-shadow: 0 8px 24px rgba(255,75,75,0.12); }
.gam-badge.streak i      { color: #FF4B4B; }
.gam-badge.streak .gam-val { color: #FF4B4B; }

.gam-badge.points {
  background: linear-gradient(150deg, #fffceb 0%, var(--bg-card) 100%);
  border-color: rgba(244,180,0,0.22);
  border-bottom-color: rgba(212,154,0,0.35);
}
.gam-badge.points:hover { border-color: rgba(244,180,0,0.42); box-shadow: 0 8px 24px rgba(244,180,0,0.14); }
.gam-badge.points i      { color: var(--gold-deep); }
.gam-badge.points .gam-val { color: var(--gold-deep); }

.gam-badge.notif {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: center;
  padding: 10px 14px;
  gap: 8px;
  border-radius: 14px;
}
.gam-badge.notif i { font-size: 1rem; margin-bottom: 0; color: var(--primary); }
.notif-dot {
  width: 8px; height: 8px;
  background: #FF4B4B;
  border-radius: 50%;
  margin-left: auto;
  animation: pulse-red 2s infinite;
}
[data-theme="dark"] .gam-badge { background: var(--bg-card); border-color: var(--border-strong); }

/* VAULT CARD */
.vault-card {
  display: block;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 52%, #1e0a14 100%);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-red), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform var(--transition-spring), box-shadow var(--transition);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.vault-card::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.vault-card:hover  { transform: translateY(-3px); box-shadow: var(--shadow-red-lg); }
.vault-card:active { transform: translateY(1px); }

.vault-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; position: relative; z-index: 1;
}
.vault-label {
  font-size: 0.60rem; font-weight: 900; letter-spacing: 1.2px;
  opacity: 0.86; display: flex; align-items: center; gap: 5px;
  text-transform: uppercase;
}
.vault-streak {
  background: rgba(0,0,0,0.22); padding: 3px 9px; border-radius: 20px;
  font-size: 0.70rem; font-weight: 800;
  display: flex; align-items: center; gap: 4px;
  border: 1px solid rgba(255,255,255,0.18);
}
.vault-streak i { color: #FCA5A5; }

.vault-balance {
  font-size: 2.1rem; font-weight: 900; line-height: 1;
  letter-spacing: -1.5px; margin-bottom: 3px;
}
.vault-rs {
  font-size: 0.70rem; font-weight: 600; opacity: 0.78;
}

.vault-progress-wrap { margin-top: 16px; }
.vault-progress-bar  { height: 5px; background: rgba(255,255,255,0.18); border-radius: 10px; overflow: hidden; }
.vault-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 10px;
  transition: width 0.8s var(--ease-smooth);
  box-shadow: 0 0 8px rgba(251,191,36,.5);
}
.vault-progress-label { font-size: 0.60rem; font-weight: 700; opacity: 0.75; margin-top: 6px; }
.vault-progress-label span { color: #fbbf24; font-weight: 900; }

[data-theme="dark"] .vault-card { background: linear-gradient(135deg, #6b0a1a 0%, #2d0812 100%); }

/* WIDGET CARD — glass */
.widget {
  background: var(--bg-card, #fff);
  border: none;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 6px 18px rgba(0,0,0,0.05);
  transition: box-shadow var(--transition);
}
.widget:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.12); }
[data-theme="dark"] .widget { background: rgba(255,255,255,0.05); }
.widget-title {
  font-weight: 900;
  font-size: 0.90rem;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.3px;
}
[data-theme="dark"] .widget { background: var(--bg-card); border-color: var(--border-strong); }

/* TREND ITEM */
.trend-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition-bounce);
}
.trend-item:hover { background: var(--bg-main); transform: translateX(3px); }
.trend-thumb {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.82rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}
.trend-body  { flex: 1; min-width: 0; }
.trend-label { font-size: 0.60rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.trend-name  { font-weight: 700; font-size: 0.82rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-meta  { font-size: 0.70rem; color: var(--primary); font-weight: 800; margin-top: 1px; }

/* SECTION HEADERS */
.section-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 22px 14px;
  border-top: 0.5px solid var(--border-strong);
  margin-top: 4px;
  gap: 12px;
}
.section-head > div:first-child {
  position: relative;
  padding-left: 12px;
}
.section-head > div:first-child::before {
  content: '';
  position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 3.5px; border-radius: 2px;
  background: linear-gradient(180deg, var(--primary) 0%, rgba(200,16,46,0.25) 100%);
}
.section-head h3 {
  font-weight: 900; font-size: 1.08rem;
  letter-spacing: -0.5px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  line-height: 1.25;
}
.sh-tag {
  font-size: 0.58rem; font-weight: 800;
  padding: 3px 8px; border-radius: 8px;
  text-transform: uppercase; letter-spacing: 0.6px;
  vertical-align: middle; flex-shrink: 0;
}
.sh-tag.pasal  { background: #FEF2F2; color: var(--primary); }
.sh-tag.boli   { background: #FFFBEB; color: #B45309; }
.sh-tag.tank   { background: var(--primary-soft); color: var(--primary); }
.sh-tag.radar  { background: #F0FDF4; color: #059669; }
.sh-tag.guff   { background: #F5F3FF; color: #7C3AED; }
.section-head a {
  color: var(--primary); font-weight: 700; font-size: 0.76rem;
  padding: 5px 13px; border-radius: 20px;
  background: var(--primary-soft);
  transition: all var(--transition-spring);
  white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}
.section-head a:hover { background: var(--primary); color: white; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(200,16,46,0.22); }

/* FILTER BAR */
.filter-bar {
  display: flex; gap: 7px;
  padding: 12px 22px;
  border-bottom: 0.5px solid var(--border-strong);
  overflow-x: auto; overflow-y: visible;
  scrollbar-width: none; flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-pill {
  padding: 7px 17px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-strong);
  font-size: 0.80rem; font-weight: 700;
  white-space: nowrap; cursor: pointer;
  transition: all var(--transition-spring);
  background: var(--bg-card);
  color: var(--text-muted);
}
.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200,16,46,0.12);
}
.filter-pill:active { transform: translateY(0); }
.filter-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.14), 0 6px 20px rgba(200,16,46,0.35);
  font-weight: 800;
}
.filter-pill.yellow.active {
  background: var(--gold); border-color: var(--gold); color: var(--text);
  box-shadow: 0 0 0 3px rgba(244,180,0,0.18), 0 4px 14px rgba(212,154,0,0.30);
}
.filter-pill.blue.active {
  background: var(--blue); border-color: var(--blue); color: white;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15), 0 4px 14px rgba(37,99,235,0.30);
}
.filter-pill.green.active {
  background: var(--green); border-color: var(--green); color: white;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.15), 0 4px 14px rgba(34,197,94,0.30);
}

/* ITEM CARDS */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 14px;
  padding: 0 22px 26px;
}
.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-spring), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
  display: block;
  position: relative;
}
.item-card:hover {
  border-color: rgba(200,16,46,0.20);
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-red), 0 16px 40px rgba(0,0,0,0.10);
}
.item-card:active { transform: translateY(1px) scale(0.99); box-shadow: var(--shadow-xs); }
.item-img {
  height: 188px;
  background: var(--bg-main);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  font-size: 2.8rem;
  color: #ccc;
  overflow: hidden;
}
.item-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-smooth); }
.item-card:hover .item-img img { transform: scale(1.06); }
.item-img::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(to top, rgba(0,0,0,0.18) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
  pointer-events: none;
}
.item-card:hover .item-img::after { opacity: 1; }
.item-body    { padding: 12px 14px 14px; }
.item-title   { font-weight: 800; font-size: 0.87rem; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); line-height: 1.3; }
.item-price   { color: var(--primary); font-weight: 900; font-size: 1.12rem; letter-spacing: -0.7px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.item-bottom  { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 4px; }
.item-loc     { font-size: 0.66rem; color: var(--text-muted); display: flex; align-items: center; gap: 3px; }
.item-loc i   { font-size: 0.60rem; color: var(--primary); }
.item-seller  { display: flex; align-items: center; gap: 4px; font-size: .63rem; color: var(--text-muted); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-seller-av { width: 16px; height: 16px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .42rem; font-weight: 900; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Save button */
.item-save-btn {
  position: absolute; top: 10px; right: 10px; z-index: 4;
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; color: var(--text-muted);
  box-shadow: 0 2px 10px rgba(0,0,0,.14);
  opacity: 0; transform: scale(.78) translateY(-4px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), color .15s, background .15s;
}
.item-card:hover .item-save-btn { opacity: 1; transform: scale(1) translateY(0); }
.item-save-btn:hover  { background: #fff; color: #ef4444; transform: scale(1.1) !important; }
.item-save-btn.saved  { opacity: 1 !important; color: #ef4444; background: #fff; transform: scale(1) !important; }

/* Condition chip on image */
.item-cond-chip {
  position: absolute; bottom: 8px; left: 8px; z-index: 3;
  font-size: .54rem; font-weight: 900; text-transform: uppercase; letter-spacing: .5px;
  padding: 3px 8px; border-radius: 7px; pointer-events: none;
}
.item-cond-new         { background: rgba(220,252,231,.95); color: #15803d; }
.item-cond-used        { background: rgba(0,0,0,.55); color: rgba(255,255,255,.95); }
.item-cond-refurbished { background: rgba(254,243,199,.95); color: #b45309; }

[data-theme="dark"] .item-card { background: var(--bg-card); }
[data-theme="dark"] .item-save-btn { background: rgba(29,33,43,.92); color: var(--text-muted); }

/* LIVE TAG */
.live-tag {
  position: absolute; top: 8px; left: 8px;
  background: #FF4B4B; color: white;
  font-size: 0.60rem; font-weight: 900;
  padding: 3px 9px 3px 6px; border-radius: 8px;
  display: flex; align-items: center; gap: 5px;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 10px rgba(255,75,75,0.45);
}
.live-tag::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  background: white; border-radius: 50%;
  animation: pulse-live 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
.live-tag.green { background: var(--green); box-shadow: 0 2px 10px rgba(34,197,94,0.42); }

/* LISTING CARD */
.listing-card {
  display: flex; gap: 14px;
  padding: 14px 16px;
  margin: 0 16px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition-spring), border-color var(--transition);
  text-decoration: none; color: inherit;
}
.listing-card:hover {
  border-color: rgba(200,16,46,0.22);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red), var(--shadow-sm);
}
.listing-card:active { transform: translateY(0); box-shadow: var(--shadow-xs); }
.listing-thumb {
  width: 88px; height: 78px;
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #ccc;
  flex-shrink: 0; position: relative; overflow: hidden;
}
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease-smooth); }
.listing-card:hover .listing-thumb img { transform: scale(1.06); }
.listing-info  { flex: 1; min-width: 0; }
.listing-title { font-weight: 700; font-size: 0.90rem; margin-bottom: 4px; color: var(--text); }
.listing-price { font-weight: 900; color: var(--primary); font-size: 1.0rem; letter-spacing: -0.3px; }
.listing-meta  { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.listing-tag {
  font-size: 0.68rem; font-weight: 700;
  padding: 2px 8px; border-radius: 6px;
  background: var(--primary-soft); color: var(--primary);
}
.listing-tag.blue   { background: var(--blue-soft);   color: var(--blue); }
.listing-tag.green  { background: var(--green-soft);  color: var(--green-deep); }
.listing-tag.yellow { background: var(--gold-soft);   color: var(--gold-deep); }
[data-theme="dark"] .listing-card { background: var(--bg-card); }

/* AUCTION / BOLI CARD */
.auction-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-spring), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
}
.auction-card:hover {
  border-color: rgba(244,180,0,0.36);
  transform: translateY(-5px);
  box-shadow: 0 6px 22px rgba(244,180,0,.28), 0 2px 6px rgba(244,180,0,.14), var(--shadow-md);
}
.auction-card:active { transform: translateY(1px); box-shadow: var(--shadow-xs); }
.auction-img {
  height: 150px;
  background: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--gold-deep); position: relative; overflow: hidden;
}
.auction-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease-smooth); }
.auction-card:hover .auction-img img { transform: scale(1.04); }
.auction-body  { padding: 12px 14px 6px; }
.auction-title { font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; }
.auction-current { font-size: 0.63rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; }
.auction-bid   { font-weight: 900; color: var(--gold-deep); font-size: 1.22rem; letter-spacing: -0.6px; line-height: 1.1; }
.auction-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px 12px;
  border-top: 0.5px solid var(--border-strong);
  margin-top: 4px;
}
.auction-timer { font-size: 0.68rem; font-weight: 700; color: #ef4444; display: flex; align-items: center; gap: 4px; }
.auction-bids  { font-size: 0.66rem; font-weight: 600; color: var(--text-muted); }
[data-theme="dark"] .auction-card { background: var(--bg-card); }

/* TANK IDEA CARD */
.tank-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-spring), box-shadow var(--transition), border-color var(--transition);
  display: block; color: inherit;
}
.tank-card:hover {
  border-color: rgba(200,16,46,0.22);
  transform: translateY(-4px);
  box-shadow: var(--shadow-red), var(--shadow-md);
}
.tank-card:active { transform: translateY(0); box-shadow: var(--shadow-xs); }
.tank-cat {
  font-size: 0.68rem; font-weight: 800;
  color: var(--primary); background: var(--primary-soft);
  padding: 3px 10px; border-radius: 20px;
  display: inline-block; margin-bottom: 8px;
}
.tank-title    { font-weight: 800; font-size: 0.94rem; margin-bottom: 6px; letter-spacing: -0.3px; }
.tank-abstract {
  font-size: 0.80rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tank-footer { display: flex; align-items: center; justify-content: space-between; }
.tank-goal { font-size: 0.78rem; color: var(--text-muted); }
.tank-goal strong { color: var(--text); font-weight: 700; }
.tank-progress { height: 6px; background: var(--bg-main); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.tank-progress-bar {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-deep) 100%);
  transition: width 0.8s var(--ease-smooth);
}
.read-gate { display: flex; align-items: center; gap: 6px; font-size: 0.71rem; color: var(--text-muted); }
.read-gate i { color: var(--gold-deep); }
[data-theme="dark"] .tank-card { background: var(--bg-card); }

/* RADAR CARD */
.radar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex; gap: 14px; align-items: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-spring), box-shadow var(--transition), border-color var(--transition);
}
.radar-card:hover {
  border-color: rgba(200,16,46,0.20);
  transform: translateY(-3px);
  box-shadow: var(--shadow-red), var(--shadow-sm);
}
.radar-card:active { transform: translateY(0); box-shadow: var(--shadow-xs); }
.radar-avatar {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; color: var(--primary); flex-shrink: 0;
  transition: transform var(--transition-spring);
}
.radar-card:hover .radar-avatar { transform: scale(1.06); }
.radar-info  { flex: 1; min-width: 0; }
.radar-name  { font-weight: 700; font-size: 0.88rem; }
.radar-desc  { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radar-meta  { display: flex; gap: 8px; margin-top: 6px; align-items: center; }
.online-dot  { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; box-shadow: 0 0 0 2px rgba(34,197,94,0.22); }
.offline-dot { width: 7px; height: 7px; border-radius: 50%; background: #bbb; flex-shrink: 0; }
.radar-dist  { font-size: 0.72rem; color: var(--text-muted); }
[data-theme="dark"] .radar-card { background: var(--bg-card); }

/* FEATURE CARDS */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px 22px; }
.feat-card {
  padding: 22px 18px;
  border-radius: var(--radius);
  color: white;
  position: relative; overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.16);
  display: block;
  transition: transform var(--transition-spring), box-shadow var(--transition);
}
.feat-card::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.06);
  opacity: 0;
  transition: opacity var(--transition);
}
.feat-card:hover  { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.16); }
.feat-card:hover::before { opacity: 1; }
.feat-card:active { transform: translateY(2px); box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.feat-card h2 { font-size: 1.25rem; font-weight: 900; margin-bottom: 3px; letter-spacing: -0.4px; }
.feat-card p  { font-size: 0.73rem; font-weight: 600; opacity: 0.84; }
.feat-card .feat-icon { position: absolute; right: -8px; bottom: -8px; font-size: 4.2rem; opacity: 0.16; }
/* FEATURE CARD COLORS */
.fc-pasal { background: linear-gradient(135deg, #C8102E 0%, #e02040 100%); }
.fc-boli  { background: linear-gradient(135deg, #D97706 0%, var(--gold-deep) 100%); }
.fc-tank  { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%); }
.fc-radar { background: linear-gradient(135deg, var(--green) 0%, #155d27 100%); }

/* HOME HERO SECTION */
.home-hero {
  background: linear-gradient(135deg, #C8102E 0%, #7a0a1c 55%, #2d0812 100%);
  padding: 26px 24px 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-main-row {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative; z-index: 1;
}
.home-hero::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 78% 8%, rgba(244,180,0,0.20) 0%, transparent 52%),
    radial-gradient(ellipse at 12% 88%, rgba(255,255,255,0.07) 0%, transparent 46%);
}
.home-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,0.055) 1.5px, transparent 1.5px);
  background-size: 26px 26px; opacity: 0.65;
}
.home-hero > * { position: relative; z-index: 1; }
[data-theme="dark"] .home-hero { background: linear-gradient(135deg, #6b0a1a 0%, #2d0812 100%); }

/* PROFILE PAGE */
.profile-banner {
  height: 160px;
  background: linear-gradient(135deg, var(--primary) 0%, #6b0a1a 100%);
  position: relative;
}
.profile-avatar-wrap { position: absolute; bottom: -40px; left: 22px; }
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 3.5px solid white;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 1.4rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
}
.profile-info    { padding: 52px 22px 18px; border-bottom: 0.5px solid var(--border-strong); }
.profile-name    { font-weight: 900; font-size: 1.28rem; letter-spacing: -0.4px; }
.profile-handle  { color: var(--text-muted); font-size: 0.86rem; margin-top: 2px; }
.profile-bio     { margin-top: 10px; font-size: 0.88rem; line-height: 1.6; }
.profile-stats   { display: flex; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.profile-stat strong { font-weight: 900; }
.profile-stat span   { font-size: 0.83rem; color: var(--text-muted); }
.profile-badges  { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.badge           { padding: 4px 12px; border-radius: 20px; font-size: 0.73rem; font-weight: 700; }
.badge-verified  { background: var(--green-soft);  color: var(--green-deep); }
.badge-points    { background: var(--gold-soft);   color: var(--gold-deep); }
.badge-rating    { background: var(--primary-soft); color: var(--primary); }

/* TAB BAR */
.tab-bar { display: flex; border-bottom: 0.5px solid var(--border-strong); overflow-x: auto; scrollbar-width: none; }
.tab-bar::-webkit-scrollbar { display: none; }
.tab-item {
  padding: 14px 18px;
  font-weight: 700; font-size: 0.86rem;
  cursor: pointer; white-space: nowrap;
  border-bottom: 2.5px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  color: var(--text-muted);
  position: relative;
}
.tab-item:hover { color: var(--text); background: rgba(0,0,0,0.025); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 800; }

/* MESSAGES PAGE */
.msg-list { display: flex; flex-direction: column; }
.msg-row {
  display: flex; gap: 12px; padding: 14px 22px;
  border-bottom: 0.5px solid var(--border-strong);
  cursor: pointer;
  transition: background var(--transition);
  align-items: flex-start;
}
.msg-row:hover   { background: var(--bg-main); }
.msg-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white; font-weight: 700; font-size: 0.88rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative;
}
.msg-online { position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 2px solid white; }
.msg-info    { flex: 1; min-width: 0; }
.msg-name    { font-weight: 700; font-size: 0.88rem; }
.msg-preview { font-size: 0.80rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.msg-meta    { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.msg-time    { font-size: 0.70rem; color: var(--text-muted); }
.msg-unread-badge {
  background: var(--primary); color: white; border-radius: 50%;
  width: 18px; height: 18px; font-size: 0.62rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .msg-link-card { background: #1a1a26; border-color: var(--border-strong); }

/* FORM ELEMENTS */
.form-group   { margin-bottom: 16px; }
.form-label   { display: block; font-weight: 700; font-size: 0.83rem; margin-bottom: 6px; }
.form-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  font-family: inherit;
  font-size: 0.88rem; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  background: var(--bg-card);
  color: var(--text);
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3.5px rgba(200,16,46,0.10); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  font-family: inherit;
  font-size: 0.88rem; outline: none;
  background: var(--bg-card); cursor: pointer;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3.5px rgba(200,16,46,0.10); }
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea  { background: #111118; color: var(--text); border-color: var(--border-strong); }
[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] .form-textarea:focus { background: #1a1a26; }
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #4a4a62; }

/* BUTTONS */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #e0203e 100%);
  color: white; border: none;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.92rem; font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-red);
  transition: transform var(--transition-spring), box-shadow var(--transition), filter var(--transition);
  display: inline-block;
  letter-spacing: 0.1px;
  position: relative; overflow: hidden;
}
.btn-primary:hover  { transform: translateY(-3px); box-shadow: var(--shadow-red-lg); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(1px); box-shadow: var(--shadow-xs); filter: brightness(0.96); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--text); border: none;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.90rem; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(244,180,0,.28), 0 2px 6px rgba(244,180,0,.14);
  transition: transform var(--transition-spring), box-shadow var(--transition), filter var(--transition);
  display: inline-block;
}
.btn-gold:hover  { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(244,180,0,0.40); filter: brightness(1.05); }
.btn-gold:active { transform: translateY(1px); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.86rem; font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-spring);
  display: inline-block;
}
.btn-outline:hover  { background: var(--primary); color: white; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,16,46,0.28); }
.btn-outline:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border-strong);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.86rem; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-ghost:hover { background: var(--bg-main); color: var(--text); border-color: var(--border-strong); }

.btn-blue {
  background: linear-gradient(135deg, var(--blue) 0%, #1D4ED8 100%);
  color: white; border: none;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.90rem; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(37,99,235,.20), 0 2px 6px rgba(37,99,235,.10);
  transition: transform var(--transition-spring), box-shadow var(--transition), filter var(--transition);
}
.btn-blue:hover  { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(37,99,235,0.36); }
.btn-blue:active { transform: translateY(1px); }

.btn-sm { padding: 7px 16px !important; font-size: 0.80rem !important; }
.btn-lg { padding: 16px 36px !important; font-size: 1.0rem !important; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 24px; color: var(--text-muted); }
.empty-state i  { font-size: 2.8rem; margin-bottom: 14px; opacity: 0.28; display: block; }
.empty-state h3 { font-weight: 700; font-size: 0.98rem; margin-bottom: 6px; color: var(--text); }
.empty-state p  { font-size: 0.83rem; }

/* SCROLLBAR — defined near .nav and .right above */

/* MOBILE BOTTOM NAV */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 0.5px solid var(--border-strong);
  z-index: 1000;
  padding: 0 4px;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.08);
}
.mobile-nav-item {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; padding: 8px 6px;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-spring);
  color: var(--text-muted);
  font-size: 0.56rem; font-weight: 700;
  text-decoration: none;
  flex: 1; min-width: 0;
  position: relative;
}
.mobile-nav-item i { font-size: 1.16rem; transition: transform var(--transition-spring); }
.mobile-nav-item:hover { transform: translateY(-2px); color: var(--primary); }
.mobile-nav-item:hover i { transform: scale(1.18); }
.mobile-nav-item.active { color: var(--primary); }
.mobile-nav-item .mob-badge {
  position: absolute; top: 2px; right: 8px;
  background: #FF4B4B; color: white;
  font-size: 0.50rem; font-weight: 800;
  min-width: 14px; height: 14px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  box-shadow: 0 1px 4px rgba(255,75,75,0.4);
}
.mobile-nav-post {
  background: linear-gradient(135deg, var(--primary) 0%, #e0203e 100%);
  color: white !important;
  border-radius: 50%;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.28rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-red);
  transition: transform var(--transition-spring), box-shadow var(--transition);
  text-decoration: none;
  margin: 0 4px;
}
.mobile-nav-post:hover  { transform: translateY(-3px) scale(1.08); box-shadow: var(--shadow-red-lg); }
.mobile-nav-post:active { transform: scale(0.92); }
[data-theme="dark"] .mobile-nav { background: rgba(15,17,21,0.94); border-top-color: var(--border-strong); }

/* Mobile nav sheet (more menu) */
[data-theme="dark"] .mn-sheet  { background: #1a1a26; }
[data-theme="dark"] .mn-handle { background: #2e2e42; }
[data-theme="dark"] .intent-item { background: #111118; border-color: var(--border-strong); }
[data-theme="dark"] .more-drawer-item:active { background: var(--primary-soft); }
[data-theme="dark"] .fn-pill { background: #111118; border-color: var(--border-strong); color: #9ca3af; }
[data-theme="dark"] .fn-pill:hover { color: #f87171; border-color: #f87171; background: #200b10; }

/* ACTIVITY FEED */
.activity-item {
  display: flex; gap: 10px;
  align-items: flex-start;
  padding: 9px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition-bounce);
  animation: slide-in-top 0.3s var(--ease-out);
}
.activity-item:hover { background: var(--bg-main); transform: translateX(3px); }
.activity-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.76rem; flex-shrink: 0;
}
.activity-content { flex: 1; font-size: 0.74rem; line-height: 1.48; color: var(--text); }
.activity-content strong { color: var(--primary); font-weight: 800; }
.activity-time { font-size: 0.61rem; color: var(--text-muted); margin-top: 2px; font-weight: 600; }

/* TOAST */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 20px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%) translateY(18px);
  background: rgba(26,26,28,0.96);
  color: white;
  padding: 12px 18px 12px 16px;
  border-radius: 16px;
  font-size: 0.83rem; font-weight: 600;
  font-family: inherit;
  box-shadow: 0 12px 40px rgba(0,0,0,0.24), 0 0 0 0.5px rgba(255,255,255,0.08);
  z-index: 99998; opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.32s var(--ease-spring);
  max-width: calc(100vw - 40px);
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap;
  backdrop-filter: blur(14px);
}
@media (min-width: 861px) { .toast { bottom: 28px; } }
.toast.on   { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.ok   { background: rgba(21,128,61,0.96); }
.toast.err  { background: rgba(220,38,38,0.96); }
.toast.warn { background: rgba(217,119,6,0.96); }

/* MODALS */
.modal {
  display: none;
  position: fixed;
  z-index: 2000; inset: 0;
  background: rgba(0,0,0,0.48);
  padding: 20px 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal.open,
.modal[style*="display: block"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: var(--bg-card);
  margin: auto; width: 100%; max-width: 600px;
  border-radius: 26px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.26), 0 0 0 0.5px rgba(255,255,255,0.06);
  position: relative;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  animation: modal-pop 0.32s var(--ease-spring);
}
body.modal-open { overflow: hidden !important; height: 100vh; }
.modal-header {
  padding: 18px 22px;
  border-bottom: none;
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
}
.modal-title,
.modal-header h2 { font-size: 1.08rem; font-weight: 800; margin: 0; }
.modal-close,
.close-modal {
  background: rgba(0,0,0,0.06); border: none;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-muted); cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition-spring), color var(--transition), background var(--transition);
}
.modal-close:hover,
.close-modal:hover { transform: rotate(90deg) scale(1.1); color: var(--primary); background: var(--primary-soft); }
.modal-body   { padding: 20px 22px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid rgba(0,0,0,.045);
  display: flex; gap: 10px; justify-content: flex-end; align-items: center;
  background: transparent;
  border-radius: 0 0 26px 26px;
  flex-shrink: 0;
}
.modal-content.sm { max-width: 440px; }
.modal-content.lg { max-width: 720px; }
.modal-content.xl { max-width: 940px; }
[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-body   { background: var(--bg-card); }
[data-theme="dark"] .modal-footer { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .filter-pill  { color: var(--text); }

/* TRUST BADGES */
.trust-tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--blue); color: #fff;
  font-size: .54rem; font-weight: 900; flex-shrink: 0;
  margin-left: 3px; vertical-align: middle;
  box-shadow: 0 1px 4px rgba(37,99,235,.3);
}
.trust-tick.gold  { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); box-shadow: 0 1px 4px rgba(244,180,0,.3); }
.trust-tick.green { background: var(--green-deep); box-shadow: 0 1px 4px rgba(22,163,74,.3); }

.seller-trust-row {
  display: flex; align-items: center; gap: 5px;
  font-size: .67rem; color: var(--text-muted); margin-top: 3px; flex-wrap: wrap;
}
.seller-trust-row .str-name { font-weight: 700; color: var(--text); }
.seller-stat-pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: .59rem; font-weight: 700; padding: 1px 6px; border-radius: 20px;
}
.ssp-green { background: #f0fdf4; color: #16a34a; }
.ssp-amber { background: #fffbeb; color: #b45309; }
.ssp-blue  { background: #eff6ff; color: #2563eb; }

/* CARD SELLER ROW */
.card-seller-row {
  display: flex; align-items: center; gap: 5px;
  font-size: .64rem; color: var(--text-muted); margin-top: 5px;
}
.card-seller-name {
  font-weight: 700; color: var(--text);
  max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-reliability {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: .59rem; font-weight: 800; color: #059669;
  background: #f0fdf4; padding: 1px 5px; border-radius: 8px;
}

/* SKELETON LOADING */
.skeleton {
  background-color: rgba(0,0,0,0.06);
  background-image: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.10) 50%, rgba(0,0,0,0.06) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.6s infinite;
  border-radius: 8px;
}
[data-theme="dark"] .skeleton {
  background-color: rgba(255,255,255,0.05);
  background-image: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.05) 75%);
}

/* SAJHA BADGE & GROUP BUY */
.badge-sajha {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  font-size: 0.68rem; font-weight: 800;
  padding: 3px 10px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 5px;
  box-shadow: var(--shadow-red);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.group-buy-progress { height: 5px; background: var(--border-strong); border-radius: 4px; overflow: hidden; margin: 8px 0 4px; }
.group-buy-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
  transition: width 0.6s var(--ease-spring);
  border-radius: 4px;
}
.group-buy-bar.unlocked { background: linear-gradient(90deg, var(--green), var(--green-deep)); }

.task-offer   { border-left: 3.5px solid var(--purple); background: #F5F3FF; }
.task-request { border-left: 3.5px solid var(--blue);   background: var(--blue-soft); }

/* HAPPY HOUR BADGE */
.happy-hour-badge {
  background: linear-gradient(135deg, #d946ef, var(--purple));
  color: white; font-weight: 800;
  padding: 3px 10px; border-radius: 10px;
  font-size: 0.72rem;
  box-shadow: 0 4px 12px rgba(217,70,239,0.35);
  animation: pulse 2s infinite;
}

/* NEARBY BANNER */
[data-theme="dark"] .nearby-banner { background: linear-gradient(135deg,#052e16,#14532d); border-color: #166534; color: #86efac; }

/* FORM VALIDATION STATES */
.form-input.input-valid,
.form-select.input-valid,
input.input-valid,
textarea.input-valid {
  border-color: #22c55e !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2322c55e'%3E%3Cpath d='M9 12l2 2 4-4M21 12a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px;
}
.form-input.input-error,
.form-select.input-error,
input.input-error,
textarea.input-error {
  border-color: #ef4444 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ef4444'%3E%3Cpath d='M12 9v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px;
}
.field-hint     { font-size: .67rem; margin-top: 3px; line-height: 1.4; transition: color .2s; }
.field-hint.ok  { color: #16a34a; }
.field-hint.err { color: #dc2626; }

/* ANIMATIONS */
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.75; }
}
@keyframes pulse-red {
  0%,100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255,75,75,0.4); }
  50%      { transform: scale(1.15); box-shadow: 0 0 0 5px rgba(255,75,75,0); }
}
@keyframes pulse-live {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.7); }
}
@keyframes slide-in-top {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes skeleton-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.90) translateY(24px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes pop-in {
  0%   { transform: scale(0.8); opacity: 0; }
  70%  { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.trust-badge-animated { animation: pop-in .36s var(--ease-spring) both; }
.fade-up { animation: fade-up 0.4s var(--ease-out) both; }

/* RESPONSIVE: 1100px */
@media (max-width: 1100px) {
  .right { display: none; }
  .main  { border-right: none; }
}

/* RESPONSIVE: 860px */
@media (max-width: 860px) {
  :root { --nav-width: 72px; }
  .nav { padding: 16px 8px; align-items: center; background: var(--bg-sidebar); }
  .nav-logo { padding: 8px 0 18px; justify-content: center; }
  .nw-text { display: none; }
  .nav-link span, .nav-user-info, .nav-badge { display: none; }
  .nav-link { justify-content: center; padding: 13px; width: 100%; gap: 0; }
  .nav-link i { width: auto; margin: 0; }
  .nav-link.active { padding: 13px; }
  .btn-post {
    width: 44px; height: 44px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    margin-top: 10px;
  }
  .btn-post::after { content: '+'; font-size: 1.5rem; font-weight: 900; }
  .btn-post span { display: none; }
  .nav-user { justify-content: center; padding: 10px; }
  .nav-divider { width: 100%; }
}

/* RESPONSIVE: 600px */
@media (max-width: 600px) {
  .nav { display: none; }
  .mobile-nav { display: flex; }
  body { padding-bottom: 0; }
  .app { flex-direction: column; padding-bottom: var(--bottom-nav-height); min-height: 100vh; }
  .main { width: 100%; border-right: none; border-left: none; box-shadow: none; }

  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar-title { font-size: 0.92rem; }
  .search-input { font-size: 0.80rem; padding: 8px 10px 8px 36px; }
  .topbar-avatar { width: 32px; height: 32px; font-size: 0.70rem; }

  .feature-grid { padding: 12px; gap: 8px; }
  .feat-card { padding: 16px 14px; }
  .feat-card h2 { font-size: 1.02rem; }
  .feat-card p  { font-size: 0.70rem; }

  .items-grid { grid-template-columns: repeat(2, 1fr); padding: 0 12px 22px; gap: 10px; }
  .item-img   { height: 128px; font-size: 2.2rem; }
  .item-body  { padding: 9px 11px 12px; }
  .item-title { font-size: 0.82rem; }
  .item-price { font-size: 0.90rem; }

  .listing-card  { padding: 12px; gap: 10px; margin: 0 12px 8px; }
  .listing-thumb { width: 68px; height: 60px; font-size: 1.5rem; }
  .listing-title { font-size: 0.84rem; }
  .listing-price { font-size: 0.92rem; }
  .listing-meta  { gap: 5px; }

  .filter-bar  { padding: 10px 12px; gap: 6px; }
  .filter-pill { padding: 5px 12px; font-size: 0.74rem; }
  .section-head { padding: 16px 14px 10px; }
  .section-head h3 { font-size: 0.94rem; }

  .radar-card   { padding: 12px; gap: 10px; }
  .radar-avatar { width: 40px; height: 40px; font-size: 1.18rem; }
  .radar-name   { font-size: 0.84rem; }
  .tank-card    { padding: 14px; }
  .tank-title   { font-size: 0.88rem; }
  .auction-img  { height: 110px; font-size: 2.3rem; }
  .auction-body { padding: 10px 12px; }
  .auction-title { font-size: 0.82rem; }
  .auction-bid  { font-size: 0.98rem; }
  .auction-footer { padding: 6px 12px 10px; }

  .msg-row { padding: 12px; }

  .profile-banner { height: 120px; }
  .profile-info   { padding: 48px 12px 16px; }
  .profile-name   { font-size: 1.12rem; }
  .profile-stats  { gap: 12px; }
  .profile-stat strong { font-size: 0.88rem; }
  .profile-stat span   { font-size: 0.76rem; }

  .tab-item { padding: 12px 14px; font-size: 0.76rem; }

  .modal { padding: 0; }
  .modal.open,
  .modal[style*="display: block"] { align-items: flex-end; }
  .modal-content {
    border-radius: 24px 24px 0 0;
    max-height: 92vh;
    animation: modal-sheet 0.32s var(--ease-spring);
  }
  @keyframes modal-sheet {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  .modal-body   { padding-bottom: 120px; }
  .modal-footer { padding-bottom: calc(20px + var(--bottom-nav-height)); }

  .main > div > div[style*="padding:24px"],
  .main > div[style*="padding:24px"] { padding: 14px !important; }
}

/* RESPONSIVE: 400px */
@media (max-width: 400px) {
  .feature-grid { grid-template-columns: 1fr; }
  .items-grid   { gap: 8px; }
  .mobile-nav-item > span { display: none; }
  .mobile-nav-item { gap: 0; }
  .profile-stats { gap: 8px; }
}

/* DARK MODE */
[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-body       { background: var(--bg-card); }
[data-theme="dark"] .modal-footer     { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .filter-pill      { color: var(--text); }
[data-theme="dark"] .listing-card,
[data-theme="dark"] .auction-card,
[data-theme="dark"] body {
  background-color: #0f0f17;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(100,90,180,0.30) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(80,100,180,0.25) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(180,60,60,0.12) 0%, transparent 70%);
}
[data-theme="dark"] .nav    { background: rgba(20,18,35,0.82) !important; border-right-color: rgba(255,255,255,.07) !important; }
[data-theme="dark"] .main   { background: transparent !important; border-color: rgba(255,255,255,.06) !important; }
[data-theme="dark"] .topbar { background: rgba(15,13,26,0.80) !important; border-bottom-color: rgba(255,255,255,.07) !important; }
[data-theme="dark"] .widget { background: rgba(30,26,50,0.85) !important; border-color: rgba(255,255,255,.07) !important; }
[data-theme="dark"] .tank-card,
[data-theme="dark"] .radar-card       { background: var(--bg-card); }
[data-theme="dark"] .nav-link         { color: var(--text); }
[data-theme="dark"] .nav-link i       { color: rgba(255,255,255,0.4); }
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link:hover i { color: var(--primary); }
[data-theme="dark"] .nav-link.active i { color: #fff !important; }
[data-theme="dark"] .nav-link.active  { background: var(--primary) !important; }

/* ═══════════════════════════════════════════════════════════
   DISCORD × macOS × APPLE REDESIGN — nav & global overrides
═══════════════════════════════════════════════════════════ */

/* ── Nav active: light red tint (blueprint style) ── */
.nav-link.active,
[data-theme="dark"] .nav-link.active {
  background: rgba(220, 32, 32, 0.09) !important;
  color: #dc2020 !important;
  font-weight: 700;
  box-shadow: none !important;
  border-radius: var(--radius-sm);
}
.nav-link.active i,
[data-theme="dark"] .nav-link.active i { color: #dc2020 !important; }
/* Community tile icons must stay white even when the row is active */
.nav-link.active .nav-comm-icon i,
[data-theme="dark"] .nav-link.active .nav-comm-icon i { color: #fff !important; }
.nav-link.active .nav-comm-info span { color: #dc2020 !important; }

/* ── Nav user card: column layout for points bar ─────────── */
.nav-user {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 4px !important;
  padding: 10px 12px !important;
}
.nav-user-top-row {
  display: flex; align-items: center; gap: 10px;
}
.nav-user-name   { font-weight: 700; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.nav-user-handle { display: none; }

/* ── Nav locked: override style.css opacity:0.5 ──────────── */
.nav-locked { opacity: 1 !important; pointer-events: auto !important; }

/* Locked community icon: subtle ghost tile with lock overlay */
.nav-comm-locked-icon {
  background: rgba(107,114,128,.14) !important;
  border: 1.5px solid rgba(107,114,128,.18) !important;
}
.nav-comm-locked-icon i { color: rgba(107,114,128,.55) !important; }

/* Locked name + sub-label */
.nl-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.nl-name  { font-size: .84rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl-sub   { font-size: .65rem; font-weight: 600; color: var(--text-faint); letter-spacing: .1px; }

/* Lock icon */
.nav-lock-icon { font-size: .68rem !important; color: rgba(107,114,128,.45) !important; flex-shrink: 0; }

/* Hover hint */
.nav-locked:hover { background: rgba(107,114,128,.06) !important; }
.nav-locked:hover .nav-comm-locked-icon { background: rgba(107,114,128,.20) !important; }

/* ═══════════════════════════════════════════════════════════════
   JUNE 17 FIRST FIX — SIDEBAR GLASSMORPHISM & OVERFLOW FIXES
   ═══════════════════════════════════════════════════════════════ */

/* Glassmorphism — bottom user card */
.nav-user {
  background: rgba(255,255,255,0.42) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255,255,255,0.55) !important;
  border-radius: 28px !important;
  box-shadow: 0 10px 35px rgba(120,120,140,0.08) !important;
  padding: 18px !important;
  gap: 6px !important;
  flex-direction: column !important;
  align-items: stretch !important;
}
.nav-user:hover {
  background: rgba(255,255,255,0.58) !important;
  transform: translateY(-1px);
}

/* Glassmorphism — top profile card */
.nav-profile-top {
  background: rgba(255,255,255,0.42) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255,255,255,0.55) !important;
  border-radius: 24px !important;
  box-shadow: 0 10px 35px rgba(120,120,140,0.08) !important;
}

/* Profile name text — dark + ellipsis */
.nav-pt-name, .nav-user-name {
  color: #23253A;
  max-width: 85%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Profile handle text — muted gray */
.nav-user-handle, .nav-pt-handle {
  color: #6B7280 !important;
}

/* Flex containers: allow ellipsis to work */
.nav-pt-info {
  flex: 1;
  min-width: 0;
}
.nav-user-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* Active nav link icon colour matches link */
.nav-link.active i { color: #E11D48; }

/* ═══════════════════════════════════════════════════════════════
   JUNE 17 SECOND FIX — 5 VISUAL TWEAKS
   ═══════════════════════════════════════════════════════════════ */

/* CHANGE 1 — Remove left sidebar gradient background */
.nav { background: transparent; background-attachment: initial; }

/* CHANGE 2 — White cards slightly translucent (light mode only) */
:root { --bg-card: rgba(255,255,255,0.7); }

/* CHANGE 3 — Hide right sidebar scrollbar, keep scrolling */
.right::-webkit-scrollbar { display: none; }
.right { scrollbar-width: none; }

/* CHANGE 4 — Active community row: pink card, red border, checkmark */
a.nav-link.nav-comm.active {
  background: #FDF1F3 !important;
  border: 1.5px solid rgba(200,16,46,0.30) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  position: relative !important;
}
a.nav-link.nav-comm.active .nav-comm-info span {
  color: #16181D !important;
  font-weight: 700 !important;
}
a.nav-link.nav-comm.active::after {
  content: '\f00c';
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(200,16,46,0.18);
  color: #C8102E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .62rem;
}

/* CHANGE 5 — Online count text dark when row is active */
a.nav-link.nav-comm.active .nav-comm-online {
  color: #16181D !important;
}


/* ── Feature identity colours on the phone bottom nav ── */
.mobile-nav-item.mob-pasal.active  { color: #C8102E; }
.mobile-nav-item.mob-radar.active  { color: #2563EB; }
.mobile-nav-item.mob-guff.active   { color: #059669; }
.mobile-nav-item.mob-radar:hover   { color: #2563EB; }
.mobile-nav-item.mob-guff:hover    { color: #059669; }
.mobile-nav-item:focus-visible, .nav-link:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 10px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* ── Sticky topbar: frosted but opaque enough that scrolling cards never smear through the search text ── */
.topbar {
  background: rgba(247,244,251,.93) !important;
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid rgba(0,0,0,.04);
}
[data-theme="dark"] .topbar { background: rgba(15,13,26,.93) !important; border-bottom-color: rgba(255,255,255,.06) !important; }


/* ── One back button + one page-title style, everywhere ── */
.back-btn {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 0;
  background: var(--bg-card); border: none; cursor: pointer; text-decoration: none;
  font-size: .88rem; font-weight: 700; color: var(--text); font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.07);
  transition: background .15s, color .15s, transform .15s;
}
.back-btn:hover { background: var(--primary-soft); color: var(--primary); transform: scale(1.06); }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title, .bar-title, .back-bar-title, #page-title {
  font-size: 1.1rem; font-weight: 800; letter-spacing: -.4px; color: var(--text);
}
.bar-title, .back-bar-title, #page-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
@media (max-width: 600px) { .topbar-title, .bar-title, .back-bar-title, #page-title { font-size: 1rem; } }

/* Live feature icons share one brand style (locked ones stay neutral) */
.nav-comm:not(.nav-locked) .nav-comm-icon { background: linear-gradient(145deg, #E8192C, #A00D25) !important; box-shadow: 0 4px 12px -4px rgba(200,16,46,.55); }

/* ── Dark theme consistency pass (navy system) ── */
[data-theme="dark"] a.nav-link.nav-comm.active { background: rgba(255,47,94,.14) !important; border: 1px solid rgba(255,47,94,.45) !important; }
[data-theme="dark"] a.nav-link.nav-comm.active .nav-comm-info span { color: #fff !important; }
[data-theme="dark"] a.nav-link.nav-comm.active .nav-comm-info strong,
[data-theme="dark"] a.nav-link.nav-comm.active .nav-comm-name { color: #fff !important; }
[data-theme="dark"] a.nav-link.nav-comm.active::after { color: #FF2F5E !important; background: rgba(255,47,94,.18) !important; }
[data-theme="dark"] .listing-empty-card.used,
[data-theme="dark"] .listing-empty-card.sold { background: #0A1B3A !important; border: 1px solid rgba(255,255,255,.1) !important; }
[data-theme="dark"] .listing-empty-card .le-title { color: #F5F7FC !important; }
[data-theme="dark"] .listing-empty-card .le-sub, [data-theme="dark"] .listing-empty-card p { color: #8393B4 !important; }
[data-theme="dark"] .listing-empty-card.used .le-lock { background: rgba(255,47,94,.16) !important; color: #FF2F5E !important; }
[data-theme="dark"] .listing-empty-card.sold .le-lock { background: rgba(255,255,255,.07) !important; color: #8393B4 !important; }
[data-theme="dark"] .notif-icon.message,
[data-theme="dark"] .notif-icon.radar,
[data-theme="dark"] .notif-icon.bhariya,
[data-theme="dark"] .notif-icon.points { background: rgba(255,47,94,.14); color: #FF2F5E; }
[data-theme="dark"] a.nav-link.nav-comm.active .nav-comm-online,
[data-theme="dark"] a.nav-link.nav-comm.active .nav-comm-info small { color: rgba(255,255,255,.7) !important; }

/* ── Dark mode: same chunky primary button as the marketing site (dark only) ── */
[data-theme="dark"] .topbar-post-btn, [data-theme="dark"] .btn-post-offer, [data-theme="dark"] .btn-primary,
[data-theme="dark"] .open-modal, [data-theme="dark"] .le-btn, [data-theme="dark"] .compose-action-btn.primary {
  background: #FF2F5E !important; color: #fff !important; border: 0 !important; border-radius: 14px !important;
  box-shadow: 0 4px 0 #A50F37 !important; font-weight: 800 !important; transition: transform .1s, box-shadow .1s, background .15s;
}
[data-theme="dark"] .topbar-post-btn:hover, [data-theme="dark"] .btn-post-offer:hover, [data-theme="dark"] .btn-primary:hover, [data-theme="dark"] .open-modal:hover { background: #FF4572 !important; transform: translateY(-1px); box-shadow: 0 5px 0 #A50F37 !important; }
[data-theme="dark"] .topbar-post-btn:active, [data-theme="dark"] .btn-post-offer:active, [data-theme="dark"] .btn-primary:active, [data-theme="dark"] .open-modal:active { transform: translateY(3px); box-shadow: 0 1px 0 #A50F37 !important; }
[data-theme="dark"] .right .vault-card, [data-theme="dark"] body.mj-themed .right .vault-card { background: linear-gradient(135deg, #D8164A 0%, #8F0D28 100%) !important; }
