/* ============================================================
   TADAWEL - Dark Gaming Marketplace Theme (Responsive)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@500&family=Rubik:wght@400;500;600;700&display=swap');

:root {
  /* Palette */
  --bg-0: #0a0d14;
  --bg-1: #11151f;
  --bg-2: #161b28;
  --bg-3: #1d2333;
  --bg-4: #262d40;

  --border: #232a3b;
  --border-strong: #2f3852;

  --text-0: #f5f7fb;
  --text-1: #cbd1de;
  --text-2: #8a92a6;
  --text-3: #5b647a;

  --accent: #00ff9d;          /* signature neon green */
  --accent-2: #6366f1;        /* indigo */
  --accent-3: #f59e0b;        /* warm amber for ratings */
  --danger: #ef4444;
  --warn: #f59e0b;
  --ok: #10b981;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 8px 24px -8px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.3);
  --shadow-lg: 0 24px 60px -20px rgba(0,255,157,.15), 0 8px 24px rgba(0,0,0,.5);

  --maxw: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(0,255,157,0.08), transparent 40%),
    radial-gradient(circle at 88% 0%, rgba(99,102,241,0.10), transparent 45%);
  background-attachment: fixed;
}
html[dir="rtl"] body { font-family: 'Rubik', system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ============ NAVBAR ============ */
.navbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; gap: 24px;
  height: 68px; max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
}
.brand {
  font-weight: 700; font-size: 22px; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 10px;
  color: var(--text-0);
}
.brand-logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; color: #001a10; font-size: 17px;
  box-shadow: 0 0 24px -4px rgba(0,255,157,.5);
}
.nav-links {
  display: flex; gap: 4px; flex: 1;
}
.nav-links a {
  padding: 8px 14px; border-radius: 8px;
  color: var(--text-1); font-weight: 500; font-size: 14.5px;
  transition: all .15s;
  position: relative; /* for notification badges */
}
.nav-links a:hover { background: var(--bg-2); color: var(--text-0); }
.nav-links a.active { color: var(--accent); background: rgba(0,255,157,.06); }
.nav-right { display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: flex; gap: 2px; padding: 3px;
  background: var(--bg-2); border-radius: 8px; border: 1px solid var(--border);
}
.lang-switch a {
  padding: 5px 10px; border-radius: 6px; font-size: 12px;
  color: var(--text-2); font-weight: 600;
}
.lang-switch a.active { background: var(--bg-4); color: var(--text-0); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  font-weight: 600; font-size: 14px;
  background: var(--bg-3); color: var(--text-0); border: 1px solid var(--border-strong);
  cursor: pointer; transition: all .15s;
  text-decoration: none;
}
.btn:hover { background: var(--bg-4); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #00d97e 100%);
  color: #001a10; border-color: transparent;
  box-shadow: 0 4px 14px -4px rgba(0,255,157,.45);
}
.btn-primary:hover { box-shadow: 0 8px 24px -6px rgba(0,255,157,.6); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-1); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-danger { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.4); color: #ff8585; }
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 15px; }

/* ============ FORMS ============ */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-1); margin-bottom: 6px;
}
.input, textarea.input, select.input {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  background: var(--bg-1); border: 1px solid var(--border);
  color: var(--text-0); font-size: 14.5px;
  transition: all .15s;
}
.input:focus, textarea.input:focus, select.input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,255,157,.12);
}
textarea.input { min-height: 120px; resize: vertical; }

/* ============ ALERTS ============ */
.alert {
  padding: 12px 16px; border-radius: 10px; margin-bottom: 16px;
  border: 1px solid; font-size: 14px;
}
.alert-error { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.3); color: #ff9b9b; }
.alert-success { background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.3); color: #6ee7b7; }
.alert-info { background: rgba(99,102,241,.08); border-color: rgba(99,102,241,.3); color: #a5b4fc; }

/* ============ CARDS ============ */
.card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
}
.panel {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}

/* ============ HOME HERO ============ */
.hero {
  position: relative;
  padding: 80px 24px 100px;
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,255,157,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,157,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 30%, transparent 70%);
}
.hero-inner { position: relative; max-width: var(--maxw); margin: 0 auto; text-align: center; }
.hero h1 {
  font-size: clamp(36px, 6vw, 64px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 18px;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent), #62ffce);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p {
  font-size: clamp(15px, 2vw, 19px); color: var(--text-2);
  max-width: 620px; margin: 0 auto 32px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.search-big {
  max-width: 600px; margin: 36px auto 0;
  display: flex; gap: 8px;
  background: var(--bg-1); border: 1px solid var(--border);
  padding: 7px; border-radius: 14px;
}
.search-big input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text-0); padding: 10px 14px; font-size: 15px;
}
.search-big input::placeholder { color: var(--text-3); }

/* ============ SECTION HEADER ============ */
.section { padding: 56px 0; }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.section-head h2 {
  font-size: 28px; font-weight: 700; margin: 0;
  letter-spacing: -0.02em;
}
.section-head .view-all {
  color: var(--text-2); font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.section-head .view-all:hover { color: var(--accent); }

/* ============ GAME GRID ============ */
.games-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.game-card {
  position: relative;
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  transition: all .2s;
  overflow: hidden;
}
.game-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(0,255,157,.08));
  opacity: 0; transition: opacity .2s;
}
.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px -10px rgba(0,255,157,.25);
}
.game-card:hover::before { opacity: 1; }
.game-card-icon {
  width: 56px; height: 56px; margin: 0 auto 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-4));
  display: grid; place-items: center;
  font-size: 26px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
}
.game-card-name {
  font-weight: 600; font-size: 14px; color: var(--text-0);
}

/* ============ LISTING GRID ============ */
.listing-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.listing-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; transition: all .2s;
  display: flex; flex-direction: column;
}
.listing-card:hover {
  transform: translateY(-3px); border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.listing-img {
  aspect-ratio: 16/10;
  background: var(--bg-3) center/cover;
  position: relative;
}
.listing-img-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  color: var(--text-3); font-size: 13px; letter-spacing: 0.05em;
}
.listing-game-tag {
  position: absolute; top: 10px; left: 10px;
  background: rgba(10,13,20,.8); backdrop-filter: blur(4px);
  padding: 4px 10px; border-radius: 6px;
  font-size: 11px; color: var(--accent); font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
}
html[dir="rtl"] .listing-game-tag { left: auto; right: 10px; }
.listing-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.listing-title {
  font-size: 15px; font-weight: 600; color: var(--text-0);
  line-height: 1.35; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.listing-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-2); margin-bottom: 12px;
}
.listing-meta .dot { color: var(--text-3); }
.listing-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: auto;
}
.listing-price { font-size: 19px; font-weight: 700; color: var(--accent); }

/* ============ AVATARS ============ */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-3); display: grid; place-items: center;
  font-weight: 600; font-size: 14px; color: var(--text-0);
  text-transform: uppercase;
  flex-shrink: 0; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }
.avatar-lg { width: 72px; height: 72px; font-size: 26px; }
.avatar-xl { width: 100px; height: 100px; font-size: 36px; }

/* ============ STARS ============ */
.stars { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-3); font-size: 14px; }
.stars-count { color: var(--text-2); font-size: 12px; }

/* ============ HOW IT WORKS ============ */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.step {
  background: var(--bg-1); border: 1px solid var(--border);
  padding: 22px 20px; border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700; color: var(--accent);
  margin-bottom: 12px; opacity: .8;
}
.step h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.step p { margin: 0; color: var(--text-2); font-size: 13.5px; }

/* ============ BREADCRUMBS ============ */
.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2);
  padding: 18px 0;
}
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--text-3); }

/* ============ AUTH PAGES ============ */
.auth-wrap {
  min-height: calc(100vh - 68px);
  display: grid; place-items: center; padding: 40px 24px;
}
.auth-box {
  width: 100%; max-width: 420px;
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 32px;
}
.auth-box h1 {
  font-size: 26px; font-weight: 700; margin: 0 0 24px;
  letter-spacing: -0.02em;
}
.auth-footer {
  margin-top: 20px; padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center; font-size: 14px; color: var(--text-2);
}
.auth-footer a { color: var(--accent); font-weight: 600; }

/* ============ LISTING DETAIL ============ */
.listing-detail {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px;
  padding: 28px 0;
}
@media (max-width: 880px) {
  .listing-detail { grid-template-columns: 1fr; }
}
.listing-hero-img {
  aspect-ratio: 16/10;
  border-radius: var(--radius-lg);
  background: var(--bg-2) center/cover;
  border: 1px solid var(--border);
}
.listing-detail h1 {
  font-size: 28px; font-weight: 700; margin: 16px 0 8px;
  letter-spacing: -0.02em;
}
.listing-detail .desc { color: var(--text-1); white-space: pre-wrap; line-height: 1.7; }
.buy-box { position: sticky; top: 88px; align-self: start; }
.buy-box .price-big {
  font-size: 36px; font-weight: 700; color: var(--accent);
  letter-spacing: -0.02em;
}
.seller-box { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.seller-box .seller-info { flex: 1; }
.seller-box .seller-name { font-weight: 600; }
.seller-box .seller-meta { font-size: 12px; color: var(--text-2); }

/* ============ TABLE ============ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table.dt {
  width: 100%; border-collapse: collapse; min-width: 600px;
  background: var(--bg-1);
}
table.dt th, table.dt td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
html[dir="rtl"] table.dt th, html[dir="rtl"] table.dt td { text-align: right; }
table.dt th {
  font-weight: 600; color: var(--text-2);
  background: var(--bg-2); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
table.dt tr:last-child td { border-bottom: none; }
table.dt tr:hover td { background: var(--bg-2); }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
  background: var(--bg-3); color: var(--text-1);
}
.badge-ok { background: rgba(16,185,129,.15); color: #6ee7b7; }
.badge-warn { background: rgba(245,158,11,.15); color: #fcd34d; }
.badge-danger { background: rgba(239,68,68,.15); color: #fca5a5; }
.badge-info { background: rgba(99,102,241,.15); color: #a5b4fc; }
.badge-accent { background: rgba(0,255,157,.15); color: var(--accent); }

/* ============ CHAT ============ */
.chat-layout {
  display: grid; grid-template-columns: 320px 1fr;
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-lg); min-height: 600px;
  overflow: hidden;
}
@media (max-width: 760px) { .chat-layout { grid-template-columns: 1fr; min-height: 500px; } }
.chat-list { border-right: 1px solid var(--border); overflow-y: auto; max-height: 700px; }
html[dir="rtl"] .chat-list { border-right: none; border-left: 1px solid var(--border); }
.chat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.chat-item:hover { background: var(--bg-2); }
.chat-item.active { background: var(--bg-2); border-left: 3px solid var(--accent); }
html[dir="rtl"] .chat-item.active { border-left: none; border-right: 3px solid var(--accent); }
.chat-item-name { font-weight: 600; font-size: 14px; }
.chat-item-preview {
  font-size: 12px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 200px;
}
.chat-main { display: flex; flex-direction: column; max-height: 700px; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.chat-body {
  flex: 1; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
  background:
    radial-gradient(circle at 30% 10%, rgba(99,102,241,.04), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(0,255,157,.04), transparent 40%);
}
.msg { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.msg.them { background: var(--bg-3); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--accent); color: #001a10; align-self: flex-end; border-bottom-right-radius: 4px; font-weight: 500; }
html[dir="rtl"] .msg.them { border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }
html[dir="rtl"] .msg.me { border-bottom-right-radius: 14px; border-bottom-left-radius: 4px; }
.msg-time { font-size: 10.5px; opacity: .7; margin-top: 4px; }
.chat-foot {
  padding: 12px; border-top: 1px solid var(--border);
  display: flex; gap: 8px;
}
.chat-foot input { flex: 1; }

.chat-empty {
  display: grid; place-items: center; color: var(--text-2);
  text-align: center; padding: 40px; height: 100%;
}

/* ============ PROFILE ============ */
.profile-head {
  display: flex; align-items: center; gap: 22px;
  padding: 32px 0; flex-wrap: wrap;
}
.profile-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 24px 0;
}
.stat {
  background: var(--bg-1); border: 1px solid var(--border);
  padding: 18px; border-radius: var(--radius);
}
.stat-value { font-size: 26px; font-weight: 700; color: var(--text-0); letter-spacing: -0.02em; }
.stat-label { font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }

/* ============ ORDER STATUS BANNER ============ */
.order-status-banner {
  padding: 18px 22px; border-radius: var(--radius);
  display: flex; align-items: center; gap: 14px;
  margin: 18px 0; border: 1px solid;
}
.order-status-banner.pending   { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.3); }
.order-status-banner.paid      { background: rgba(99,102,241,.08); border-color: rgba(99,102,241,.3); }
.order-status-banner.delivered { background: rgba(0,255,157,.08); border-color: rgba(0,255,157,.3); }
.order-status-banner.completed { background: rgba(16,185,129,.10); border-color: rgba(16,185,129,.3); }
.order-status-banner.disputed  { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.3); }
.order-status-banner.cancelled { background: var(--bg-2); border-color: var(--border); }
.order-status-banner h3 { margin: 0 0 2px; font-size: 16px; }
.order-status-banner p  { margin: 0; color: var(--text-2); font-size: 13px; }

/* ============ FOOTER ============ */
.site-footer {
  margin-top: 80px;
  background: var(--bg-1); border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  color: var(--text-2); font-size: 14px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 36px; margin-bottom: 32px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { color: var(--text-0); margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.footer-col a { display: block; padding: 4px 0; color: var(--text-2); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--text-3);
}

/* ============ RATING WIDGET ============ */
.rate-stars { display: inline-flex; gap: 6px; }
.rate-stars input { display: none; }
.rate-stars label {
  cursor: pointer; font-size: 28px; color: var(--bg-4);
  transition: color .1s;
}
.rate-stars label:hover, .rate-stars label:hover ~ label,
.rate-stars input:checked ~ label { color: var(--accent-3); }

/* ============ ADMIN ============ */
.admin-layout {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
  padding: 24px 0;
}
@media (max-width: 760px) { .admin-layout { grid-template-columns: 1fr; } }
.admin-side {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; height: fit-content;
}
.admin-side a {
  display: block; padding: 9px 12px; border-radius: 8px;
  color: var(--text-1); font-weight: 500; font-size: 14px;
}
.admin-side a:hover { background: var(--bg-2); }
.admin-side a.active { background: rgba(0,255,157,.08); color: var(--accent); }

/* ============ CATEGORY SHOWCASE ============ */
.category-showcase { margin: 24px 0; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.category-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
  text-align: center; transition: all .2s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-1);
}
.category-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,255,157,.1); }
.category-img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--bg-3); }
.category-img-placeholder {
  width: 64px; height: 64px; border-radius: 12px;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-4));
  display: grid; place-items: center;
  font-weight: 700; font-size: 24px; color: var(--accent);
}
.category-name { font-size: 14px; font-weight: 500; }

/* ============ UTILITIES ============ */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text-2); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-center { text-align: center; }

/* ============ MOBILE NAVIGATION ============ */
.mobile-toggle {
  display: none; background: none; border: none; color: var(--text-0);
  font-size: 22px; padding: 6px 10px; cursor: pointer;
}
@media (max-width: 880px) {
  .mobile-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    padding: 12px; gap: 4px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .search-big { margin-top: 28px; }
  .hero { padding: 48px 24px 60px; }
  .section { padding: 36px 0; }
  
  .auth-box { padding: 28px 20px; }
  
  .profile-head { flex-direction: column; text-align: center; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
  
  .order-status-banner { flex-direction: column; text-align: center; }
  
  .chat-layout { grid-template-columns: 1fr; }
  
  .container { padding: 0 16px; }
  
  .listing-detail { grid-template-columns: 1fr; }
  .buy-box { position: static; }
  
  .table-wrap { overflow-x: auto; }
  
  .footer-grid { grid-template-columns: 1fr; }
  
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { display: flex; flex-wrap: wrap; gap: 8px; }
  .admin-side a { padding: 8px 12px; white-space: nowrap; }
}
/* إظهار وإخفاء العناصر بناءً على حجم الشاشة */
@media (max-width: 880px) {
  .hide-on-mobile { display: none !important; }
  .show-mobile-only { display: flex !important; }
}

/* ============ NAV ICON BUTTON (bell) ============ */
.nav-icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  color: var(--text-1); transition: all .15s;
  flex-shrink: 0;
}
.nav-icon-btn:hover { background: var(--bg-2); color: var(--text-0); }
.nav-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--danger); color: #fff;
  border-radius: 999px; min-width: 16px; height: 16px;
  font-size: 10px; font-weight: 700; line-height: 16px;
  text-align: center; padding: 0 3px;
  pointer-events: none;
}

/* ============ NAV BALANCE ============ */
.nav-balance {
  font-size: 14px; font-weight: 700;
  color: var(--accent);
  padding: 6px 10px; border-radius: 8px;
  transition: background .15s;
  white-space: nowrap;
}
.nav-balance:hover { background: rgba(0,255,157,.08); }

/* ============ USER DROPDOWN ============ */
.user-dropdown {
  position: relative;
}
.user-dropdown-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px 5px 5px; border-radius: 10px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-0); cursor: pointer;
  font-size: 14px; font-weight: 500;
  transition: all .15s;
}
.user-dropdown-trigger:hover { background: var(--bg-2); border-color: var(--border-strong); }

.user-dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 220px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  animation: udm-in .15s ease both;
  /* Force column layout so items never wrap onto one line */
  flex-direction: column;
}
html[dir="rtl"] .user-dropdown-menu { right: auto; left: 0; }
.user-dropdown-menu.open { display: flex; flex-direction: column; }

@keyframes udm-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.udm-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 12px;
}
.udm-divider {
  height: 1px; background: var(--border); margin: 2px 0;
}
.udm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  width: 100%;
  color: var(--text-1); font-size: 14px; font-weight: 500;
  transition: background .12s;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}
.udm-item:hover { background: var(--bg-3); color: var(--text-0); }
.udm-item svg { flex-shrink: 0; opacity: .7; }
.udm-item-danger { color: #ff8585; }
.udm-item-danger:hover { background: rgba(239,68,68,.1); color: #ff8585; }
.udm-badge {
  margin-left: auto;
  background: var(--danger); color: #fff;
  border-radius: 999px; min-width: 18px; height: 18px;
  font-size: 11px; font-weight: 700; line-height: 18px;
  text-align: center; padding: 0 4px;
}

/* Mobile: dropdown slides up as a bottom sheet */
@media (max-width: 880px) {
  /* Backdrop overlay behind the sheet */
  .udm-backdrop {
    display: none;
    position: fixed; inset: 0; z-index: 198;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  .udm-backdrop.open { display: block; }

  .user-dropdown-menu {
    position: fixed;
    top: auto; bottom: 0; right: 0; left: 0;
    min-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 199;
    animation: udm-slide-up .22s cubic-bezier(.22,.68,0,1.1) both;
  }
  @keyframes udm-slide-up {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .udm-item { padding: 14px 20px; font-size: 15px; }
  .udm-header { padding: 18px 20px 14px; }
  /* Drag handle visual hint */
  .udm-handle {
    width: 36px; height: 4px; border-radius: 2px;
    background: var(--border-strong);
    margin: 10px auto 4px;
  }
}
