/* ═══════════════════════════════════════════════════════════
   SwapMart — style.css  v2.0
   設計原則：清晰可讀、活潑台灣風、橘黃主色、現代圓角
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  /* Brand Colors */
  --primary:        #FF6B35;
  --primary-dark:   #E55A25;
  --primary-light:  #FFF0EA;
  --secondary:      #2EC4B6;
  --secondary-dark: #24A99E;
  --accent:         #FFD23F;
  --dark:           #1A1A2E;
  --dark-2:         #16213E;

  /* Neutral */
  --gray-50:   #FAFAFA;
  --gray-100:  #F8F9FA;
  --gray-200:  #E9ECEF;
  --gray-300:  #DEE2E6;
  --gray-500:  #ADB5BD;
  --gray-600:  #6C757D;
  --gray-700:  #495057;
  --gray-800:  #343A40;

  /* Semantic */
  --danger:   #EF233C;
  --success:  #28A745;
  --warning:  #FFC107;
  --info:     #17A2B8;

  /* Surface */
  --bg-page:  #F4F6F9;
  --bg-card:  #FFFFFF;
  --surface-2:#F8F9FA;

  /* Text */
  --text-primary:   #1A1A2E;
  --text-secondary: #495057;
  --text-muted:     #6C757D;
  --text-light:     #ADB5BD;

  /* Radius */
  --radius:    14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadow */
  --shadow-xs:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:      0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-md:   0 8px 28px rgba(0,0,0,.10), 0 3px 10px rgba(0,0,0,.05);
  --shadow-hover:0 12px 36px rgba(255,107,53,.20), 0 4px 12px rgba(0,0,0,.06);

  /* Motion */
  --transition: all .22s cubic-bezier(.4,0,.2,1);
  --transition-slow: all .38s cubic-bezier(.4,0,.2,1);

  /* Font */
  --font: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ════════════════════════════
   NAVBAR
════════════════════════════ */
#mainNav {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  padding: .55rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,.25);
  z-index: 1040;
}
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,107,53,.35);
}
.brand-text {
  font-family: 'Nunito', 'Noto Sans TC', sans-serif;
  font-weight: 900; font-size: 1.18rem; color: #fff; letter-spacing: .5px;
}
#mainNav .nav-link { color: rgba(255,255,255,.80) !important; font-size: .88rem; transition: var(--transition); padding: .5rem .65rem; border-radius: 6px; }
#mainNav .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.08); }
#mainNav .nav-link.active { color: var(--accent) !important; }
.badge-notify {
  position: absolute; top: 2px; right: 2px;
  background: var(--danger); color: #fff; font-size: .6rem;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
#mainNav .form-control {
  border: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: .86rem; background: rgba(255,255,255,.1); color: #fff;
}
#mainNav .form-control::placeholder { color: rgba(255,255,255,.5); }
#mainNav .form-control:focus { background: rgba(255,255,255,.15); box-shadow: none; color: #fff; }
#mainNav .btn-warning { background: var(--accent); border-color: var(--accent); color: #333; font-weight: 700; }

/* Alert bars */
.phishing-bar { background: linear-gradient(90deg, #1a1a2e, #0f3460); color: #fff; padding: .3rem 0; font-size: .82rem; }
.phishing-bar a { color: var(--accent); }
.verify-alert-bar { background: linear-gradient(135deg, #FF6B35, #e55a25); border-bottom: 1px solid rgba(0,0,0,.1); }

/* ════════════════════════════
   HERO
════════════════════════════ */
.hero-banner {
  background: linear-gradient(135deg, var(--dark) 0%, #0F3460 55%, var(--primary-dark) 100%);
  color: #fff; padding: 3.5rem 0 4rem; position: relative; overflow: hidden;
}
.hero-banner::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-banner h1 { font-weight: 900; font-size: clamp(1.7rem, 4vw, 2.8rem); }
.hero-banner p { opacity: .85; font-size: 1rem; }
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-stat .num { font-size: 1.7rem; font-weight: 900; color: var(--accent); }
.hero-stat .lbl { font-size: .78rem; opacity: .7; }

/* ════════════════════════════
   ITEM CARDS
════════════════════════════ */
.item-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  overflow: hidden; height: 100%;
  display: flex; flex-direction: column;
}
.item-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255,107,53,.2);
}
/* Alias for pages using .item-img-wrap / .item-img */
.item-img-wrap { position: relative; padding-top: 68%; overflow: hidden; background: var(--gray-100); flex-shrink: 0; display: block; }
.item-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.item-card:hover .item-img { transform: scale(1.06); }
.item-body { flex: 1; display: flex; flex-direction: column; padding: .85rem; }
.item-title { font-weight: 700; font-size: .92rem; line-height: 1.4; margin-bottom: .35rem; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-title:hover { color: var(--primary); }
.item-points { font-size: 1rem; font-weight: 800; color: var(--primary); }
.item-meta { font-size: .76rem; color: var(--text-muted); }

/* Keep card-* aliases */
.item-card .card-img-wrap { position: relative; padding-top: 68%; overflow: hidden; background: var(--gray-100); flex-shrink: 0; }
.item-card .card-img-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.item-card:hover .card-img-wrap img { transform: scale(1.06); }
.item-card .card-body { flex: 1; display: flex; flex-direction: column; padding: .85rem; }
.item-card .card-title { font-weight: 700; font-size: .92rem; line-height: 1.4; margin-bottom: .35rem; }
.item-card .card-title a { color: var(--text-primary); }
.item-card .card-title a:hover { color: var(--primary); }
.item-card .price-tag { font-size: 1.05rem; font-weight: 800; color: var(--primary); }
.item-card .price-tag.points { color: var(--secondary-dark); }
.img-badges { position: absolute; top: 7px; left: 7px; display: flex; flex-direction: column; gap: 3px; }
.img-badges .badge { font-size: .66rem; padding: .22em .5em; }
.btn-fav {
  position: absolute; top: 7px; right: 7px;
  background: rgba(255,255,255,.92); border: none; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); color: var(--gray-500); font-size: .82rem;
  box-shadow: var(--shadow-xs);
}
.btn-fav:hover, .btn-fav.active { color: var(--danger); background: #fff; transform: scale(1.1); }

/* ════════════════════════════
   CATEGORY SCROLL
════════════════════════════ */
.cat-scroll { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: .5rem; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-scroll .cat-btn { flex-shrink: 0; }
.cat-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: .4rem .95rem; border-radius: 20px; font-size: .84rem; font-weight: 600;
  border: 2px solid var(--gray-200); color: var(--text-secondary); background: var(--bg-card);
  transition: var(--transition); cursor: pointer; white-space: nowrap; text-decoration: none;
}
.cat-btn:hover, .cat-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ════════════════════════════
   SECTION HEADERS
════════════════════════════ */
.section-title {
  font-weight: 900; font-size: 1.35rem; color: var(--text-primary);
  position: relative; padding-left: 14px;
}
.section-title::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 70%; background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 3px;
}

/* ════════════════════════════
   SIDEBAR / FILTERS
════════════════════════════ */
.filter-card {
  background: var(--bg-card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.2rem;
  border: 1px solid var(--gray-200);
}
.filter-card .form-label { font-weight: 600; font-size: .83rem; color: var(--text-secondary); margin-bottom: .3rem; }
.filter-card .form-control, .filter-card .form-select { border-radius: var(--radius-sm); border-color: var(--gray-200); font-size: .86rem; }

/* ════════════════════════════
   ITEM GALLERY
════════════════════════════ */
.item-gallery .main-img { border-radius: var(--radius); overflow: hidden; }
.item-gallery .main-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: opacity .2s; }
.item-gallery .thumbs { display: flex; gap: 7px; margin-top: 7px; flex-wrap: wrap; }
.item-gallery .thumb { width: 62px; height: 62px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: var(--transition); flex-shrink: 0; }
.item-gallery .thumb:hover, .item-gallery .thumb.active { border-color: var(--primary); }
.item-gallery .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ════════════════════════════
   USER CARD
════════════════════════════ */
.user-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; text-align: center; border: 1px solid var(--gray-200); }
.user-avatar-wrap { position: relative; display: inline-block; }
.user-avatar { width: 86px; height: 86px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); }
.user-level-badge { position: absolute; bottom: 0; right: 0; padding: 2px 7px; border-radius: 12px; font-size: .68rem; font-weight: 700; }

/* ════════════════════════════
   POINTS DISPLAY
════════════════════════════ */
.points-display {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius); padding: 1.4rem; color: #fff; text-align: center;
  box-shadow: 0 8px 24px rgba(255,107,53,.3);
}
.points-display .pts-num { font-size: 2.4rem; font-weight: 900; }
.points-display .pts-lbl { font-size: .83rem; opacity: .85; }
.point-log-row { display: flex; justify-content: space-between; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--gray-200); }
.point-log-row:last-child { border-bottom: none; }
.pts-plus { color: var(--success); font-weight: 700; }
.pts-minus { color: var(--danger); font-weight: 700; }

/* ════════════════════════════
   FORM CARD
════════════════════════════ */
.form-card {
  background: var(--bg-card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.5rem 1.75rem;
  border: 1px solid var(--gray-200);
}
.form-card .form-control, .form-card .form-select {
  border-radius: var(--radius-sm); border-color: var(--gray-200); transition: var(--transition);
}
.form-card .form-control:focus, .form-card .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(255,107,53,.14);
}
.form-card label { font-weight: 600; font-size: .86rem; color: var(--text-secondary); }

/* ════════════════════════════
   UPLOAD ZONE
════════════════════════════ */
.upload-zone {
  border: 2px dashed var(--gray-300); border-radius: var(--radius);
  padding: 1.8rem 1rem; text-align: center; transition: var(--transition);
  cursor: pointer; background: var(--gray-50);
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--primary); background: var(--primary-light); }
.upload-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .7rem; }
.prev-img { width: 78px; height: 78px; border-radius: var(--radius-sm); overflow: hidden; position: relative; border: 2px solid var(--gray-200); flex-shrink: 0; }
.prev-img img { width: 100%; height: 100%; object-fit: cover; }
.del-img { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.65); color: #fff; border: none; border-radius: 50%; width: 18px; height: 18px; font-size: .6rem; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.prev-order { position: absolute; bottom: 2px; left: 3px; background: rgba(0,0,0,.55); color: #fff; font-size: .62rem; padding: 0 4px; border-radius: 3px; }

/* ════════════════════════════
   AUTH PAGES
════════════════════════════ */
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--dark) 0%, #0F3460 100%); padding: 2rem 1rem; }
.auth-card { background: var(--bg-card); border-radius: var(--radius-xl); padding: 2.4rem; width: 100%; max-width: 440px; box-shadow: 0 24px 64px rgba(0,0,0,.32); }
.auth-card .auth-logo { text-align: center; margin-bottom: 1.4rem; }
.auth-card h2 { font-weight: 900; font-size: 1.45rem; text-align: center; color: var(--text-primary); }
.auth-card .form-control { border-radius: var(--radius-sm); padding: .62rem .9rem; border-color: var(--gray-200); }
.auth-card .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(255,107,53,.14); }
.btn-auth { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border: none; border-radius: var(--radius-sm); padding: .7rem; font-weight: 700; font-size: 1rem; transition: var(--transition); width: 100%; cursor: pointer; }
.btn-auth:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,107,53,.35); color: #fff; }
.divider-text { text-align: center; color: var(--text-muted); font-size: .8rem; position: relative; margin: 1rem 0; }
.divider-text::before, .divider-text::after { content: ''; position: absolute; top: 50%; width: 35%; height: 1px; background: var(--gray-200); }
.divider-text::before { left: 0; } .divider-text::after { right: 0; }

/* ════════════════════════════
   BUTTONS
════════════════════════════ */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-primary:focus { box-shadow: 0 0 0 .2rem rgba(255,107,53,.35); }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-swap { background: var(--secondary); border-color: var(--secondary); color: #fff; font-weight: 700; }
.btn-swap:hover { background: var(--secondary-dark); border-color: var(--secondary-dark); color: #fff; }
.btn-points { background: var(--accent); border-color: var(--accent); color: #333; font-weight: 700; }
.btn-points:hover { background: #e5bc37; border-color: #e5bc37; color: #333; }
.btn-xs { padding: .2rem .5rem; font-size: .73rem; }

/* ════════════════════════════
   TRANSACTION CARDS
════════════════════════════ */
.transaction-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; margin-bottom: 1rem; border-left: 4px solid transparent; transition: var(--transition); border: 1px solid var(--gray-200); border-left-width: 4px; }
.transaction-card.pending  { border-left-color: var(--accent); }
.transaction-card.accepted { border-left-color: var(--secondary); }
.transaction-card.completed { border-left-color: var(--success); }
.transaction-card.rejected, .transaction-card.cancelled { border-left-color: var(--danger); }

/* ════════════════════════════
   CHAT / MESSAGES
════════════════════════════ */
.chat-box { height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: .55rem; padding: 1rem; background: var(--gray-50); border-radius: var(--radius); }
.msg-bubble { max-width: 72%; padding: .55rem .85rem; border-radius: 16px; font-size: .88rem; line-height: 1.55; }
.msg-bubble.mine { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-bubble.theirs { background: var(--bg-card); color: var(--text-primary); align-self: flex-start; border-bottom-left-radius: 4px; box-shadow: var(--shadow-xs); }
.msg-bubble .msg-time { font-size: .68rem; opacity: .62; margin-top: .2rem; }

/* ════════════════════════════
   BREADCRUMB
════════════════════════════ */
.breadcrumb-wrap { background: var(--bg-card); border-bottom: 1px solid var(--gray-200); padding: .55rem 0; }
.breadcrumb { margin: 0; font-size: .8rem; }
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--gray-300); }
.breadcrumb-item.active { color: var(--text-secondary); }

/* ════════════════════════════
   EMPTY STATE
════════════════════════════ */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 3.2rem; margin-bottom: .85rem; display: block; opacity: .3; }
.empty-state h5 { color: var(--text-secondary); font-weight: 700; }

/* ════════════════════════════
   PAGINATION
════════════════════════════ */
.pagination .page-link { border-radius: var(--radius-sm) !important; margin: 0 2px; font-size: .86rem; color: var(--text-secondary); border-color: var(--gray-200); transition: var(--transition); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-link:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }

/* ════════════════════════════
   FOOTER  ← Main Fix
════════════════════════════ */
.site-footer {
  background: linear-gradient(180deg, var(--dark-2) 0%, #0d1117 100%);
  color: #fff;
  margin-top: auto;
}
.footer-top { padding: 3rem 0 2rem; }

/* Headings */
.footer-heading {
  font-weight: 700; font-size: .82rem;
  color: rgba(255,255,255,.45);  /* 適度低調 */
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Links — 明顯可見 */
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .45rem; }
.footer-links a {
  color: rgba(255,255,255,.72);   /* ← 從 .52 提升到 .72 */
  font-size: .88rem;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: .35rem;
}
.footer-links a::before {
  content: '';
  display: inline-block; width: 0; height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--primary);
  opacity: 0; transform: translateX(-4px);
  transition: var(--transition);
  flex-shrink: 0;
}
.footer-links a:hover {
  color: #fff;
  transform: translateX(5px);
}
.footer-links a:hover::before { opacity: 1; transform: translateX(0); }

/* Tagline */
.footer-tagline {
  color: rgba(255,255,255,.55);   /* ← 從 .5 提升 */
  font-size: .88rem; line-height: 1.7;
}

/* Level table */
.level-table .level-row { display: flex; align-items: center; gap: 8px; margin-bottom: .45rem; }
.level-table .level-desc { color: rgba(255,255,255,.60); font-size: .82rem; }  /* ← 從 .5 提升 */

/* Separator */
.footer-divider { border-color: rgba(255,255,255,.08); margin: 0; }

/* Bottom bar — key fix */
.footer-bottom {
  background: rgba(0,0,0,.25);
  padding: 1rem 0;
  border-top: 1px solid rgba(255,255,255,.07);
}
.footer-bottom .copyright {
  color: rgba(255,255,255,.65);   /* ← 從 Bootstrap .text-muted 的灰色，改為可見白 */
  font-size: .84rem;
}
.footer-bottom .footer-bottom-links a {
  color: rgba(255,255,255,.55);   /* ← 從 .text-muted 提升 */
  font-size: .84rem;
  transition: var(--transition);
  padding: .15rem 0;
}
.footer-bottom .footer-bottom-links a:hover { color: var(--primary); }

/* Social buttons */
.social-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; color: rgba(255,255,255,.7);   /* ← 提升 */
  border-color: rgba(255,255,255,.2); border-radius: 50%;
  transition: var(--transition);
}
.social-btn:hover { color: #fff; border-color: var(--primary); background: var(--primary); transform: translateY(-2px); }

/* Coin info row */
.footer-coin-info {
  color: rgba(255,255,255,.55);   /* ← 從 .45 提升 */
  font-size: .8rem;
  margin-top: .5rem;
}

/* ════════════════════════════
   ADMIN SIDEBAR
════════════════════════════ */
.admin-sidebar {
  width: 260px; height: 100vh;
  background: linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
  position: fixed; left: 0; top: 0; z-index: 1030;
  display: flex; flex-direction: column;
  transition: transform .3s ease; overflow: hidden;
}
.admin-sidebar .sidebar-brand { padding: 1.15rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.admin-sidebar .sidebar-menu { flex: 1; overflow-y: auto; overflow-x: hidden; padding: .7rem 0 2rem; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.admin-sidebar .sidebar-menu::-webkit-scrollbar { width: 4px; }
.admin-sidebar .sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }
.admin-sidebar .menu-heading { color: rgba(255,255,255,.35); font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; padding: .75rem 1.5rem .25rem; }
.admin-sidebar .menu-item > a { display: flex; align-items: center; gap: .7rem; color: rgba(255,255,255,.72); font-size: .86rem; padding: .62rem 1.5rem; transition: var(--transition); text-decoration: none; }
.admin-sidebar .menu-item > a:hover, .admin-sidebar .menu-item > a.active { color: #fff; background: rgba(255,255,255,.08); border-left: 3px solid var(--primary); padding-left: calc(1.5rem - 3px); }
.admin-sidebar .menu-item > a i { width: 18px; text-align: center; }

/* Admin content */
.admin-content { margin-left: 260px; min-height: 100vh; transition: margin .3s ease; background: #F0F2F5; }
.admin-topbar { background: var(--bg-card); padding: .75rem 1.5rem; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-xs); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--gray-200); }
.admin-main { padding: 1.5rem; }

/* Admin stats */
.stat-widget { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; display: flex; align-items: center; gap: 1rem; border: 1px solid var(--gray-200); }
.stat-widget .stat-icon { width: 50px; height: 50px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; }
.stat-widget .stat-num { font-size: 1.55rem; font-weight: 900; color: var(--text-primary); }
.stat-widget .stat-lbl { font-size: .78rem; color: var(--text-muted); margin-top: .1rem; }

/* Admin table */
.admin-table { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--gray-200); }
.admin-table thead th { background: var(--gray-50); font-weight: 700; font-size: .8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .4px; border-bottom: 2px solid var(--gray-200); white-space: nowrap; }
.admin-table td { vertical-align: middle; font-size: .86rem; color: var(--text-primary); }
.admin-table .item-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: var(--radius-sm); }
.admin-table .user-thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 50%; }
.table-toolbar { padding: .9rem 1.2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .7rem; border-bottom: 1px solid var(--gray-200); }
.status-pill { padding: .22em .65em; border-radius: 20px; font-size: .73rem; font-weight: 700; display: inline-block; }
.status-pill.active   { background: #d4edda; color: #155724; }
.status-pill.pending  { background: #fff3cd; color: #856404; }
.status-pill.closed   { background: #f8d7da; color: #721c24; }
.status-pill.traded, .status-pill.sold { background: #d1ecf1; color: #0c5460; }
.status-pill.completed  { background: #d4edda; color: #155724; }
.status-pill.rejected, .status-pill.cancelled { background: #f8d7da; color: #721c24; }

.admin-form-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; border: 1px solid var(--gray-200); }
.page-header { margin-bottom: 1.4rem; }
.page-header h4 { font-weight: 900; margin-bottom: .1rem; color: var(--text-primary); }
.page-header p { color: var(--text-muted); font-size: .86rem; margin: 0; }
.admin-avatar { width: 33px; height: 33px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .88rem; }
.admin-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1029; }
.admin-overlay.show { display: block; }

/* ════════════════════════════
   HOT SEARCH / COOKIE
════════════════════════════ */
.hot-search-bar { background: var(--bg-card); border-bottom: 1px solid var(--gray-200); padding: .25rem 0; }
.hot-search-tag { display: inline-block; padding: .18rem .65rem; background: var(--primary-light); color: var(--primary); border-radius: 20px; font-size: .78rem; font-weight: 600; transition: var(--transition); text-decoration: none; }
.hot-search-tag:hover { background: var(--primary); color: #fff; }

.cookie-bar { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(26,26,46,.97); color: #fff; z-index: 9998; padding: .85rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.1); }
.cookie-bar p { margin: 0; font-size: .83rem; flex: 1; min-width: 200px; color: rgba(255,255,255,.85); }
.cookie-bar .btn-accept { background: var(--primary); border: none; color: #fff; padding: .4rem 1.2rem; border-radius: 6px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.cookie-bar .btn-decline { background: transparent; border: 1px solid rgba(255,255,255,.3); color: rgba(255,255,255,.8); padding: .4rem .9rem; border-radius: 6px; cursor: pointer; white-space: nowrap; font-size: .83rem; }

/* ════════════════════════════
   USER PUBLIC PAGE
════════════════════════════ */
.user-public-header { background: linear-gradient(135deg, var(--dark), #0f3460); padding: 3rem 0; color: #fff; }
.user-stats-badge { background: rgba(255,255,255,.1); border-radius: 12px; padding: .8rem 1.2rem; text-align: center; }
.user-stats-badge .num { font-size: 1.5rem; font-weight: 900; color: #fff; }
.user-stats-badge .lbl { font-size: .75rem; color: rgba(255,255,255,.7); }

/* ════════════════════════════
   REPORT / MISC BADGES
════════════════════════════ */
.report-badge { padding: .22em .65em; border-radius: 20px; font-size: .73rem; font-weight: 700; }
.report-badge.pending   { background: #fff3cd; color: #856404; }
.report-badge.resolved  { background: #d4edda; color: #155724; }
.report-badge.dismissed { background: #e2e3e5; color: #383d41; }
.region-filter { background: var(--bg-card); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1rem; }

/* ════════════════════════════
   BACK TO TOP
════════════════════════════ */
.btn-back-top {
  position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none;
  box-shadow: 0 4px 14px rgba(255,107,53,.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: var(--transition); font-size: .88rem;
}
.btn-back-top.show { opacity: 1; visibility: visible; }
.btn-back-top:hover { transform: translateY(-3px); background: var(--primary-dark); color: #fff; }

/* ════════════════════════════
   UTILITIES
════════════════════════════ */
.text-primary  { color: var(--primary) !important; }
.bg-primary    { background: var(--primary) !important; }
.fw-900        { font-weight: 900; }
.fw-700        { font-weight: 700; }
.fw-600        { font-weight: 600; }
.rounded-xl    { border-radius: var(--radius) !important; }
.text-muted    { color: var(--text-muted) !important; }

/* ════════════════════════════
   ANIMATIONS
════════════════════════════ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up          { animation: fadeInUp .45s ease forwards; }
.fade-in-up-delay-1  { animation: fadeInUp .45s .1s ease both; }
.fade-in-up-delay-2  { animation: fadeInUp .45s .2s ease both; }
.fade-in-up-delay-3  { animation: fadeInUp .45s .3s ease both; }
@keyframes stepPulse { 0%,100%{transform:scale(1);}50%{transform:scale(1.08);} }
.step-icon-anim:hover i { animation: stepPulse .5s ease; }
.benefit-hover { transition: transform .2s ease, box-shadow .2s ease; }
.benefit-hover:hover { transform: translateX(4px); box-shadow: 0 6px 18px rgba(0,0,0,.07) !important; }
.points-reward-card:not(.points-reward-bonus):hover .points-reward-icon { transform: scale(1.08) rotate(-3deg); }
.points-reward-icon { transition: transform .25s ease; }

/* ════════════════════════════
   PRICE TAG
════════════════════════════ */
.price-tag.points {
  background: linear-gradient(135deg, rgba(255,210,63,.15), rgba(255,107,53,.1));
  color: #c07800; border: 1px solid rgba(255,210,63,.35); border-radius: 20px;
  padding: .2em .75em; font-size: .82rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: .3em;
}

/* ════════════════════════════
   ADMIN LOGIN CARD
════════════════════════════ */
@supports (backdrop-filter: blur(6px)) { .admin-login-card { backdrop-filter: blur(6px); } }

/* ════════════════════════════
   RESPONSIVE
════════════════════════════ */
@media (max-width: 991.98px) {
  .admin-sidebar { transform: translateX(-100%); height: 100vh; overflow: hidden; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar .sidebar-menu { height: calc(100vh - 70px); overflow-y: auto; overflow-x: hidden; }
  .admin-content { margin-left: 0; }
  .hero-stats { gap: 1.2rem; }
}
@media (max-width: 767.98px) {
  .hero-banner { padding: 2rem 0 2.5rem; }
  .hero-banner h1 { font-size: 1.55rem; }
  .auth-card { padding: 1.7rem 1.3rem; }
  .form-card { padding: 1.1rem; }
  .chat-box { height: 300px; }
  .msg-bubble { max-width: 84%; }
  .section-title { font-size: 1.15rem; }
  .footer-top { padding: 2rem 0 1.5rem; }
}
@media (max-width: 575.98px) {
  .item-card .card-img-wrap { padding-top: 63%; }
  .hero-stat .num { font-size: 1.35rem; }
}
