/* ===== کامپیوتر المپیک - استایل اصلی ===== */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary:       #1e40af;
  --primary-dark:  #1e3a8a;
  --primary-light: #dbeafe;
  --accent:        #f97316;
  --accent-dark:   #ea6c0a;
  --green:         #10b981;
  --red:           #ef4444;
  --yellow:        #f59e0b;
  --purple:        #8b5cf6;
  --gray-50:   #f8fafc;
  --gray-100:  #f1f5f9;
  --gray-200:  #e2e8f0;
  --gray-300:  #cbd5e1;
  --gray-400:  #94a3b8;
  --gray-500:  #64748b;
  --gray-600:  #475569;
  --gray-700:  #334155;
  --gray-800:  #1e293b;
  --gray-900:  #0f172a;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
  --header-h: 64px;
  --mobile-nav-h: 60px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; scroll-behavior: smooth; }
html, body {
  direction: rtl;
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.7;
  max-width: 100%;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* ===================== HEADER ===================== */
.header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow);
}
.header-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--header-h);
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-icon {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 900; font-size: 13px;
  flex-shrink: 0;
}
.logo-text { display: none; flex-direction: column; }
@media (min-width: 480px) { .logo-text { display: flex; } }
.logo-name { font-weight: 800; font-size: 15px; color: var(--gray-900); line-height: 1.2; }
.logo-sub  { font-size: 11px; color: var(--gray-400); }

.search-bar { flex: 1; position: relative; }
.search-bar input {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 9px 16px 9px 42px;
  font-size: 13px;
  background: var(--gray-50);
  transition: border-color .2s, background .2s;
}
.search-bar input:focus { outline: none; border-color: var(--primary); background: #fff; }
.search-btn {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); display: flex; align-items: center;
  transition: color .2s;
}
.search-btn:hover { color: var(--primary); }
.search-btn svg { width: 18px; height: 18px; }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn-icon {
  width: 40px; height: 40px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-600); transition: all .2s;
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }
.btn-icon svg  { width: 18px; height: 18px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: white;
  border: none; border-radius: 10px;
  padding: 10px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: background .2s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary.accent { background: var(--accent); }
.btn-primary.accent:hover { background: var(--accent-dark); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--gray-200); border-radius: 10px;
  padding: 9px 14px; font-size: 13px; font-weight: 500;
  background: #fff; color: var(--gray-700); cursor: pointer;
  text-decoration: none; transition: all .2s; white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-sm { padding: 7px 12px !important; font-size: 12px !important; }
.btn-lg { padding: 13px 24px !important; font-size: 15px !important; }
.btn-block { width: 100%; justify-content: center; }

.user-btn {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--gray-200); border-radius: 10px;
  padding: 7px 12px; background: none; cursor: pointer;
  color: var(--gray-700); transition: all .2s; font-size: 13px;
}
.user-btn:hover { border-color: var(--primary); }
.user-avatar {
  width: 28px; height: 28px;
  background: var(--primary-light);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: var(--primary);
  font-weight: 700; font-size: 12px;
}

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  left: 0; top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  z-index: 300;
  overflow: hidden;
}
.dropdown-menu.open { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 13px; color: var(--gray-700);
  transition: background .15s; cursor: pointer;
  border: none; background: none; width: 100%; text-align: right;
}
.dropdown-item:hover { background: var(--gray-50); color: var(--primary); }
.dropdown-item.danger:hover { background: #fef2f2; color: var(--red); }
.dropdown-divider { height: 1px; background: var(--gray-100); margin: 4px 0; }

/* Nav */
.nav-tabs {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  gap: 0;
  white-space: nowrap;
}
.nav-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px; font-size: 13px; font-weight: 500;
  color: var(--gray-500); border-bottom: 2px solid transparent;
  cursor: pointer; transition: all .2s; text-decoration: none;
  background: none; border-top: none; border-right: none; border-left: none;
}
.nav-tab:hover { color: var(--primary); }
.nav-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ===================== MOBILE BOTTOM NAV ===================== */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: #fff;
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -4px 12px rgba(0,0,0,.08);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (max-width: 767px) { .mobile-nav { display: flex; } }
.mobile-nav-items {
  display: flex;
  align-items: center;
  width: 100%;
}
.mobile-nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 4px 8px;
  gap: 4px;
  color: var(--gray-400); font-size: 10px; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: color .2s;
  border: none; background: none; position: relative;
}
.mobile-nav-item.active { color: var(--primary); }
.mobile-nav-item svg { width: 22px; height: 22px; }
.mobile-nav-item .badge {
  position: absolute;
  top: 6px; right: calc(50% - 20px);
  background: var(--red); color: white;
  font-size: 9px; font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.mobile-nav-fab {
  flex: 1.2;
}
.mobile-nav-fab a, .mobile-nav-fab button {
  display: flex; flex-direction: column; align-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: white;
  font-size: 10px; font-weight: 700; gap: 2px;
  border: none; cursor: pointer; box-shadow: 0 4px 12px rgba(30,64,175,.4);
  margin: -16px auto 0; transition: transform .2s;
  text-decoration: none; justify-content: center;
}
.mobile-nav-fab a:hover, .mobile-nav-fab button:hover { transform: scale(1.08); }
.mobile-nav-fab svg { width: 22px; height: 22px; }

/* بدنه با فاصله پایین در موبایل */
@media (max-width: 767px) {
  body { padding-bottom: var(--mobile-nav-h); }
}

/* ===================== CONTAINER ===================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}
.container-sm { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; }

/* ===================== HERO ===================== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #3b82f6 100%);
  color: white;
  padding: 48px 16px 40px;
  text-align: center;
}
.hero h1 { font-size: clamp(22px, 5vw, 36px); font-weight: 800; margin-bottom: 8px; }
.hero p  { font-size: 15px; opacity: .85; margin-bottom: 24px; }
.hero-search {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.hero-search input {
  flex: 1; border: none; outline: none;
  padding: 14px 18px; font-size: 14px;
  color: var(--gray-900);
}
.hero-search button {
  padding: 14px 22px;
  background: var(--accent); color: white;
  border: none; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .2s;
  white-space: nowrap;
}
.hero-search button:hover { background: var(--accent-dark); }
.hero-stats {
  display: flex; justify-content: center; gap: 0;
  margin-top: 28px; flex-wrap: nowrap;
}
.hero-stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 24px;
  border-left: 1px solid rgba(255,255,255,.2);
  flex-shrink: 0;
}
.hero-stat:last-child { border-left: none; }
.hero-stat-num { font-size: 24px; font-weight: 800; }
.hero-stat-lbl { font-size: 12px; opacity: .75; margin-top: 2px; }

/* ===================== CATEGORIES ===================== */
.categories {
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--gray-100);
}
.categories::-webkit-scrollbar { display: none; }
.categories-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex; gap: 0;
  white-space: nowrap;
  padding: 10px 0;
}
.cat-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 500;
  color: var(--gray-600); background: var(--gray-100);
  border: 1.5px solid transparent; cursor: pointer;
  transition: all .2s; margin-left: 8px; text-decoration: none;
  white-space: nowrap;
}
.cat-btn:hover, .cat-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.cat-btn img { width: 20px; height: 20px; border-radius: 4px; }

/* ===================== SECTIONS ===================== */
.section { margin-bottom: 32px; }
.section-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.section-title small { font-size: 13px; color: var(--gray-400); font-weight: 400; margin-right: 8px; }
.section-link {
  font-size: 13px; color: var(--primary);
  font-weight: 500; display: flex; align-items: center; gap: 4px;
}
.section-link:hover { text-decoration: underline; }

/* ===================== GRIDS ===================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 8px; } .grid-2 { grid-template-columns: 1fr; } }

/* ===================== PRODUCT CARD ===================== */
.product-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none; color: inherit;
  display: block;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.product-card.boosted { border-color: var(--accent); }

.product-img {
  width: 100%; aspect-ratio: 4/3;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img .no-img { font-size: 40px; }
.product-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--accent); color: white;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
}
.product-badge.blue   { background: var(--primary); }
.product-badge.green  { background: var(--green); }
.product-badge.boosted-badge { background: var(--accent); }

.product-body { padding: 12px; }
.product-title {
  font-size: 13px; font-weight: 600; color: var(--gray-800);
  margin-bottom: 6px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-specs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.spec-tag {
  font-size: 11px; color: var(--gray-500);
  background: var(--gray-100); border-radius: 4px;
  padding: 2px 7px;
}
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 15px; font-weight: 800; color: var(--primary); }
.product-price.free { color: var(--green); font-size: 13px; }
.product-meta { display: flex; align-items: center; gap: 8px; }
.product-time { font-size: 11px; color: var(--gray-400); }
.cond-badge {
  font-size: 11px; padding: 2px 7px; border-radius: 5px; font-weight: 600;
}
.cond-new  { background: #dcfce7; color: #16a34a; }
.cond-ref  { background: var(--primary-light); color: var(--primary); }
.cond-used { background: var(--gray-100); color: var(--gray-500); }

/* Ad Card (for listings) */
.ad-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none; color: inherit;
  display: block;
}
.ad-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ad-card.boosted { border-color: #fde68a; box-shadow: 0 0 0 1px #f59e0b20; }

/* Shop Card */
.shop-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 16px;
  display: flex; align-items: center; gap: 12px;
  transition: all .2s; text-decoration: none; color: inherit;
}
.shop-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
.shop-logo {
  width: 56px; height: 56px;
  border-radius: 12px; overflow: hidden;
  background: var(--gray-100); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.shop-logo img { width: 100%; height: 100%; object-fit: cover; }
.shop-info { flex: 1; min-width: 0; }
.shop-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-desc { font-size: 12px; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-meta { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.shop-tag  { font-size: 11px; color: var(--gray-400); display: flex; align-items: center; gap: 3px; }
.shop-official { color: var(--accent); font-weight: 600; }

/* ===================== CARD / BOX ===================== */
.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-100);
}
.card-title { font-size: 16px; font-weight: 700; }

/* ===================== FORM ===================== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-control {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--gray-900);
  background: #fff;
  transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--primary); }
.form-control.error { border-color: var(--red); }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

/* ===================== IMAGE UPLOAD ===================== */
.img-upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--gray-50);
}
.img-upload-area:hover, .img-upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.img-upload-area input { display: none; }
.img-preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.img-preview-item {
  position: relative; aspect-ratio: 1;
  border-radius: 8px; overflow: hidden; background: var(--gray-100);
}
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.img-preview-item .del-btn {
  position: absolute; top: 4px; left: 4px;
  background: rgba(0,0,0,.6); color: white;
  border: none; border-radius: 50%;
  width: 22px; height: 22px; font-size: 13px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* ===================== ALERT ===================== */
.alert {
  padding: 12px 16px; border-radius: 10px;
  font-size: 13px; margin-bottom: 14px;
  display: flex; align-items: flex-start; gap: 8px;
}
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.alert-info    { background: var(--primary-light); color: var(--primary); border: 1px solid #93c5fd; }
.alert-warning { background: #fefce8; color: #a16207; border: 1px solid #fde047; }

/* ===================== BADGE / STATUS ===================== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.badge-pending  { background: #fef3c7; color: #d97706; }
.badge-approved { background: #dcfce7; color: #16a34a; }
.badge-rejected { background: #fef2f2; color: #dc2626; }
.badge-sell     { background: #fee2e2; color: #dc2626; }
.badge-buy      { background: #dbeafe; color: #2563eb; }

/* ===================== TABLE ===================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { font-size: 12px; font-weight: 700; color: var(--gray-500); padding: 10px 12px; text-align: right; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }
tbody td { padding: 12px; font-size: 13px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
tbody tr:hover td { background: var(--gray-50); }
tbody tr:last-child td { border-bottom: none; }

/* ===================== PAGINATION ===================== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.page-btn {
  width: 36px; height: 36px;
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-600); transition: all .2s;
}
.page-btn:hover, .page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ===================== FILTERS BAR ===================== */
.filters-bar {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 16px;
  margin-bottom: 20px;
}
.filters-row {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.filter-select {
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  padding: 8px 12px; font-size: 13px;
  background: #fff; cursor: pointer; color: var(--gray-700);
  min-width: 130px;
}
.filter-select:focus { outline: none; border-color: var(--primary); }
.filter-btn {
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  padding: 8px 14px; font-size: 13px;
  background: #fff; cursor: pointer; color: var(--gray-600);
  transition: all .2s; white-space: nowrap;
}
.filter-btn:hover, .filter-btn.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.sort-group { display: flex; gap: 4px; margin-right: auto; }

/* ===================== MODAL ===================== */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 500;
  align-items: center; justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .2s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--gray-100);
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.modal-title { font-size: 17px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  border: none; background: var(--gray-100);
  font-size: 18px; cursor: pointer; color: var(--gray-600);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.modal-close:hover { background: var(--gray-200); }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  display: flex; gap: 8px; justify-content: flex-end;
}

/* ===================== AUTH PAGE ===================== */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 20px;
}
.auth-card {
  width: 100%; max-width: 400px;
  text-align: center;
}
.auth-logo { margin-bottom: 24px; color: white; }
.auth-logo .logo-icon { width: 60px; height: 60px; font-size: 16px; border-radius: 16px; margin: 0 auto 10px; }
.auth-logo .logo-name { font-size: 24px; font-weight: 800; }
.auth-logo .logo-sub  { font-size: 13px; opacity: .8; }
.otp-input { font-size: 28px; font-weight: 800; text-align: center; letter-spacing: 12px; }

/* ===================== PROFILE PAGE ===================== */
.profile-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 32px 16px;
  text-align: center;
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; margin: 0 auto 12px;
}
.profile-name { font-size: 20px; font-weight: 700; }
.profile-phone { font-size: 14px; opacity: .8; direction: ltr; }
.loyalty-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.15);
  padding: 4px 14px; border-radius: 20px;
  font-size: 13px; margin-top: 8px;
}

.wallet-card {
  background: var(--primary);
  color: white; border-radius: var(--radius);
  padding: 20px;
}
.wallet-balance { font-size: 28px; font-weight: 800; margin: 6px 0; }
.wallet-label   { font-size: 13px; opacity: .8; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-box {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 16px; text-align: center;
}
.stat-box-num { font-size: 22px; font-weight: 800; color: var(--primary); }
.stat-box-lbl { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* ===================== ADMIN ===================== */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--gray-900);
  color: white;
  display: flex; flex-direction: column;
  position: fixed; top: 0; right: 0;
  height: 100vh; overflow-y: auto;
  z-index: 100;
  transition: transform .3s;
}
@media (max-width: 1023px) {
  .sidebar { transform: translateX(240px); }
  .sidebar.open { transform: translateX(0); }
  .admin-content { margin-right: 0 !important; }
}
.sidebar-logo {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo-icon {
  width: 38px; height: 38px; background: var(--primary);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
}
.sidebar-logo-text { font-weight: 700; font-size: 14px; }
.sidebar-logo-sub  { font-size: 11px; opacity: .5; }

.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-section-title { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.4); padding: 12px 16px 4px; text-transform: uppercase; letter-spacing: .5px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.7); transition: all .15s;
  cursor: pointer; border: none; background: none; width: 100%; text-align: right;
  text-decoration: none;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255,255,255,.08);
  color: white;
}
.sidebar-link.active { background: var(--primary); color: white; }
.sidebar-link .badge-count {
  margin-right: auto;
  background: var(--accent); color: white;
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px; min-width: 22px; text-align: center;
}
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.admin-content {
  flex: 1;
  margin-right: 240px;
  padding: 24px;
  min-height: 100vh;
  background: var(--gray-50);
}
@media (max-width: 767px) { .admin-content { padding: 16px; } }

.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 12px;
}
.admin-title { font-size: 22px; font-weight: 800; }
.menu-toggle {
  display: none;
  background: none; border: none;
  color: var(--gray-700); cursor: pointer;
  padding: 8px;
}
@media (max-width: 1023px) { .menu-toggle { display: block; } }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 1024px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }

.stat-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 18px 16px;
  display: flex; align-items: center; gap: 14px;
}
.stat-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-card-icon.blue   { background: #dbeafe; }
.stat-card-icon.green  { background: #dcfce7; }
.stat-card-icon.yellow { background: #fef9c3; }
.stat-card-icon.red    { background: #fee2e2; }
.stat-card-icon.purple { background: #f3e8ff; }
.stat-card-num { font-size: 22px; font-weight: 800; }
.stat-card-lbl { font-size: 12px; color: var(--gray-500); }

/* Sidebar overlay on mobile */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}
@media (max-width: 1023px) { .sidebar-overlay.show { display: block; } }

/* ===================== EMPTY STATE ===================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}
.empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 700; color: var(--gray-600); margin-bottom: 8px; }
.empty-desc  { font-size: 14px; color: var(--gray-400); margin-bottom: 20px; }

/* ===================== SKELETON ===================== */
.skeleton { background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-200); overflow: hidden; }
.skeleton-img  { width: 100%; aspect-ratio: 4/3; }
.skeleton-body { padding: 12px; }
.skeleton-line { height: 14px; margin-bottom: 8px; border-radius: 4px; }

/* ===================== TOAST ===================== */
.toast-container { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--gray-900); color: white;
  padding: 12px 20px; border-radius: 24px;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease;
  display: flex; align-items: center; gap: 8px;
  max-width: 90vw; text-align: center;
}
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }
@keyframes toastIn { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform: translateY(0); } }

/* ===================== PLANS ===================== */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 767px) { .plans-grid { grid-template-columns: 1fr; } }
.plan-card {
  background: #fff; border: 2px solid var(--gray-200);
  border-radius: 16px; padding: 28px 20px; text-align: center;
  transition: all .2s; position: relative;
}
.plan-card.featured {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(249,115,22,.15);
}
.plan-card.featured::before {
  content: 'پیشنهادی';
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: white;
  font-size: 12px; font-weight: 700; padding: 4px 16px; border-radius: 20px;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-icon { font-size: 40px; margin-bottom: 12px; }
.plan-name { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.plan-price { font-size: 28px; font-weight: 900; color: var(--primary); }
.plan-price span { font-size: 14px; font-weight: 400; color: var(--gray-400); }
.plan-features { text-align: right; margin: 20px 0; }
.plan-feature {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}
.plan-feature:last-child { border: none; }
.plan-feature .check { color: var(--green); font-weight: 700; }

/* ===================== QUICK ACTIONS ===================== */
.quick-actions {
  background: #fff;
  border-bottom: 1px solid var(--gray-100);
  padding: 12px 16px;
}
.quick-actions-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 640px) { .quick-actions-inner { grid-template-columns: repeat(2, 1fr); } }
.quick-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 14px 8px;
  border-radius: 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all .2s;
  border: 1.5px solid transparent;
}
.quick-btn-icon { font-size: 24px; }
.quick-btn.primary  { background: #eff6ff; color: var(--primary); border-color: #dbeafe; }
.quick-btn.accent   { background: #fff7ed; color: var(--accent); border-color: #fed7aa; }
.quick-btn.green    { background: #f0fdf4; color: var(--green); border-color: #bbf7d0; }
.quick-btn.purple   { background: #faf5ff; color: var(--purple); border-color: #ddd6fe; }
.quick-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ===================== SPEC LIST ===================== */
.spec-list { display: grid; gap: 10px; }
.spec-row { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.spec-row:last-child { border-bottom: none; }
.spec-key { font-size: 13px; color: var(--gray-500); width: 120px; flex-shrink: 0; }
.spec-val { font-size: 13px; font-weight: 600; flex: 1; }

/* ===================== MISC ===================== */
.text-center { text-align: center; }
.text-muted  { color: var(--gray-400); }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 28px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; }
.gap-2 { gap: 12px; }
.d-flex { display: flex; } .align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--gray-200); margin: 20px 0; }
.tag { display: inline-flex; align-items: center; gap: 4px; background: var(--gray-100); color: var(--gray-600); font-size: 12px; padding: 4px 10px; border-radius: 20px; }
.fw-bold { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-accent  { color: var(--accent); }
.link { color: var(--primary); cursor: pointer; }
.link:hover { text-decoration: underline; }

/* Responsive hiding */
@media (min-width: 768px) { .mobile-only { display: none !important; } }
@media (max-width: 767px) { .desktop-only { display: none !important; } }
