:root {
  --primary: #0D1B3D;
  --primary-2: #102A43;
  --primary-mid: #102A43;
  --primary-lit: #B7C4DC;
  --primary-pale: #EAF0F8;
  --accent: #0097A7;
  --accent-light: #41C7C7;
  --accent-pale: #E0F4F6;
  --success: #2EAD68;
  --green: #2EAD68;
  --green-lit: #DCF3E6;
  --orange: #d97706;
  --red: #dc2626;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --bg: #F6F8FB;
  --bg2: #EDF1F7;
  --border: #E6EAF0;
  --border-soft: rgba(13,27,61,.07);
  --text: #172033;
  --text-mid: #4A5468;
  --text-muted: #6B7280;
  --muted: #6B7280;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(13,27,61,.05), 0 1px 2px rgba(13,27,61,.06);
  --shadow-md: 0 4px 16px rgba(13,27,61,.06), 0 2px 6px rgba(13,27,61,.04);
  --shadow-lg: 0 12px 40px rgba(13,27,61,.10), 0 4px 12px rgba(13,27,61,.05);
  --shadow-glow: 0 0 30px rgba(0,151,167,.15);
  --glass: rgba(255,255,255,.8);
  --glass-border: rgba(230,234,240,.9);
}

* { font-family: 'Vazirmatn', Tahoma, sans-serif; box-sizing: border-box; }

body {
  background: var(--bg); color: var(--text); margin: 0;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Navbar ── */
.navbar {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--glass-border);
  padding: 10px 0;
  position: sticky; top: 0; z-index: 200;
}
.navbar-brand {
  font-size: 1.1rem; font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}
.nav-link {
  color: var(--text-mid) !important;
  font-size: .82rem; font-weight: 600;
  padding: 7px 14px !important;
  border-radius: var(--radius-sm);
  transition: .2s;
  text-decoration: none;
  position: relative;
}
.nav-link:hover {
  background: var(--primary-pale);
  color: var(--primary) !important;
}
.nav-link.active {
  background: var(--primary-pale);
  color: var(--primary) !important;
  font-weight: 700;
}

/* ── Hero ── */
.hero {
  background:
    radial-gradient(circle at 35% 30%, rgba(0,151,167,0.35), transparent 35%),
    linear-gradient(135deg, #0D1B3D 0%, #102A43 55%, #006D77 100%);
  color: #fff;
  padding: 56px 0 48px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 12% 88%, rgba(65,199,199,.16) 0%, transparent 45%),
    radial-gradient(circle at 88% 12%, rgba(255,255,255,.05) 0%, transparent 50%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(65,199,199,.5), transparent);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: 2.05rem; font-weight: 900; margin-bottom: 12px;
  letter-spacing: -.01em;
  text-shadow: 0 2px 20px rgba(0,0,0,.25);
  line-height: 1.6;
}
.hero p { font-size: .9rem; opacity: .8; margin: 0; font-weight: 400; line-height: 2; }
.hero .btn-light {
  background: #fff; color: var(--primary); border: none;
}
.hero .btn-light:hover { background: #EAF0F8; color: var(--primary); }
.hero .btn-outline-light {
  background: transparent; border: 1px solid rgba(255,255,255,.55); color: #fff;
}
.hero .btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }

.stat-card {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 20px; padding: 18px 14px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: .25s;
}
.stat-card:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(65,199,199,.45);
  transform: translateY(-2px);
}
.stat-card .val { font-size: 1.8rem; font-weight: 900; line-height: 1; }
.stat-card .lbl { font-size: .68rem; opacity: .65; margin-top: 6px; font-weight: 500; }

/* ── Filters (legacy) ── */
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-tab {
  padding: 6px 16px; border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-mid);
  font-size: .8rem; font-weight: 600;
  text-decoration: none; transition: .15s;
}
.filter-tab:hover { border-color: var(--primary-mid); color: var(--primary); }
.filter-tab.active {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(13,27,61,.25);
}
.form-control, .form-select {
  border-color: var(--border) !important;
  font-size: .85rem !important;
  box-shadow: none !important;
}
.btn-primary {
  background: var(--primary) !important; border: none !important;
  font-size: .85rem !important; font-weight: 700 !important;
}

/* ═══════════════════════════════════════════
   List Page Filters
   ═══════════════════════════════════════════ */
.lst-filter-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 22px 26px;
  margin-top: -24px;
  margin-bottom: 22px;
  position: relative;
  z-index: 10;
}
.lst-search-row {
  display: flex; gap: 14px; align-items: center;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.lst-search-box {
  flex: 1;
  display: flex; align-items: center;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0 16px;
  transition: .25s;
}
.lst-search-box:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0,151,167,.12);
}
.lst-search-box i {
  color: var(--text-muted); font-size: 1rem;
  margin-left: 10px;
}
.lst-search-box input {
  flex: 1;
  border: none; background: transparent;
  padding: 12px 10px;
  font-size: .88rem; font-weight: 500;
  color: var(--text);
  outline: none;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}
.lst-search-box input::placeholder { color: var(--text-muted); }
.lst-search-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 9px 22px;
  font-size: .8rem; font-weight: 700;
  cursor: pointer;
  transition: .2s;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(13,27,61,.25);
}
.lst-search-btn:hover {
  box-shadow: 0 4px 16px rgba(13,27,61,.32);
  transform: translateY(-1px);
}

.lst-total-badge {
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--primary-pale), #d7efe6);
  color: var(--primary);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: .82rem; font-weight: 800;
  white-space: nowrap;
  border: 1px solid var(--primary-lit);
}

.lst-filters-row {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.lst-filter-item {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  min-height: 40px;
  font-size: .82rem;
  transition: .2s;
}
.lst-filter-item:hover { border-color: var(--primary-lit); }
.lst-filter-item i { color: var(--primary); font-size: .88rem; flex-shrink: 0; }
.lst-filter-item select,
.lst-filter-item input {
  border: none; background: transparent;
  font-size: .8rem; font-weight: 600;
  color: var(--text);
  padding: 8px 4px;
  outline: none;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  min-width: 95px;
}
.lst-filter-range { gap: 4px; }
.lst-filter-range input { width: 65px; min-width: 55px; text-align: center; }
.lst-range-sep { font-size: .72rem; color: var(--text-muted); font-weight: 600; }

.lst-clear-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .78rem; font-weight: 700;
  color: var(--red);
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  text-decoration: none;
  transition: .2s;
}
.lst-clear-btn:hover {
  background: #fee2e2; color: #b91c1c;
  transform: translateY(-1px);
}

/* Status Tabs */
.lst-status-tabs {
  display: flex; gap: 10px; margin-bottom: 24px;
}
.lst-stab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 22px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-mid);
  font-size: .84rem; font-weight: 700;
  text-decoration: none;
  transition: .25s;
  box-shadow: var(--shadow);
}
.lst-stab i { font-size: .88rem; }
.lst-stab:hover {
  border-color: var(--primary-lit);
  color: var(--primary);
  background: var(--primary-pale);
  transform: translateY(-1px);
}
.lst-stab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(13,27,61,.25);
}
.lst-stab-green.active {
  background: linear-gradient(135deg, #059669, var(--green));
  box-shadow: 0 4px 16px rgba(16,185,129,.3);
}
.lst-stab-blue.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.lst-stab-count {
  font-size: .68rem; font-weight: 800;
  padding: 2px 9px; border-radius: 10px;
  background: rgba(255,255,255,.25);
}

/* Empty State */
.lst-empty {
  text-align: center;
  padding: 100px 20px;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}
.lst-empty i { color: var(--border); margin-bottom: 16px; }
.lst-empty h5 { font-weight: 800; color: var(--text); margin-bottom: 8px; }
.lst-empty p { font-size: .85rem; margin: 0; }

/* Pagination */
.pagination .page-link {
  border-color: var(--border); color: var(--text-mid);
  font-size: .82rem; border-radius: var(--radius-sm) !important;
  margin: 0 3px;
  padding: 8px 14px;
  transition: .2s;
  font-weight: 600;
}
.pagination .page-link:hover {
  background: var(--primary-pale); color: var(--primary);
  border-color: var(--primary-lit);
  transform: translateY(-1px);
}
.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 8px rgba(13,27,61,.25);
}

/* Select2 RTL */
.select2-container { direction: rtl; font-family: 'Vazirmatn', Tahoma, sans-serif; }
.select2-container--default .select2-selection--single {
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  height: 40px !important;
  padding: 5px 12px !important;
  background: var(--bg) !important;
  transition: .2s !important;
}
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(0,151,167,.12) !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 28px !important;
  font-size: .82rem !important; font-weight: 600 !important;
  color: var(--text) !important;
  padding: 0 !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px !important;
  left: 8px !important; right: auto !important;
}
.select2-dropdown {
  border-color: var(--border) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-lg) !important;
  overflow: hidden;
}
.select2-results__option {
  font-size: .82rem !important;
  padding: 10px 16px !important;
  transition: .15s !important;
}
.select2-container--default .select2-results__option--selected {
  background: var(--primary-pale) !important;
  color: var(--primary) !important;
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid)) !important;
}
.select2-search--dropdown .select2-search__field {
  border-radius: 8px !important;
  border-color: var(--border) !important;
  font-size: .82rem !important;
  padding: 8px 12px !important;
}

@media (max-width: 768px) {
  .lst-search-row { flex-direction: column; }
  .lst-total-badge { align-self: flex-start; }
  .lst-filters-row { gap: 8px; }
  .lst-filter-item { flex: 1; min-width: calc(50% - 8px); }
  .lst-status-tabs { flex-wrap: wrap; gap: 8px; }
  .hero h1 { font-size: 1.4rem; }
}

/* ═══════════════════════════════════════════
   Project Card
   ═══════════════════════════════════════════ */
.card-link { text-decoration: none; color: inherit; display: block; height: 100%; }
.card-link:hover { color: inherit; }

.pcard {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  padding: 0;
  height: 100%;
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: .3s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.pcard::before {
  content: '';
  position: absolute; top: 0; right: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity .3s;
}
.pcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.pcard:hover::before { opacity: 1; }

/* Head */
.pcard-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px 0;
}
.pcard-platform {
  font-size: .68rem; font-weight: 700; color: #fff;
  padding: 4px 14px; border-radius: 20px;
  line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.pcard-status {
  font-size: .64rem; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
  display: flex; align-items: center;
}
.st-collecting {
  background: var(--green-lit);
  color: #1F7A4C;
  border: 1px solid #B5E3C9;
}
.st-funded {
  background: var(--primary-pale);
  color: var(--primary);
  border: 1px solid var(--primary-lit);
}

/* Body */
.pcard-title {
  font-size: .86rem; font-weight: 800; line-height: 1.75;
  color: var(--text); margin: 12px 18px 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 46px;
}
.pcard-company {
  font-size: .72rem; color: var(--text-muted); font-weight: 500;
  margin: 3px 18px 0; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Highlights */
.pcard-highlights {
  display: flex; gap: 0; margin: 0;
  border-bottom: 1px solid var(--border);
}
.hl-box {
  flex: 1; padding: 13px 16px;
  display: flex; flex-direction: column;
  justify-content: center;
}
.hl-box + .hl-box { border-right: 1px solid var(--border); }
.hl-label { font-size: .62rem; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; }
.hl-val { font-size: .84rem; font-weight: 800; color: var(--text); }
.hl-issuer { font-size: .78rem; font-weight: 700; color: var(--primary); }
.hl-unknown { color: var(--text-muted) !important; font-weight: 500 !important; }
.hl-row { display: flex; justify-content: space-between; align-items: baseline; }
.hl-row + .hl-row { margin-top: 6px; }

.hl-profit { text-align: center; background: linear-gradient(180deg, rgba(46,173,104,.04), rgba(46,173,104,.09)); }
.hl-profit .hl-label { margin-bottom: 3px; }
.hl-profit .hl-val {
  color: var(--success); font-size: 1.35rem; letter-spacing: -.5px;
  font-weight: 900;
}
.hl-guarantee .hl-val { color: var(--primary-2); font-size: .78rem; }
.hl-guarantee .hl-row .hl-label { margin-bottom: 0; }

/* Metrics */
.pcard-metrics {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.metric {
  padding: 12px 18px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
}
.metric:nth-child(odd) { border-left: 1px solid var(--border); }
.metric:nth-last-child(-n+2) { border-bottom: none; }
.metric-lbl { font-size: .64rem; color: var(--text-muted); font-weight: 500; }
.metric-val { font-size: .8rem; font-weight: 800; color: var(--text); }

/* Progress */
.pcard-progress { padding: 16px 20px 0; }
.pbar-track {
  height: 24px; border-radius: 12px;
  background: var(--bg); overflow: hidden;
  border: 1px solid var(--border);
}
.pbar-fill {
  height: 100%; border-radius: 12px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  display: flex; align-items: center; justify-content: flex-end;
  min-width: 36px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
  position: relative; overflow: hidden;
}
.pbar-fill.complete {
  background: linear-gradient(90deg, #059669 0%, var(--green) 50%, #06d6a0 100%);
}
.pbar-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.3) 50%, transparent 100%);
  animation: shimmer 2.5s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
.pbar-pct {
  font-size: .66rem; font-weight: 800; color: #fff;
  position: relative; z-index: 1; padding: 0 10px;
  text-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.pbar-details {
  display: flex; justify-content: space-between; margin-top: 8px;
}
.pbar-item-lbl { font-size: .58rem; color: var(--text-muted); display: block; }
.pbar-item-val { font-size: .72rem; font-weight: 800; color: var(--text); }

/* Card Footer */
.pcard-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px 16px;
  margin-top: auto;
}
.pcard-date { font-size: .66rem; color: var(--text-muted); font-weight: 500; }
.pcard-cta {
  font-size: .7rem; font-weight: 800; color: var(--accent);
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--accent-pale);
  background: var(--accent-pale);
  border-radius: 8px; padding: 4px 12px;
  transition: .18s;
}
.pcard:hover .pcard-cta { background: var(--accent); color: #fff; }
.pcard-extlink {
  font-size: .68rem; font-weight: 700; color: var(--primary);
  cursor: pointer;
  transition: .15s;
  display: flex; align-items: center; gap: 4px;
}
.pcard-extlink:hover { color: var(--accent); }

/* Animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.pcard { animation: fadeUp .4s ease both; }
.col:nth-child(1) .pcard { animation-delay: .03s; }
.col:nth-child(2) .pcard { animation-delay: .08s; }
.col:nth-child(3) .pcard { animation-delay: .13s; }
.col:nth-child(4) .pcard { animation-delay: .18s; }
.col:nth-child(5) .pcard { animation-delay: .23s; }
.col:nth-child(6) .pcard { animation-delay: .28s; }

/* ── Detail Page ── */
.detail-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}
.detail-hero {
  height: 200px;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem; font-weight: 900;
  color: rgba(255,255,255,.9);
}
.detail-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.04), rgba(0,0,0,.35));
}
.detail-body { padding: 28px 32px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px; margin-top: 20px;
}
.info-item {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 14px 16px; border: 1px solid var(--border);
  transition: .2s;
}
.info-item:hover { border-color: var(--primary-lit); }
.info-item .lbl {
  font-size: .68rem; color: var(--text-muted);
  margin-bottom: 4px; font-weight: 500;
}
.info-item .val { font-size: .88rem; font-weight: 700; color: var(--text); }

/* Stats page */
.card {
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-md) !important;
}

/* ── Nav Auth ── */
.nav-divider {
  width: 1px; height: 20px;
  background: var(--border);
  margin: 0 6px;
}
.nav-register {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid)) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
  padding: 7px 18px !important;
  box-shadow: 0 2px 8px rgba(13,27,61,.20);
  transition: .2s !important;
}
.nav-register:hover {
  box-shadow: 0 4px 14px rgba(13,27,61,.30) !important;
  transform: translateY(-1px);
}
.nav-logout {
  color: var(--text-muted) !important;
  font-weight: 500 !important;
}

/* ── Auth Pages ── */
.auth-container {
  display: flex; justify-content: center; align-items: center;
  min-height: 60vh; padding: 40px 16px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 44px 40px;
  width: 100%; max-width: 420px;
}
.auth-header {
  text-align: center; margin-bottom: 28px;
}
.auth-header h2 {
  font-size: 1.3rem; font-weight: 900;
  color: var(--text); margin-bottom: 6px;
}
.auth-header p {
  font-size: .82rem; color: var(--text-muted); margin: 0;
}
.auth-field { margin-bottom: 18px; }
.auth-field label {
  display: block;
  font-size: .78rem; font-weight: 600;
  color: var(--text-mid); margin-bottom: 6px;
}
.auth-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: .88rem;
  background: var(--bg);
  color: var(--text);
  transition: .25s;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}
.auth-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0,151,167,.12);
}
.otp-input {
  text-align: center;
  letter-spacing: .6em;
  font-size: 1.2rem;
}
.auth-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: .9rem; font-weight: 700;
  cursor: pointer;
  transition: .25s;
  margin-top: 8px;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  display: block; text-align: center; text-decoration: none;
  box-shadow: 0 2px 10px rgba(13,27,61,.25);
}
.auth-btn:hover {
  box-shadow: 0 4px 20px rgba(13,27,61,.32);
  transform: translateY(-1px);
  color: #fff;
}
.auth-btn-outline {
  background: transparent;
  color: var(--text-mid);
  border: 2px solid var(--border);
  box-shadow: none;
}
.auth-btn-outline:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--text-muted);
  box-shadow: none;
  transform: none;
}
.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: .82rem;
  color: var(--text-muted);
}
.auth-footer a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }
.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: .8rem;
  color: #dc2626;
}
.auth-error p { margin: 0; }
.field-error {
  display: block;
  font-size: .72rem;
  color: #dc2626;
  margin-top: 4px;
}

/* ── Profile ── */
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 1.8rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(13,27,61,.25);
}
.profile-info { margin: 24px 0; }
.profile-row {
  display: flex; justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.profile-row:last-child { border-bottom: none; }
.profile-label { color: var(--text-muted); font-weight: 500; }
.profile-value { color: var(--text); font-weight: 700; }

/* ── Platform Cards ── */
.platform-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 26px;
  height: 100%;
  transition: .3s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
}
.platform-card::before {
  content: '';
  position: absolute; top: 0; right: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0; transition: opacity .3s;
}
.platform-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.platform-card:hover::before { opacity: 1; }
.platform-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.platform-name {
  font-size: .98rem; font-weight: 800; color: var(--text); margin: 0;
}
.platform-badge {
  font-size: .65rem; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
  background: var(--bg); color: var(--text-muted);
  border: 1px solid var(--border);
}
.platform-badge.active {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #059669;
  border-color: #a7f3d0;
}
.platform-stats {
  display: flex; gap: 0;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.platform-stat {
  flex: 1; text-align: center;
  padding: 14px 10px;
}
.platform-stat + .platform-stat {
  border-right: 1px solid var(--border);
}
.platform-stat-val {
  display: block;
  font-size: 1rem; font-weight: 900; color: var(--primary);
}
.platform-stat-lbl {
  display: block;
  font-size: .6rem; color: var(--text-muted); margin-top: 3px; font-weight: 500;
}

/* Platform Actions */
.platform-actions {
  display: flex; gap: 10px;
  margin-top: 18px;
}
.platform-btn {
  flex: 1; text-align: center;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: .82rem; font-weight: 700;
  text-decoration: none;
  transition: .25s;
}
.platform-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff;
  box-shadow: 0 2px 8px rgba(13,27,61,.20);
}
.platform-btn-primary:hover {
  box-shadow: 0 4px 16px rgba(13,27,61,.30);
  transform: translateY(-1px);
  color: #fff;
}
.platform-btn-outline {
  background: transparent; color: var(--text-mid);
  border: 2px solid var(--border);
}
.platform-btn-outline:hover {
  background: var(--primary-pale); color: var(--primary);
  border-color: var(--primary-lit);
}

/* ── Platform Detail ── */
.pd-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 26px;
  height: 100%;
}
.pd-card-title {
  font-size: .9rem; font-weight: 800;
  color: var(--text); margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.pd-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.pd-info-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.pd-info-item:nth-child(odd) { padding-left: 12px; }
.pd-info-item:nth-child(even) { padding-right: 12px; border-right: 1px solid var(--border); }
.pd-info-item:nth-last-child(-n+2) { border-bottom: none; }
.pd-info-label {
  display: block;
  font-size: .68rem; font-weight: 500; color: var(--text-muted);
  margin-bottom: 4px;
}
.pd-info-value {
  display: block;
  font-size: .88rem; font-weight: 800; color: var(--text);
}
.pd-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.pd-stat-box {
  background: var(--bg);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  border: 1px solid var(--border);
  transition: .2s;
}
.pd-stat-box:hover { border-color: var(--primary-lit); }
.pd-stat-val {
  font-size: 1.5rem; font-weight: 900; color: var(--primary);
  line-height: 1;
}
.pd-stat-lbl {
  font-size: .65rem; color: var(--text-muted);
  margin-top: 6px;
}
.pd-mini-stats {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.pd-mini {
  display: flex; align-items: center; gap: 6px;
  font-size: .75rem; color: var(--text-mid); font-weight: 600;
}
.pd-mini-dot { width: 8px; height: 8px; border-radius: 50%; }

/* Guarantee Breakdown */
.pd-guarantee-grid { display: flex; flex-direction: column; gap: 12px; }
.pd-guarantee-item { display: flex; flex-direction: column; gap: 5px; }
.pd-guarantee-bar {
  height: 8px; border-radius: 4px;
  background: var(--bg2); overflow: hidden;
}
.pd-guarantee-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  min-width: 4px;
}
.pd-guarantee-info { display: flex; justify-content: space-between; }
.pd-guarantee-name { font-size: .78rem; font-weight: 600; color: var(--text); }
.pd-guarantee-count { font-size: .72rem; font-weight: 700; color: var(--text-muted); }

/* ── Compare Launch Button ── */
.cmp-launch-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: 12px;
  font-size: .84rem; font-weight: 700;
  text-decoration: none;
  transition: .25s;
  box-shadow: 0 2px 12px rgba(13,27,61,.25);
}
.cmp-launch-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13,27,61,.32);
}

/* ── Platform Compare Page ── */
.cmp-back-btn {
  padding: 8px 18px;
  background: transparent;
  color: var(--text-mid);
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: .82rem; font-weight: 700;
  text-decoration: none;
  transition: .2s;
}
.cmp-back-btn:hover {
  background: var(--primary-pale); color: var(--primary);
  border-color: var(--primary-lit);
}

.cmp-select-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 22px 26px;
  margin-bottom: 24px;
}
.cmp-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.cmp-platform-chips {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.cmp-chip {
  display: inline-flex; align-items: center;
  padding: 7px 18px;
  border-radius: 22px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-mid);
  font-size: .8rem; font-weight: 600;
  cursor: pointer;
  transition: .2s;
  user-select: none;
}
.cmp-chip input { display: none; }
.cmp-chip:hover {
  border-color: var(--primary-lit);
  color: var(--primary);
  background: var(--primary-pale);
}
.cmp-chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(13,27,61,.25);
}

/* Compare Table */
.cmp-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}
.cmp-th-label {
  background: var(--bg);
  padding: 16px 20px;
  font-weight: 800;
  color: var(--text);
  font-size: .8rem;
  border-bottom: 2px solid var(--border);
  position: sticky; right: 0;
  min-width: 180px;
  text-align: right;
}
.cmp-th-platform {
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff;
  padding: 16px 20px;
  font-weight: 700;
  font-size: .84rem;
  border-bottom: 2px solid var(--border);
  text-align: center;
  min-width: 155px;
}
.cmp-th-platform:nth-child(even) {
  background: linear-gradient(135deg, var(--primary-mid), var(--accent));
}
.cmp-td-label {
  padding: 14px 20px;
  font-weight: 600;
  color: var(--text-mid);
  font-size: .8rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; right: 0;
  text-align: right;
}
.cmp-td-val {
  padding: 14px 20px;
  font-weight: 800;
  color: var(--text);
  font-size: .9rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.cmp-td-val.cmp-profit { color: var(--green); }
.cmp-td-val.cmp-success { color: var(--primary); }
.cmp-td-val.cmp-date { font-size: .76rem; color: var(--text-muted); font-weight: 600; direction: ltr; }

.cmp-badge-green {
  display: inline-block;
  padding: 3px 12px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #059669;
  border-radius: 14px;
  font-size: .76rem; font-weight: 700;
}
.cmp-badge-blue {
  display: inline-block;
  padding: 3px 12px;
  background: linear-gradient(135deg, var(--primary-pale), #d7efe6);
  color: var(--primary);
  border-radius: 14px;
  font-size: .76rem; font-weight: 700;
}

.cmp-td-guarantees {
  display: flex; flex-wrap: wrap; gap: 4px;
  justify-content: center;
}
.cmp-guarantee-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .68rem; font-weight: 600;
  color: var(--text-mid);
  white-space: nowrap;
}
.cmp-guarantee-tag small { color: var(--text-muted); font-weight: 700; }

/* Compare Charts */
.cmp-chart-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 22px;
}
.cmp-chart-title {
  font-size: .88rem; font-weight: 800;
  color: var(--text); margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Compare Empty State */
.cmp-empty {
  text-align: center;
  padding: 100px 20px;
  color: var(--text-muted);
}
.cmp-empty svg { margin-bottom: 18px; opacity: .5; }
.cmp-empty h5 {
  font-weight: 800; color: var(--text);
  margin-bottom: 8px; font-size: 1.05rem;
}
.cmp-empty p { font-size: .85rem; color: var(--text-muted); margin: 0; }

/* ═══════════════════════════════════════════
   Sankey-style Guarantee Flow
   ═══════════════════════════════════════════ */
.sankey-flow {
  display: flex;
  gap: 0;
  align-items: flex-start;
  overflow-x: auto;
  padding: 8px 0;
}

/* Source (left) */
.sankey-source {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  align-items: center;
  align-self: center;
}
.sankey-source-box {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 16px;
  padding: 22px 20px;
  color: #fff;
  width: 100%;
  box-shadow: 0 4px 20px rgba(13,27,61,.25);
  position: relative;
}
.sankey-source-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
  opacity: .8;
}
.sankey-source-label {
  display: block;
  font-size: .68rem; font-weight: 600;
  opacity: .7;
  margin-bottom: 4px;
}
.sankey-source-val {
  display: block;
  font-size: 1.15rem; font-weight: 900;
  line-height: 1.2;
}
.sankey-source-count {
  display: block;
  font-size: .7rem; font-weight: 600;
  opacity: .6;
  margin-top: 4px;
}

/* Branches (right side) */
.sankey-branches {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 0;
}

/* Each branch row */
.sankey-branch {
  display: flex;
  align-items: stretch;
  gap: 0;
}

/* Connector line from source to node */
.sankey-connector {
  width: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.sankey-connector::before {
  content: '';
  position: absolute;
  top: 50%; right: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--primary-lit), var(--border));
}
.sankey-connector::after {
  content: '';
  position: absolute;
  top: 50%; right: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px var(--primary-pale);
}
.sankey-line {
  display: none;
}

/* Guarantee Type Node */
.sankey-node {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: .25s;
}
.sankey-node:hover {
  border-color: var(--primary-lit);
  box-shadow: var(--shadow-md);
}
.sankey-node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
}
.sankey-node-main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}
.sankey-node-type {
  font-size: .88rem; font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}
.sankey-node-stats {
  display: flex; gap: 16px; align-items: center;
}
.sankey-node-vol {
  font-size: .82rem; font-weight: 800;
  color: var(--primary);
}
.sankey-node-vol small {
  font-size: .65rem; font-weight: 600;
  color: var(--text-muted);
}
.sankey-node-pct {
  font-size: .75rem; font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 2px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.sankey-node-count {
  font-size: .72rem; font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 10px;
  border-radius: 8px;
}

/* Expand Button */
.sankey-expand-btn {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  font-size: .9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: .25s;
  flex-shrink: 0;
}
.sankey-expand-btn:hover {
  background: var(--primary-pale);
  border-color: var(--primary-lit);
}
.sankey-expand-btn.expanded {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: rotate(45deg);
  box-shadow: 0 2px 8px rgba(13,27,61,.25);
}

/* Node progress bar */
.sankey-node-bar {
  height: 4px;
  background: var(--bg);
}
.sankey-node-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 0 4px 4px 0;
  min-width: 4px;
  transition: width .5s;
}

/* Expandable Issuers List */
.sankey-issuers {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg), var(--surface));
  padding: 6px 0;
}
.sankey-issuer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  transition: .15s;
  border-bottom: 1px solid rgba(0,0,0,.03);
}
.sankey-issuer:last-child { border-bottom: none; }
.sankey-issuer:hover { background: var(--primary-pale); }
.sankey-issuer-info {
  display: flex; align-items: center; gap: 8px;
}
.sankey-issuer-info i {
  color: var(--accent);
  font-size: .8rem;
}
.sankey-issuer-name {
  font-size: .8rem; font-weight: 700;
  color: var(--text);
}
.sankey-issuer-pct {
  font-size: .68rem; font-weight: 800;
  color: var(--accent);
  background: var(--accent-pale);
  padding: 1px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.sankey-issuer-stats {
  display: flex; gap: 14px; align-items: center;
}
.sankey-issuer-vol {
  font-size: .78rem; font-weight: 800;
  color: var(--green);
}
.sankey-issuer-vol small {
  font-size: .62rem; font-weight: 600;
  color: var(--text-muted);
}
.sankey-issuer-count {
  font-size: .68rem; font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
  .sankey-flow { flex-direction: column; }
  .sankey-source { width: 100%; }
  .sankey-connector { width: 100%; height: 24px; }
  .sankey-connector::before {
    top: 0; right: 50%;
    width: 2px; height: 100%;
  }
  .sankey-connector::after {
    top: auto; bottom: 0; right: 50%;
    transform: translateX(50%);
  }
  .sankey-node-main { flex-direction: column; gap: 6px; align-items: flex-start; }
  .sankey-node-stats { gap: 10px; }
}

/* ═══════════════════════════════════════════
   Guarantee Overview — 3-Level Tree
   ═══════════════════════════════════════════ */
.gar-filter-bar {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 14px 22px;
  margin-top: -24px;
  margin-bottom: 24px;
  position: relative; z-index: 10;
}
.gar-tree { display: flex; flex-direction: column; gap: 12px; }

/* ── Level 1: Guarantee Type ── */
.gar-l1 {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: .25s;
}
.gar-l1:hover { box-shadow: var(--shadow-lg); }
.gar-l1-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px;
  cursor: pointer;
  transition: .15s;
}
.gar-l1-header:hover { background: var(--bg); }
.gar-l1-right {
  display: flex; align-items: center; gap: 14px;
}
.gar-l1-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-pale), #d7efe6);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.gar-l1-name {
  display: block;
  font-size: .95rem; font-weight: 800; color: var(--text);
}
.gar-l1-sub {
  display: block;
  font-size: .72rem; font-weight: 500; color: var(--text-muted);
  margin-top: 2px;
}
.gar-l1-left {
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.gar-minibar {
  width: 120px; height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.gar-minibar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  min-width: 3px;
  transition: width .5s;
}

/* Toggle Button */
.gar-toggle {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-mid);
  font-size: .7rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: .25s;
  flex-shrink: 0;
}
.gar-toggle:hover {
  border-color: var(--primary-lit);
  color: var(--primary);
}
.gar-toggle.open {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: rotate(-90deg);
}
.gar-toggle.sm {
  width: 24px; height: 24px;
  border-radius: 6px;
  font-size: .6rem;
}
.gar-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 8px;
}

/* Percentage Badges */
.gar-pct-badge {
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.gar-pct-badge.l1 {
  font-size: .82rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 2px 8px rgba(13,27,61,.20);
}
.gar-pct-badge.l2 {
  font-size: .74rem;
  color: var(--accent);
  background: var(--accent-pale);
  border: 1px solid rgba(201,147,47,.2);
}
.gar-pct-badge.l3 {
  font-size: .68rem;
  color: var(--green);
  background: var(--green-lit);
  border: 1px solid rgba(16,185,129,.2);
}

/* ── Level 2: Issuers ── */
.gar-l2-wrap {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg), var(--surface));
}
.gar-l2 {
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.gar-l2:last-child { border-bottom: none; }
.gar-l2-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 22px 12px 44px;
  cursor: pointer;
  transition: .15s;
}
.gar-l2-header:hover { background: var(--primary-pale); }
.gar-l2-right {
  display: flex; align-items: center; gap: 10px;
}
.gar-l2-connector {
  width: 20px; height: 2px;
  background: var(--border);
  flex-shrink: 0;
}
.gar-l2-icon {
  color: var(--accent);
  font-size: .85rem;
  flex-shrink: 0;
}
.gar-l2-name {
  font-size: .84rem; font-weight: 700; color: var(--text);
}
.gar-l2-sub {
  font-size: .68rem; font-weight: 500; color: var(--text-muted);
  margin-right: 8px;
}
.gar-l2-info {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.gar-l2-left {
  flex-shrink: 0;
}
.gar-l2-empty {
  padding: 20px 44px;
  font-size: .8rem; color: var(--text-muted);
  font-weight: 500;
}

/* ── Level 3: Platforms ── */
.gar-l3-wrap {
  background: rgba(13,27,61,.02);
  border-top: 1px solid var(--border);
}
.gar-l3 {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 22px 10px 80px;
  border-bottom: 1px solid rgba(0,0,0,.03);
  transition: .15s;
  cursor: pointer;
}
.gar-l3:last-child { border-bottom: none; }
.gar-l3:hover { background: rgba(13,27,61,.04); }
.gar-l3-connector {
  width: 16px; height: 2px;
  background: var(--primary-lit);
  flex-shrink: 0;
}
.gar-l3-icon {
  color: var(--primary-mid);
  font-size: .78rem;
  flex-shrink: 0;
}
.gar-l3-name {
  font-size: .8rem; font-weight: 700; color: var(--primary);
  text-decoration: none;
  transition: .15s;
}
.gar-l3-name:hover { color: var(--accent); text-decoration: underline; }
.gar-l3-count {
  font-size: .68rem; font-weight: 600; color: var(--text-muted);
  margin-right: auto;
}
.gar-l3-vol {
  font-size: .72rem; font-weight: 700; color: var(--text-mid);
}
.gar-l3-vol small {
  font-size: .6rem; color: var(--text-muted);
}

@media (max-width: 768px) {
  .gar-l1-left { flex-direction: column; gap: 6px; align-items: flex-end; }
  .gar-minibar { width: 80px; }
  .gar-l2-header { padding-right: 22px; }
  .gar-l3 { padding-right: 44px; flex-wrap: wrap; }
  .gar-l2-info { flex-direction: column; gap: 2px; }
}

/* ── Contact ── */
.contact-info-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 28px;
}
.contact-item {
  display: flex; gap: 14px; align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.contact-item:last-child { border-bottom: none; }
.contact-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-pale), #d7efe6);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-label { font-size: .72rem; color: var(--text-muted); font-weight: 500; }
.contact-value { font-size: .88rem; font-weight: 700; color: var(--text); }

/* ═══════════════════════════════════════════
   Data Management Panel
   ═══════════════════════════════════════════ */
.dm-header {
  display: flex; justify-content: space-between; align-items: center;
  margin: 20px 0 16px; flex-wrap: wrap; gap: 12px;
}
.dm-title {
  font-size: 1.2rem; font-weight: 900; color: var(--text); margin: 0;
}
.dm-subtitle {
  font-size: .78rem; color: var(--text-muted); margin: 4px 0 0;
}

/* Gap Stats */
.dm-gaps {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 16px 22px;
  margin-bottom: 14px;
}
.dm-gap-title {
  font-size: .78rem; font-weight: 700; color: var(--orange);
  margin-bottom: 12px;
}
.dm-gap-chips {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.dm-gap-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-mid);
  font-size: .76rem; font-weight: 700;
  text-decoration: none;
  transition: .2s;
}
.dm-gap-chip:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: #fffbeb;
}
.dm-gap-chip.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 2px 8px rgba(245,158,11,.3);
}
.dm-gap-num {
  font-weight: 900; font-size: .82rem;
}
.dm-gap-clear {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: #fef2f2;
  color: var(--red);
  text-decoration: none;
  font-size: .8rem;
  transition: .15s;
}
.dm-gap-clear:hover { background: #fee2e2; }

/* Filters */
.dm-filters {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 22px;
  margin-bottom: 16px;
}
.dm-search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  flex: 1; max-width: 300px;
}
.dm-search-box i { color: var(--text-muted); font-size: .85rem; }
.dm-search-box input {
  border: none; background: transparent;
  padding: 8px 6px; font-size: .82rem;
  color: var(--text); outline: none;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  width: 100%;
}
.dm-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: .8rem; font-weight: 600;
  color: var(--text);
  background: var(--bg);
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  outline: none;
}
.dm-filter-btn {
  padding: 7px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff; border: none;
  border-radius: var(--radius-sm);
  font-size: .78rem; font-weight: 700;
  cursor: pointer;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  transition: .2s;
}
.dm-filter-btn:hover { box-shadow: 0 2px 10px rgba(13,27,61,.25); }

/* Table */
.dm-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}
.dm-table {
  width: 100%;
  border-collapse: collapse;
}
.dm-table thead {
  background: linear-gradient(135deg, #102A43, #0D1B3D);
}
.dm-table th {
  padding: 14px 16px;
  font-size: .74rem; font-weight: 700;
  color: rgba(255,255,255,.9);
  text-align: right;
  white-space: nowrap;
  border-bottom: 2px solid var(--primary);
}
.dm-th-sticky {
  position: sticky; right: 0;
  z-index: 2;
  background: #102A43;
}
.dm-table tbody tr {
  transition: .15s;
}
.dm-table tbody tr:hover {
  background: rgba(13,27,61,.03);
}
.dm-table tbody tr:nth-child(even) {
  background: rgba(0,0,0,.015);
}
.dm-table tbody tr:nth-child(even):hover {
  background: rgba(13,27,61,.04);
}
.dm-td-platform {
  padding: 10px 16px;
  font-size: .72rem; font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  position: sticky; right: 0;
  background: inherit;
  z-index: 1;
}
.dm-td-title {
  padding: 10px 16px;
  font-size: .78rem; font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  min-width: 200px;
  position: sticky; right: 90px;
  background: inherit;
  z-index: 1;
}

/* Editable Cell */
.dm-td-cell {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  min-width: 110px;
  position: relative;
}
.dm-td-cell.dm-empty {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
.dm-cell-display {
  cursor: pointer;
  min-height: 28px;
  display: flex; align-items: center;
  border-radius: 6px;
  padding: 2px 6px;
  transition: .15s;
}
.dm-cell-display:hover {
  background: rgba(13,27,61,.06);
}
.dm-val {
  font-size: .78rem; font-weight: 600; color: var(--text);
}
.dm-placeholder {
  color: var(--orange);
  font-size: .8rem;
  opacity: .6;
}
.dm-empty .dm-cell-display:hover .dm-placeholder {
  opacity: 1;
}

/* Edit Input */
.dm-input {
  width: 100%;
  padding: 6px 10px;
  border: 2px solid var(--primary);
  border-radius: 8px;
  font-size: .8rem; font-weight: 600;
  color: var(--text);
  background: #fff;
  outline: none;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  box-shadow: 0 0 0 3px rgba(0,151,167,.18);
}

.dm-no-data {
  text-align: center;
  padding: 60px 20px;
  font-size: .88rem;
  color: var(--text-muted);
}
.dm-no-data i {
  font-size: 2rem;
  display: block; margin-bottom: 10px;
}

/* Toast */
.dm-toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 28px;
  border-radius: 12px;
  font-size: .82rem; font-weight: 700;
  color: #fff;
  opacity: 0;
  transition: .3s;
  z-index: 9999;
  pointer-events: none;
}
.dm-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.dm-toast.success {
  background: linear-gradient(135deg, #059669, var(--green));
  box-shadow: 0 4px 16px rgba(16,185,129,.35);
}
.dm-toast.error {
  background: linear-gradient(135deg, #dc2626, var(--red));
  box-shadow: 0 4px 16px rgba(239,68,68,.35);
}

@media (max-width: 768px) {
  .dm-th-sticky, .dm-td-platform, .dm-td-title { position: static; }
  .dm-search-box { max-width: 100%; }
}

/* ── Footer ── */
.site-footer {
  background: linear-gradient(180deg, #0D1B3D 0%, #081226 100%);
  color: rgba(255,255,255,.6);
  padding: 56px 0 0; margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand {
  font-size: 1.15rem; font-weight: 900;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.footer-about {
  font-size: .78rem; line-height: 1.9;
  color: rgba(255,255,255,.35); margin: 0;
}
.footer-title {
  font-size: .82rem; font-weight: 700; color: #fff;
  margin-bottom: 14px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: rgba(255,255,255,.4);
  text-decoration: none;
  font-size: .8rem;
  transition: .2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li {
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  margin-bottom: 10px;
}
.footer-social { display: flex; gap: 10px; }
.social-link {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.45);
  display: flex; align-items: center; justify-content: center;
  transition: .25s;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.08);
}
.social-link:hover {
  background: rgba(13,27,61,.25);
  color: #fff;
  border-color: rgba(13,27,61,.32);
  transform: translateY(-2px);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  margin-top: 36px;
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p {
  margin: 0;
  font-size: .72rem;
  color: rgba(255,255,255,.2);
}

/* ── Guarantee Tree Filter Chip ── */
.gar-tree-filter-chip {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--primary-pale);
  border: 1px solid var(--primary-lit);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: .82rem; font-weight: 600;
  color: var(--text-mid);
}
.chip-val {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--primary-lit);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .78rem; font-weight: 700;
}
.chip-clear {
  margin-right: auto;
  color: var(--text-muted);
  font-size: .78rem; font-weight: 600;
  text-decoration: none;
}
.chip-clear:hover { color: var(--red); }

/* ── Project Table (stats / platforms / guarantees) ── */
.proj-table-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 20px 22px 8px;
}
.proj-table-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.proj-table-count {
  font-size: .78rem; font-weight: 700;
  color: var(--text-muted);
}
.proj-table {
  width: 100%;
  border-collapse: collapse;
}
.proj-table thead th {
  padding: 10px 14px;
  font-size: .74rem; font-weight: 700;
  color: var(--text-mid);
  text-align: right;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}
.proj-table tbody td {
  padding: 12px 14px;
  font-size: .82rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.proj-table-title {
  font-weight: 700;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proj-table tbody tr {
  cursor: pointer;
  transition: .15s;
}
.proj-table tbody tr:hover {
  background: var(--primary-pale);
}
.proj-table-empty-row td {
  text-align: center;
  color: var(--text-muted);
  padding: 28px 14px;
  cursor: default;
}
.proj-table-empty-row:hover {
  background: transparent !important;
}

/* ── Platform star ratings ── */
.stars {
  position: relative; display: inline-block;
  font-size: .95rem; line-height: 1; letter-spacing: 2px;
  color: #cbd5e1; direction: rtl;
}
.stars::before { content: '★★★★★'; }
.stars .stars-fill {
  position: absolute; top: 0; right: 0;
  overflow: hidden; white-space: nowrap;
  color: #f59e0b; width: 0;
}
.stars .stars-fill::before { content: '★★★★★'; }
.rating-row {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem; color: var(--text-mid);
}
.rating-row .rating-num { font-weight: 800; color: #f59e0b; font-size: .8rem; }

/* ── Reviews section (platform detail) ── */
.reviews-panel {
  background: var(--card, #fff); border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px; padding: 22px; margin-top: 20px;
}
.reviews-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.reviews-summary .big-num { font-size: 2rem; font-weight: 900; color: #f59e0b; line-height: 1; }
.review-item { border-top: 1px solid var(--border, #f1f5f9); padding: 12px 2px; }
.review-item .rev-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.review-item .rev-name { font-weight: 700; font-size: .8rem; }
.review-item .rev-date { font-size: .68rem; color: var(--text-mid); }
.review-item .rev-text { font-size: .8rem; color: var(--text-mid); line-height: 1.9; margin: 0; }
.review-form .star-picker { display: inline-flex; flex-direction: row-reverse; gap: 4px; font-size: 1.6rem; cursor: pointer; }
.review-form .star-picker span { color: #cbd5e1; transition: .15s; }
.review-form .star-picker span.on { color: #f59e0b; }
.review-form textarea {
  width: 100%; border: 1px solid var(--border, #e2e8f0); border-radius: 10px;
  padding: 10px 14px; font-size: .82rem; margin-top: 10px; outline: none;
  background: var(--bg, #f8fafc); resize: vertical; min-height: 80px;
}
.review-form .btn-review {
  border: none; border-radius: 10px; padding: 9px 26px; margin-top: 10px;
  background: var(--primary, #0D1B3D); color: #fff; font-weight: 800; font-size: .8rem; cursor: pointer;
}
