/* ============================================================
   قیمتو 7.1 — APP CSS (نسخه نهایی اصلاح‌شده)
   ✅ حذف اسلایدر سبز و جایگزینی با بنر
   ✅ Live Strip — نوار قیمت‌های زنده
   ✅ Sparkline روی همه کارت‌ها
   ✅ حالت Grid / List
   ✅ Splash Screen 2.0
   ✅ انیمیشن‌های نرم و Lazy
============================================================ */

/* ═══════════════ 1. RESET ═══════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Dana', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: 0;
  background: none;
  outline: none;
}

button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ═══════════════ 2. FONT FACE ═══════════════ */
@font-face {
  font-family: 'Dana';
  src: url('../assets/fonts/dana-regular.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Dana';
  src: url('../assets/fonts/dana-medium.woff') format('woff');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Dana';
  src: url('../assets/fonts/dana-demibold.woff') format('woff');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Dana';
  src: url('../assets/fonts/dana-bold.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Dana';
  src: url('../assets/fonts/dana-black.woff') format('woff');
  font-weight: 900;
  font-display: swap;
}

/* ═══════════════ 3. VARIABLES ═══════════════ */
:root {
  /* Colors */
  --bg: #0a1310;
  --bg-glass: rgba(10, 19, 16, .78);
  --card: #101c18;
  --card-2: #16241f;
  --card-3: #0d1713;
  --card-hover: #1a2a24;

  --text: #e8f0ec;
  --text-2: #a8b6b0;
  --text-muted: #6d7d76;
  --muted: #6d7d76;
  --dim: #42544d;

  --border: rgba(255, 255, 255, .06);
  --border-2: rgba(255, 255, 255, .10);

  --accent: #10b981;
  --accent-2: #059669;
  --accent-soft: rgba(16, 185, 129, .11);
  --up: #10b981;
  --up-soft: rgba(16, 185, 129, .11);
  --down: #ef4444;
  --down-soft: rgba(239, 68, 68, .11);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, .11);
  --gold: #c8974a;
  --gold-soft: rgba(200, 151, 74, .12);

  /* Radius */
  --r-xs: 8px;
  --r-sm: 11px;
  --r: 13px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 999px;

  /* Easing */
  --ease: cubic-bezier(.25, 1, .5, 1);
  --ease-smooth: cubic-bezier(.4, 0, .2, 1);
  --ease-ios: cubic-bezier(.32, .72, 0, 1);
  --ease-native: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --ease-elastic: cubic-bezier(.68, -.4, .27, 1.4);
  --ease-soft: cubic-bezier(.4, .14, .3, 1);

  /* Duration */
  --dur-fast: .16s;
  --dur: .24s;
  --dur-slow: .4s;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, .12);
  --shadow: 0 3px 12px rgba(0, 0, 0, .18);
  --shadow-lg: 0 6px 24px rgba(0, 0, 0, .28);
  --shadow-xl: 0 14px 40px rgba(0, 0, 0, .38);

  /* Safe Areas */
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --safe-left: env(safe-area-inset-left, 0);
  --safe-right: env(safe-area-inset-right, 0);
}

body:not(.dark) {
  --bg: #f4f7f5;
  --bg-glass: rgba(244, 247, 245, .82);
  --card: #ffffff;
  --card-2: #eef3f0;
  --card-3: #e6ebe8;
  --card-hover: #f8faf9;
  --text: #0a1310;
  --text-2: #2a3a34;
  --text-muted: #5a6a63;
  --muted: #5a6a63;
  --dim: #8a9a93;
  --border: rgba(0, 0, 0, .07);
  --border-2: rgba(0, 0, 0, .11);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, .04);
  --shadow: 0 3px 12px rgba(0, 0, 0, .07);
  --shadow-lg: 0 6px 24px rgba(0, 0, 0, .11);
  --shadow-xl: 0 14px 40px rgba(0, 0, 0, .14);
}

/* ═══════════════ 4. KEYFRAMES ═══════════════ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate3d(0, -10px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes cardSlideIn {
  0% { opacity: 0; transform: translate3d(0, 14px, 0) scale(.97); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes pageEnter {
  0% { opacity: 0; transform: translate3d(0, 8px, 0) scale(.995); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes softPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.96); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes hdrTickerScroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: .6; }
}

@keyframes carCardEnter {
  0% { opacity: 0; transform: translate3d(0, 18px, 0) scale(.96); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .4); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

@keyframes skeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes fadeInScale {
  0% { opacity: 0; transform: scale(.96) translateY(6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slideInRight {
  0% { opacity: 0; transform: translateX(14px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes numberPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* ═══════════════ 5. SCROLLBAR ═══════════════ */
@media (min-width: 1024px) {
  ::-webkit-scrollbar { width: 5px; height: 5px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--border-2);
    border-radius: 3px;
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
}

.mobile-nav::-webkit-scrollbar,
.hdr-ticker::-webkit-scrollbar,
.scroll-row::-webkit-scrollbar,
.chips::-webkit-scrollbar,
.pills::-webkit-scrollbar,
.tools-horizontal::-webkit-scrollbar,
.live-strip::-webkit-scrollbar {
  display: none !important;
}
.mobile-nav, .hdr-ticker, .scroll-row, .chips, .pills,
.tools-horizontal, .live-strip {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* ═══════════════ 6. LAYOUT ═══════════════ */
.app {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease-ios), visibility .3s;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
body.sidebar-open .backdrop { opacity: 1; visibility: visible; }

/* ═══════════════ 7. SIDEBAR ═══════════════ */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 260px;
  z-index: 50;
  background: var(--card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .38s var(--ease-ios);
  overflow-y: auto;
  box-shadow: -8px 0 32px rgba(0, 0, 0, .25);
}
body.sidebar-open .sidebar { transform: translateX(0); }

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  padding-top: calc(14px + var(--safe-top));
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-head img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  padding: 6px;
}
.sidebar-head strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}
.sidebar-head small {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
}
.nav-group {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 12px 10px 4px;
  opacity: .7;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  text-align: right;
  transition:
    background var(--dur-fast) var(--ease-ios),
    color var(--dur-fast) var(--ease-ios),
    transform var(--dur-fast) var(--ease-spring);
}
.nav-link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke-width: 1.75;
}
.nav-link:active {
  background: var(--card-2);
  transform: scale(.98);
}
.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar-foot {
  padding: 10px 14px;
  padding-bottom: calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.foot-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-2);
  font-weight: 600;
}
.foot-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up);
  animation: dotPulse 2.4s var(--ease-soft) infinite;
}
.sidebar-foot small {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  color: var(--text-muted);
}

/* ═══════════════ 8. MAIN ═══════════════ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

/* ═══════════════ 9. APP HEADER ═══════════════ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 56px;
  padding: 0 12px;
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-glass);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.hdr-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast) var(--ease-ios);
}
.hdr-btn:active {
  transform: scale(.9);
  background: var(--card-2);
}
.hdr-btn svg { width: 17px; height: 17px; stroke-width: 2; }
.hdr-btn[data-loading="1"] svg { animation: spin 1s linear infinite; }

/* ─── SEARCH ─── */
.hdr-search-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.hdr-search {
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  display: flex;
  align-items: center;
  gap: 8px;
  transition:
    border-color var(--dur) var(--ease-ios),
    box-shadow var(--dur) var(--ease-ios);
  overflow: hidden;
}
.hdr-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hdr-search-icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hdr-search-icon svg { width: 100%; height: 100%; stroke-width: 2; }
.hdr-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 12.5px;
  outline: none;
}
.hdr-search input::placeholder {
  color: var(--text-muted);
  opacity: .7;
}

/* ─── SEARCH DROPDOWN ─── */
.hdr-search-results {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 55vh;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
  padding: 5px;
  animation: fadeInDown .2s var(--ease-ios);
}
.hdr-search-results[hidden] { display: none; }
.hdr-search-results .ms-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-ios);
}
.hdr-search-results .ms-item:active { background: var(--card-2); }
.hdr-search-results .ms-item-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--card-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hdr-search-results .ms-item-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 5px;
}
.hdr-search-results .ms-item-icon svg {
  width: 16px; height: 16px;
  stroke-width: 2;
  color: var(--accent);
}
.hdr-search-results .ms-item-info { flex: 1; min-width: 0; }
.hdr-search-results .ms-item-info strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hdr-search-results .ms-item-info small {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}
.hdr-search-results .ms-item-price {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  direction: ltr;
  white-space: nowrap;
}
.hdr-search-results .ms-empty {
  padding: 20px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.ms-section-title {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 9px 12px 3px;
  margin-top: 3px;
  border-top: 1px solid var(--border);
}
.ms-section-title:first-child { border-top: 0; margin-top: 0; }

/* ═══════════════ 10. HEADER TICKER ═══════════════ */
.hdr-ticker {
  height: 30px;
  overflow: hidden;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.hdr-ticker-track {
  display: inline-flex;
  gap: 26px;
  padding: 0 12px;
  width: max-content;
  animation: hdrTickerScroll 120s linear infinite;
  white-space: nowrap;
  will-change: transform;
  backface-visibility: hidden;
}
.hdr-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.hdr-ticker-item .name {
  color: var(--text-muted);
  font-weight: 600;
}
.hdr-ticker-item .price {
  color: var(--text);
  font-weight: 800;
  direction: ltr;
}
.hdr-ticker-item .chg {
  font-size: 9.5px;
  font-weight: 800;
  direction: ltr;
  padding: 2px 5px;
  border-radius: 4px;
}
.hdr-ticker-item .chg.up { background: var(--up-soft); color: var(--up); }
.hdr-ticker-item .chg.down { background: var(--down-soft); color: var(--down); }

/* ═══════════════ 11. CONTENT ═══════════════ */
.content {
  flex: 1;
  padding: 12px 12px 90px;
  max-width: 100%;
  overflow-x: hidden;
  width: 100%;
  min-width: 0;
  padding-top: 12px;
  padding-left: max(12px, var(--safe-left));
  padding-right: max(12px, var(--safe-right));
  padding-bottom: calc(94px + var(--safe-bottom));
}

.page {
  display: none;
  width: 100%;
  min-width: 0;
}
.page.is-active {
  display: block;
  animation: pageEnter .38s var(--ease-ios) both;
}

/* ═══════════════ 12. SECTION HEAD ═══════════════ */
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 10px;
}
.sec-head:first-child { margin-top: 4px; }
.sec-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.15px;
}
.sec-title svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  stroke-width: 2;
}
.sec-head .link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  background: transparent;
  border: 0;
  padding: 4px 7px;
  border-radius: 8px;
  transition:
    background var(--dur-fast) var(--ease-ios),
    transform var(--dur-fast) var(--ease-spring);
}
.sec-head .link:active {
  background: var(--accent-soft);
  transform: scale(.96);
}
.sec-head .link svg { width: 12px; height: 12px; stroke-width: 2.5; }
.sec-head .muted {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ═══════════════ 13. SCROLL ROW ═══════════════ */
.scroll-wrap {
  margin: 0 -12px;
  padding: 0 12px;
  overflow: hidden;
}
.scroll-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding: 3px 0 10px;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════
   14. HERO BANNER — فقط تصویر (بدون overlay و متن)
═══════════════════════════════════════════════════════════ */
.hero-banner {
  position: relative;
  margin: 2px 0 14px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 1;
  animation: cardSlideIn .5s var(--ease-ios) both;
  width: 100%;
  box-shadow: var(--shadow-sm);
  isolation: isolate;
}
.hero-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transition: transform .5s var(--ease-ios);
}
.hero-banner:active img { transform: scale(1.02); }
/* ═══════════════════════════════════════════════════════════
   15. LIVE STRIP — نوار قیمت‌های زنده
═══════════════════════════════════════════════════════════ */
.live-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 -12px 14px;
  padding: 3px 12px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
}
.live-strip::-webkit-scrollbar { display: none; }

.live-strip-card {
  flex: 0 0 auto;
  min-width: 152px;
  padding: 12px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  scroll-snap-align: start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast) var(--ease-ios),
    border-color var(--dur-fast) var(--ease-ios);
  animation: cardSlideIn .4s var(--ease-ios) backwards;
  touch-action: manipulation;
}
.live-strip-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-ios);
}
.live-strip-card:active {
  transform: scale(.97);
  background: var(--card-2);
  border-color: var(--accent);
}
.live-strip-card.is-up::before { background: var(--up); opacity: 1; }
.live-strip-card.is-down::before { background: var(--down); opacity: 1; }

.live-strip-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-strip-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--card-2);
}
.live-strip-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.live-strip-icon svg { width: 15px; height: 15px; stroke-width: 2; }

.live-strip-info { flex: 1; min-width: 0; }
.live-strip-info strong {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-strip-info small {
  display: block;
  font-size: 9.5px;
  color: var(--text-muted);
  font-weight: 600;
  direction: ltr;
  text-align: right;
}

.live-strip-price {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-strip-change {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 7px;
  border-radius: 7px;
  font-size: 9.5px;
  font-weight: 800;
  direction: ltr;
  align-self: flex-start;
  font-variant-numeric: tabular-nums;
}
.live-strip-change.up { background: var(--up-soft); color: var(--up); }
.live-strip-change.down { background: var(--down-soft); color: var(--down); }
.live-strip-change.muted { background: rgba(109, 125, 118, .13); color: var(--muted); }

.live-strip-spark {
  width: 100%;
  height: 26px;
  margin-top: -2px;
}
.live-strip-spark canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ═══════════════ 16. BANK CARD ═══════════════ */
.portfolio-card-wrap { margin-bottom: 3px; }

.bank-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1.65 / 1;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #065f46 100%);
  box-shadow:
    0 10px 30px rgba(16, 185, 129, .22),
    0 3px 10px rgba(0, 0, 0, .25),
    inset 0 1px 0 rgba(255, 255, 255, .15);
  transition:
    transform var(--dur) var(--ease-spring),
    box-shadow var(--dur) var(--ease-ios);
  cursor: pointer;
  isolation: isolate;
  animation: cardSlideIn .5s var(--ease-ios) both;
}
.bank-card:active {
  transform: scale(.985);
}
.bank-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.16), transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(0,0,0,.14), transparent 50%);
  z-index: 0;
  pointer-events: none;
}
.bank-card-top, .bank-card-center, .bank-card-bottom {
  position: relative;
  z-index: 1;
}
.bank-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.bank-card-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.bank-card-brand img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .18);
  padding: 5px;
  backdrop-filter: blur(10px);
}
.bank-card-brand-text strong {
  display: block;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
}
.bank-card-brand-text small {
  display: block;
  font-size: 9.5px;
  color: rgba(255, 255, 255, .72);
}
.bank-card-chip {
  width: 28px;
  height: 20px;
  border-radius: 5px;
  background: linear-gradient(135deg, #f5d76e, #c9a227);
  position: relative;
}
.bank-card-center { text-align: center; }
.bank-card-label {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, .68);
  margin-bottom: 3px;
  letter-spacing: .5px;
}
.bank-card-value {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  direction: ltr;
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.bank-card-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 5px;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
  font-size: 10.5px;
  font-weight: 800;
  direction: ltr;
  color: #fff;
}
.bank-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.bank-card-user {
  display: flex;
  align-items: center;
  gap: 9px;
}
.bank-card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, .3);
}
.bank-card-user-info strong {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}
.bank-card-user-info small {
  display: block;
  font-size: 9.5px;
  color: rgba(255, 255, 255, .7);
}
.bank-card-add {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .2);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, .25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-fast) var(--ease-spring);
  flex-shrink: 0;
}
.bank-card-add:active { transform: scale(.88); }
.bank-card-add svg { width: 16px; height: 16px; stroke-width: 2.5; }
.bank-card.is-empty {
  background: linear-gradient(135deg, #2a3a34 0%, #1a2a25 50%, #0f1a16 100%);
}
.bank-card.is-empty .bank-card-value { color: rgba(255, 255, 255, .55); }
.bank-card.is-empty .bank-card-chip { opacity: .35; }

/* ═══════════════ 17. MARKET CARD ═══════════════ */
.m-card {
  flex: 0 0 auto;
  width: 152px;
  padding: 11px;
  border-radius: 15px;
  background: var(--card);
  border: 1px solid var(--border);
  scroll-snap-align: start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 128px;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast) var(--ease-ios),
    box-shadow var(--dur-fast) var(--ease-ios);
  animation: cardSlideIn .4s var(--ease-ios) backwards;
  will-change: transform;
  touch-action: manipulation;
}
.m-card:active {
  transform: scale(.965);
  background: var(--card-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.m-card-empty { opacity: .55; cursor: not-allowed; }
.m-card-empty:active { transform: none; }

.m-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.m-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--card-2);
}
.m-card-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 5px;
}
.m-card-icon svg { width: 16px; height: 16px; stroke-width: 2; }
.m-card-icon.gold { background: rgba(229, 185, 110, .13); color: #c8974a; }
.m-card-icon.blue { background: rgba(91, 157, 217, .11); color: #3d7eb8; }
.m-card-icon.purple { background: rgba(155, 125, 219, .11); color: #7558b8; }
.m-card-icon.orange { background: rgba(232, 165, 92, .11); color: #c87c3a; }
.m-card-icon.green { background: rgba(16, 162, 110, .11); color: #10a26e; }
.m-card-icon.cyan { background: rgba(221, 126, 161, .11); color: #b85c7e; }

.m-card-info { flex: 1; min-width: 0; }
.m-card-info strong {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.1px;
}
.m-card-info small {
  display: block;
  font-size: 9.5px;
  color: var(--text-muted);
  font-weight: 600;
  direction: ltr;
  text-align: right;
}
.m-card-price {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--text);
  direction: ltr;
  text-align: right;
  letter-spacing: -.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.m-card-change {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 7px;
  border-radius: 7px;
  font-size: 9.5px;
  font-weight: 800;
  direction: ltr;
  align-self: flex-start;
  font-variant-numeric: tabular-nums;
}
.m-card-change.up { background: var(--up-soft); color: var(--up); }
.m-card-change.down { background: var(--down-soft); color: var(--down); }
.m-card-change.muted { background: rgba(109, 125, 118, .13); color: var(--muted); }

/* ═══ Sparkline حرفه‌ای روی کارت بازار ═══ */
.m-card-spark {
  width: 100%;
  height: 34px;
  margin-top: -1px;
  border-radius: 7px;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, .015);
}
.m-card-spark canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ✅ بج تغییرات با آیکون بهتر */
.m-card-change {
  font-weight: 900;
  letter-spacing: .2px;
}
.m-card-change.up { box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .15); }
.m-card-change.down { box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .15); }

.m-card:nth-child(1) { animation-delay: .02s; }
.m-card:nth-child(2) { animation-delay: .04s; }
.m-card:nth-child(3) { animation-delay: .06s; }
.m-card:nth-child(4) { animation-delay: .08s; }
.m-card:nth-child(5) { animation-delay: .10s; }
.m-card:nth-child(6) { animation-delay: .12s; }

/* ═══ Skeleton loader ═══ */
.m-card-skeleton {
  width: 100%;
  min-height: 128px;
  border-radius: 15px;
  background: linear-gradient(
    90deg,
    var(--card) 0%,
    var(--card-2) 50%,
    var(--card) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border: 1px solid var(--border);
}

.m-card.loaded {
  animation: fadeInScale .45s var(--ease-ios) both;
}

.m-card-price.updated,
.live-strip-price.updated {
  animation: numberPop .35s var(--ease-spring);
}

/* ═══════════════ 18. CATEGORIES ═══════════════ */
.cat-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 82px;
  padding: 10px 8px;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  scroll-snap-align: start;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast) var(--ease-ios);
  touch-action: manipulation;
}
.cat-chip:active { transform: scale(.94); }
.cat-chip-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-fast) var(--ease-spring);
}
.cat-chip:active .cat-chip-icon { transform: scale(.9); }
.cat-chip-icon svg { width: 16px; height: 16px; stroke-width: 2; }
.cat-chip small { font-size: 9px; color: var(--text-muted); }

/* ═══════════════ 19. TOOLS HORIZONTAL ═══════════════ */
.tools-horizontal {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 0 10px;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  width: auto;
}
.tools-horizontal .tool-chip {
  flex: 0 0 auto;
  min-width: 82px;
  scroll-snap-align: start;
}

.tool-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 11px 7px;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast) var(--ease-ios);
  animation: cardSlideIn .4s var(--ease-ios) backwards;
  touch-action: manipulation;
}
.tool-chip:active {
  transform: scale(.93);
  background: var(--card-2);
}
.tool-chip-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-fast) var(--ease-spring);
}
.tool-chip:active .tool-chip-icon { transform: scale(.9); }
.tool-chip-icon svg { width: 17px; height: 17px; stroke-width: 1.75; }
.tool-chip-name {
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ═══════════════ 20. BANNERS ═══════════════ */
.banner-hero {
  margin: 12px 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  position: relative;
  aspect-ratio: 4 / 1;
  animation: cardSlideIn .4s var(--ease-ios) backwards;
  width: 100%;
  box-shadow: var(--shadow-sm);
}
.banner-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transition: transform .5s var(--ease-ios);
}
.banner-hero:active img { transform: scale(1.02); }

/* ═══════════════ 21. PANEL ═══════════════ */
.panel {
  padding: 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.panel canvas {
  display: block;
  width: 100%;
  height: 200px;
}

/* ═══════════════ 22. PILLS ═══════════════ */
.pills {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--card-2);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}
.pills button {
  padding: 5px 11px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transition:
    background var(--dur-fast) var(--ease-ios),
    color var(--dur-fast) var(--ease-ios),
    transform var(--dur-fast) var(--ease-spring);
}
.pills button:active { transform: scale(.94); }
.pills button.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, .22);
}

/* ═══════════════ 23. CHIPS ═══════════════ */
.chips {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 3px 0 8px;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
}
.chip {
  flex: 0 0 auto;
  padding: 6px 13px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast) var(--ease-ios),
    color var(--dur-fast) var(--ease-ios),
    box-shadow var(--dur-fast) var(--ease-ios);
  touch-action: manipulation;
}
.chip:active { transform: scale(.94); }
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 3px 10px rgba(16, 185, 129, .22);
}

/* ═══════════════ 24. GRID ASSETS ═══════════════ */
.grid-assets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.grid-assets .m-card {
  width: 100%;
  min-width: 0;
  min-height: 128px;
}

/* ═══ حالت ردیفی (List View) ═══ */
.grid-assets.view-list {
  grid-template-columns: 1fr;
  gap: 6px;
}
.grid-assets.view-list .m-card {
  width: 100%;
  min-height: auto;
  flex-direction: row;
  align-items: center;
  padding: 10px 12px;
  gap: 10px;
}
.grid-assets.view-list .m-card-head {
  flex: 0 0 auto;
  min-width: 0;
}
.grid-assets.view-list .m-card-head .icon-btn {
  display: none;
}
.grid-assets.view-list .m-card-info { flex: 0 0 auto; min-width: 90px; }
.grid-assets.view-list .m-card-price {
  flex: 1;
  text-align: end;
  font-size: 13.5px;
  margin: 0;
}
.grid-assets.view-list .m-card-change {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
}
.grid-assets.view-list .m-card-spark {
  flex: 0 0 90px;
  width: 90px;
  height: 28px;
  margin: 0;
}

/* ═══════════════ 25. UNIT TOGGLE ═══════════════ */
.unit-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--card-2);
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.unit-toggle button {
  padding: 5px 12px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  transition:
    background var(--dur-fast) var(--ease-ios),
    color var(--dur-fast) var(--ease-ios);
}
.unit-toggle button.is-active {
  background: var(--accent);
  color: #fff;
}

/* ═══════════════ 26. SETTINGS ═══════════════ */
.set-card {
  padding: 14px;
  border-radius: 15px;
  background: var(--card);
  border: 1px solid var(--border);
  margin-bottom: 11px;
  animation: cardSlideIn .4s var(--ease-ios) backwards;
  box-shadow: var(--shadow-sm);
}
.set-card h3 {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 11px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.set-row:last-child { border-bottom: 0; padding-bottom: 0; }
.set-row > div:first-child { flex: 1; min-width: 0; }
.set-row span {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.set-row small {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
}
.switch {
  width: 42px;
  height: 26px;
  border-radius: 13px;
  background: var(--card-2);
  border: 1px solid var(--border);
  position: relative;
  padding: 0;
  transition: background var(--dur) var(--ease-ios);
  flex-shrink: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all var(--dur) var(--ease-spring);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}
.switch.is-on {
  background: var(--accent);
  border-color: var(--accent);
}
.switch.is-on::after {
  left: 18px;
  background: #fff;
}

/* ═══════════════ 27. EMPTY ═══════════════ */
.empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  animation: fadeInUp .5s var(--ease-ios);
}
.empty h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 5px;
}
.empty p { font-size: 11.5px; }

/* ═══════════════ 28. BUTTONS ═══════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 16px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast) var(--ease-ios),
    box-shadow var(--dur-fast) var(--ease-ios);
}
.btn svg { width: 15px; height: 15px; stroke-width: 2; }
.btn:active { transform: scale(.96); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 3px 10px rgba(16, 185, 129, .25);
}
.btn-ghost {
  background: var(--card);
  color: var(--text-2);
  border-color: var(--border);
}
.btn-secondary {
  background: var(--card-2);
  color: var(--text);
  border-color: var(--border);
}
.btn-danger {
  background: var(--down-soft);
  color: var(--down);
}
.btn-block { width: 100%; margin-top: 10px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 8px;
  transition: transform var(--dur-fast) var(--ease-spring);
}
.icon-btn:active { transform: scale(.88); }
.icon-btn svg { width: 100%; height: 100%; stroke-width: 1.75; }

/* ═══════════════ 29. FORMS ═══════════════ */
.input, .textarea, .select {
  width: 100%;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  font-size: 12.5px;
  transition:
    border-color var(--dur) var(--ease-ios),
    box-shadow var(--dur) var(--ease-ios);
  -webkit-appearance: none;
  appearance: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}
.input::placeholder, .textarea::placeholder {
  color: var(--text-muted);
  opacity: .7;
}
.textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.7;
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236d7d76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 11px center;
  padding-left: 32px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 9px;
}
.form-group { margin-bottom: 9px; }
.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 5px;
}

/* ═══════════════ 30. RESULT BOX ═══════════════ */
.result-box {
  padding: 12px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--border);
  margin-top: 10px;
}
.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 12.5px;
}
.result-row:last-child { border-bottom: 0; }
.result-row span { color: var(--text-muted); font-size: 11.5px; }
.result-row strong { color: var(--text); font-weight: 800; direction: ltr; }
.result-row.result-total {
  border-top: 1.5px solid var(--accent);
  border-bottom: 0;
  margin-top: 5px;
  padding-top: 11px;
  font-size: 13px;
}
.result-row.result-total span { color: var(--text); font-weight: 800; }
.result-row.result-total strong { color: var(--accent); font-size: 14px; }

/* ═══════════════ 31. MODAL ═══════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease-ios), visibility .3s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .48);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: min(88dvh, 740px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: translateY(26px) scale(.985);
  transition: transform .4s var(--ease-ios);
  padding-bottom: var(--safe-bottom);
}
.modal.is-open .modal-sheet {
  transform: translateY(0) scale(1);
}
.modal-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.modal-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.modal-title svg { width: 17px; height: 17px; color: var(--accent); stroke-width: 2; }
.modal-head .icon-btn {
  width: 30px;
  height: 30px;
  font-size: 20px;
  color: var(--text-muted);
}
.modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

/* ═══════════════ 32. TOAST ═══════════════ */
.toast {
  position: fixed;
  bottom: calc(82px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(18px);
  z-index: 500;
  padding: 10px 18px;
  border-radius: var(--r-full);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all .35s var(--ease-ios);
  max-width: calc(100% - 36px);
  text-align: center;
  backdrop-filter: blur(20px);
}
.toast.is-show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.toast.success { background: var(--up); color: #fff; border-color: transparent; }
.toast.error { background: var(--down); color: #fff; border-color: transparent; }
.toast.warning { background: var(--warn); color: #fff; border-color: transparent; }

/* ═══════════════ 33. MOBILE NAV ═══════════════ */
.mobile-nav {
  position: fixed;
  bottom: max(8px, var(--safe-bottom));
  left: max(10px, var(--safe-left));
  right: max(10px, var(--safe-right));
  z-index: 25;
  height: 60px;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: var(--shadow-xl);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
.mnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 4px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 700;
  border-radius: 15px;
  transition:
    color var(--dur-fast) var(--ease-ios),
    background var(--dur-fast) var(--ease-ios),
    transform var(--dur-fast) var(--ease-spring);
}
.mnav-btn svg { width: 19px; height: 19px; stroke-width: 1.75; }
.mnav-btn.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}
.mnav-btn:active { transform: scale(.9); }

/* ═══════════════════════════════════════════════════════════
   34. CHART HEADER
═══════════════════════════════════════════════════════════ */
.chart-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 15px;
  background: var(--card);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  animation: cardSlideIn .4s var(--ease-ios) backwards;
  box-shadow: var(--shadow-sm);
}
.chart-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--card-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.chart-header-icon img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.chart-header-icon svg { width: 22px; height: 22px; stroke-width: 2; color: var(--accent); }
.chart-header-info { flex: 1; min-width: 0; }
.chart-header-info strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-header-info small {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  direction: ltr;
  text-align: right;
}
.chart-fav {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--card-2);
  border: 1px solid var(--border);
  color: var(--dim);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    color var(--dur-fast) var(--ease-ios);
  flex-shrink: 0;
  padding: 0;
}
.chart-fav:active { transform: scale(.88); }
.chart-fav.is-fav {
  color: var(--warn);
  background: var(--warn-soft);
  border-color: rgba(245, 158, 11, .25);
}
.chart-fav svg { width: 19px; height: 19px; stroke-width: 2; }

/* ═══════════════════════════════════════════════════════════
   35. CHART MAIN
═══════════════════════════════════════════════════════════ */
.chart-main {
  padding: 22px 16px 18px;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--card-2) 0%, var(--card) 100%);
  border: 1px solid var(--border);
  margin-bottom: 14px;
  text-align: center;
  animation: cardSlideIn .4s var(--ease-ios) backwards;
  animation-delay: .04s;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, .12),
    inset 0 1px 0 rgba(255, 255, 255, .03);
}
.chart-main::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, .4), transparent);
  opacity: .6;
}
.chart-price {
  font-size: 30px;
  font-weight: 900;
  color: var(--text);
  direction: ltr;
  letter-spacing: -.7px;
  margin-bottom: 8px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
  text-align: center;
  background: linear-gradient(180deg, var(--text) 0%, var(--text-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.chart-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  direction: ltr;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.chart-change.up { background: var(--up-soft); color: var(--up); }
.chart-change.down { background: var(--down-soft); color: var(--down); }
.chart-main-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 5px;
  flex-wrap: wrap;
}
.chart-main-meta span { display: inline-flex; align-items: center; }
.chart-main-meta span:empty { display: none; }

/* ═══════════════════════════════════════════════════════════
   36. CHART CANVAS
═══════════════════════════════════════════════════════════ */
.chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: clamp(200px, 55vw, 280px);
  min-height: 180px;
  padding: 8px 4px 4px;
  background:
    linear-gradient(180deg, rgba(16, 185, 129, .03) 0%, transparent 40%),
    transparent;
  border-radius: 12px;
  overflow: hidden;
}
.chart-canvas-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, var(--border) 1px, transparent 1px),
    linear-gradient(0deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
  opacity: .35;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 90%);
}
.chart-canvas-wrap canvas {
  position: relative;
  z-index: 1;
  cursor: crosshair;
  touch-action: pan-y;
  max-width: 100%;
}

/* ─── Tooltip نمودار ─── */
.chart-tooltip {
  position: fixed;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(10, 19, 16, .97);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s var(--ease-ios);
  z-index: 10000;
  direction: rtl;
  white-space: nowrap;
  border: 1px solid rgba(16, 185, 129, .4);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, .5),
    0 0 0 4px rgba(16, 185, 129, .06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-variant-numeric: tabular-nums;
}

/* ─── Crosshair نمودار ─── */
.chart-crosshair {
  position: fixed;
  width: 1.5px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(16, 185, 129, .5) 15%,
    #10b981 50%,
    rgba(16, 185, 129, .5) 85%,
    transparent 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s var(--ease-ios);
  z-index: 9999;
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, .5));
}

/* ═══════════════════════════════════════════════════════════
   37. CHART QUESTIONS
═══════════════════════════════════════════════════════════ */
.chart-questions-full {
  margin: 16px 0;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--card) 0%, var(--card-3) 100%);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: cardSlideIn .4s var(--ease-ios) backwards;
  animation-delay: .08s;
  width: 100%;
  min-width: 0;
}
.chart-q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, .12), transparent);
  border-bottom: 1px solid var(--border);
}
.chart-q-title {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-q-title svg { width: 18px; height: 18px; stroke-width: 2; color: var(--accent); }
.chart-q-date {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--card-2);
  padding: 3px 9px;
  border-radius: 7px;
}
.chart-q-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chart-q-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card-2);
  border: 1px solid var(--border);
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast) var(--ease-ios);
  animation: fadeInUp .4s var(--ease-ios) backwards;
}
.chart-q-item:active {
  transform: scale(.98);
  background: var(--card);
}
.chart-q-body { flex: 1; min-width: 0; }
.chart-q-question {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  font-weight: 600;
  line-height: 1.7;
  margin-bottom: 7px;
}
.chart-q-answer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  direction: ltr;
  font-variant-numeric: tabular-nums;
  padding: 5px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .04);
}
.chart-q-answer.up {
  color: var(--up);
  background: var(--up-soft);
  border: 1px solid rgba(16, 185, 129, .18);
}
.chart-q-answer.down {
  color: var(--down);
  background: var(--down-soft);
  border: 1px solid rgba(239, 68, 68, .18);
}
.chart-q-answer.neutral {
  color: var(--text);
  background: rgba(255, 255, 255, .04);
}
.chart-q-date-tiny {
  display: block;
  font-size: 9.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 5px;
  direction: rtl;
  text-align: right;
}
.chart-q-warning {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  background: rgba(234, 179, 8, .09);
  border: 1px solid rgba(234, 179, 8, .25);
  border-radius: 10px;
  margin: 0 12px 10px;
  font-size: 11px;
  color: #eab308;
}

/* ═══════════════════════════════════════════════════════════
   38. BUBBLE ANALYSIS
═══════════════════════════════════════════════════════════ */
.bubble-analysis {
  margin: 14px 0;
  border-radius: 15px;
  background: linear-gradient(160deg, rgba(200, 151, 74, .07), var(--card));
  border: 1px solid rgba(200, 151, 74, .22);
  overflow: hidden;
  animation: cardSlideIn .4s var(--ease-ios) backwards;
  animation-delay: .12s;
  width: 100%;
  min-width: 0;
}
.bubble-analysis[hidden] { display: none; }
.bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(200, 151, 74, .1), transparent);
  border-bottom: 1px solid rgba(200, 151, 74, .18);
}
.bubble-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 7px;
}
.bubble-title svg { width: 17px; height: 17px; stroke-width: 2; color: var(--gold); }
.bubble-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.bubble-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .04);
}
.bubble-row span { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.bubble-row strong {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bubble-row.bubble-total {
  background: rgba(200, 151, 74, .1);
  border-color: rgba(200, 151, 74, .28);
  margin-top: 3px;
}
.bubble-row.bubble-total span { color: var(--text); font-weight: 800; }
.bubble-row.bubble-total strong { font-size: 14px; }
.bubble-positive { color: #ef4444 !important; }
.bubble-negative { color: #10b981 !important; }
.bubble-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 800;
  direction: ltr;
}
.bubble-badge.bubble-positive { background: rgba(239, 68, 68, .14); color: #ef4444; }
.bubble-badge.bubble-negative { background: rgba(16, 185, 129, .14); color: #10b981; }

/* ═══════════════ 39. COMPARE ═══════════════ */
.compare-pick {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 9px;
  align-items: center;
  margin-bottom: 14px;
}
.compare-pick .vs {
  font-size: 11px;
  font-weight: 900;
  color: var(--text-muted);
  padding: 0 3px;
}
.cmp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

/* ═══════════════ 40. VIEW TOGGLE ═══════════════ */
.view-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--card-2);
  border-radius: 11px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.view-toggle button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--dur-fast) var(--ease-ios),
    color var(--dur-fast) var(--ease-ios),
    transform var(--dur-fast) var(--ease-spring);
  padding: 0;
}
.view-toggle button:active { transform: scale(.88); }
.view-toggle button svg { width: 15px; height: 15px; stroke-width: 2; }
.view-toggle button.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, .25);
}

/* ═══════════════ 41. CARS ═══════════════ */
.cars-table-wrap {
  display: flex;
  flex-direction: column;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: cardSlideIn .4s var(--ease-ios) backwards;
}
.cars-table-full { max-height: none; }

/* ═══════════════ 42. CAR CARDS ═══════════════ */
.car-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast) var(--ease-ios),
    box-shadow var(--dur) var(--ease-ios);
  animation: carCardEnter .5s cubic-bezier(.22, 1, .36, 1) backwards;
  touch-action: manipulation;
}
.car-card:active {
  transform: scale(.97);
  background: var(--card-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.car-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 610 / 343;
  background: linear-gradient(135deg, var(--card-2), var(--card));
  overflow: hidden;
  display: block;
}
.car-card-image > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s var(--ease-ios);
}
.car-card:active .car-card-image > img:first-child {
  transform: scale(1.02);
}
.car-card-watermark {
  position: absolute !important;
  bottom: 9px !important;
  left: 9px !important;
  width: 38px !important;
  height: 38px !important;
  object-fit: contain !important;
  padding: 4px;
  background: rgba(10, 19, 16, .55);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 11px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: .92;
  pointer-events: none;
  z-index: 2;
}
.car-card-status {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 9.5px;
  font-weight: 900;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .22);
  z-index: 3;
  white-space: nowrap;
  color: #fff;
}
.car-card-status.success { background: linear-gradient(135deg, rgba(16, 185, 129, .95), rgba(5, 150, 105, .95)); }
.car-card-status.muted { background: linear-gradient(135deg, rgba(107, 114, 128, .92), rgba(75, 85, 99, .92)); }
.car-card-status.info { background: linear-gradient(135deg, rgba(59, 130, 246, .95), rgba(37, 99, 235, .95)); }
.car-card-status.danger { background: linear-gradient(135deg, rgba(239, 68, 68, .95), rgba(220, 38, 38, .95)); }

.car-card-body {
  padding: 11px 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.car-card-name {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.car-card-category {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.car-card-category::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .6;
}
.car-card-prices {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 9px;
  margin-top: 3px;
  position: relative;
}
.car-card-prices::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}
.car-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}
.car-price-label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.car-price-label svg { width: 12px; height: 12px; stroke-width: 2; opacity: .7; }
.car-price-value {
  font-size: 12.5px;
  font-weight: 900;
  color: var(--text);
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.car-price-value.factory { color: var(--text-2); font-weight: 800; }
.car-price-value.market { color: var(--accent); }
.car-card-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 900;
  direction: ltr;
  align-self: flex-start;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.car-card-change.up { background: var(--up-soft); color: var(--up); }
.car-card-change.down { background: var(--down-soft); color: var(--down); }
.car-card-empty {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 0 7px;
  font-style: italic;
  border-top: 1px dashed var(--border);
  margin-top: 3px;
}

[data-home-cars],
[data-cars-list] {
  display: grid;
  width: 100%;
  gap: 10px;
}
[data-home-cars] { grid-template-columns: repeat(2, 1fr); }
[data-cars-list] { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }

[data-home-cars] > .car-card:nth-child(1) { animation-delay: .04s; }
[data-home-cars] > .car-card:nth-child(2) { animation-delay: .08s; }
[data-home-cars] > .car-card:nth-child(3) { animation-delay: .12s; }
[data-home-cars] > .car-card:nth-child(4) { animation-delay: .16s; }

@media (min-width: 640px) {
  [data-home-cars] { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  [data-home-cars] { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  [data-cars-list] { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
}

/* ═══════════════ 43. CAR MODAL ═══════════════ */
.car-modal-image {
  position: relative;
  width: 100%;
  aspect-ratio: 610 / 343;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--card-2), var(--card));
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.car-modal-image img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.car-modal-watermark {
  position: absolute !important;
  bottom: 12px !important;
  left: 12px !important;
  width: 50px !important;
  height: 50px !important;
  object-fit: contain !important;
  padding: 5px;
  background: rgba(10, 19, 16, .65);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 3;
}
.car-modal-badge-floating {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 12px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 900;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .25);
  z-index: 4;
  color: #fff;
}
.car-modal-badge-floating.available { background: linear-gradient(135deg, rgba(16, 185, 129, .95), rgba(5, 150, 105, .95)); }
.car-modal-badge-floating.unavailable { background: linear-gradient(135deg, rgba(107, 114, 128, .92), rgba(75, 85, 99, .92)); }
.car-modal-badge-floating.coming-soon { background: linear-gradient(135deg, rgba(59, 130, 246, .95), rgba(37, 99, 235, .95)); }
.car-modal-badge-floating.discontinued,
.car-modal-badge-floating.not-selling { background: linear-gradient(135deg, rgba(239, 68, 68, .95), rgba(220, 38, 38, .95)); }

.car-modal-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.car-modal-badge-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.car-modal-badge {
  padding: 5px 12px;
  border-radius: 11px;
  font-size: 11.5px;
  font-weight: 800;
  background: var(--card-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.car-modal-badge.category {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(16, 185, 129, .22);
}
.car-modal-badge.title {
  background: var(--card-2);
  color: var(--text-2);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.car-modal-prices { display: flex; flex-direction: column; gap: 10px; }
.car-modal-price-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--card-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
}
.car-modal-price-card.market {
  background: linear-gradient(135deg, var(--accent-soft), rgba(16, 185, 129, .03));
  border-color: rgba(16, 185, 129, .25);
}
.car-modal-price-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.car-modal-price-value {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.3px;
}
.car-modal-price-card.market .car-modal-price-value { color: var(--accent); }
.car-modal-change {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 900;
  direction: ltr;
  align-self: flex-start;
  font-variant-numeric: tabular-nums;
}
.car-modal-change.up { background: var(--up-soft); color: var(--up); }
.car-modal-change.down { background: var(--down-soft); color: var(--down); }

.car-modal-section {
  margin-top: 12px;
  border-radius: 14px;
  background: var(--card-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.car-modal-section[open] { background: var(--card); }
.car-modal-section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease-ios);
}
.car-modal-section[open] .car-modal-section-head { border-bottom-color: var(--border); }
.car-modal-section-head::-webkit-details-marker { display: none; }
.car-modal-section-head:active { background: var(--card-2); }
.car-modal-section-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.car-modal-section-icon svg { width: 100%; height: 100%; stroke-width: 2; }
.car-modal-section-count {
  margin-inline-start: auto;
  padding: 2px 8px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 800;
}
.car-modal-section-head::after {
  content: '▾';
  font-size: 9px;
  color: var(--text-muted);
  transition: transform var(--dur) var(--ease-ios);
  margin-inline-start: 5px;
}
.car-modal-section[open] .car-modal-section-head::after { transform: rotate(180deg); }

.car-spec-grid { display: flex; flex-direction: column; padding: 7px; gap: 2px; }
.car-spec-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) 1.1fr;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  align-items: center;
}
.car-spec-row:nth-child(odd) { background: rgba(255, 255, 255, .02); }
.car-spec-label { font-size: 11.5px; color: var(--text-muted); font-weight: 600; line-height: 1.5; }
.car-spec-value { font-size: 12px; color: var(--text); font-weight: 700; line-height: 1.5; }

.car-features-list { display: flex; flex-direction: column; padding: 9px; gap: 9px; }
.car-feature-row {
  padding: 11px 13px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(16, 185, 129, .05), rgba(16, 185, 129, .01));
  border: 1px solid rgba(16, 185, 129, .12);
  position: relative;
}
.car-feature-row::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.car-feature-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.car-feature-title::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
}
.car-feature-value {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.7;
  font-weight: 500;
}

.car-description {
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.9;
}
.car-desc-paragraph { margin: 0 0 10px 0; }
.car-desc-paragraph:last-child { margin-bottom: 0; }

.car-modal-empty-details {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 20px 14px;
  margin-top: 12px;
  border-radius: 13px;
  background: var(--card-2);
  border: 1px dashed var(--border-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}
.car-modal-empty-details svg { width: 16px; height: 16px; stroke-width: 2; opacity: .6; }

/* ═══════════════ 44. RESPONSIVE ═══════════════ */
@media (min-width: 1024px) {
  .sidebar {
    position: sticky;
    top: 0;
    transform: translateX(0);
    height: 100vh;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .backdrop { display: none !important; }
  .mobile-nav { display: none; }
  .app-header [data-menu] { display: none; }
  .content {
    max-width: 960px;
    margin: 0 auto;
    padding: 22px 26px 40px;
  }
  .scroll-wrap { margin: 0; padding: 0; }
  .chips { margin: 0; padding: 3px 0 8px; }
  .tools-horizontal {
    margin: 0;
    padding: 3px 0 10px;
    width: auto;
  }
  .live-strip { margin: 0 0 14px; padding: 3px 0 10px; }
  .grid-assets { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 11px; }
  .bank-card { max-width: 480px; margin: 0 auto; }
  .banner-hero { max-width: 780px; margin-inline: auto; }
  .hero-banner { max-width: 780px; margin-inline: auto; }
}

@media (max-width: 480px) {
  .content { padding: 11px 11px calc(94px + var(--safe-bottom)); }
  .app-header { gap: 6px; padding-inline: 9px; }
  .hdr-btn { width: 36px; height: 36px; min-width: 36px; flex: 0 0 36px; border-radius: 11px; }
  .hdr-search { height: 36px; border-radius: 11px; padding-inline: 10px; }
  .hdr-search input { font-size: 12px; }
  .sec-head { margin-top: 17px; }
  .banner-hero { margin: 11px 0; border-radius: 14px; }
  .m-card { min-height: 122px; padding: 10px; }
  .m-card-price { font-size: 13px; }
  .m-card-spark { height: 30px; }
  .cat-chip { min-width: 78px; min-height: 80px; }
  .bank-card { min-height: 175px; border-radius: 18px; }
  .bank-card-value { font-size: clamp(19px, 6vw, 25px); }
  .mobile-nav {
    left: 8px;
    right: 8px;
    bottom: max(7px, var(--safe-bottom));
    height: 58px;
    border-radius: 19px;
  }
  .mnav-btn { font-size: 9px; min-height: 48px; }
  .hero-banner { aspect-ratio: 16 / 10; border-radius: 16px; }
  .live-strip { margin-inline: -11px; padding-inline: 11px; }
  .live-strip-card { min-width: 142px; padding: 11px; }
  .live-strip-price { font-size: 13px; }
  .grid-assets { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
  .grid-assets.view-list .m-card-spark { flex: 0 0 70px; width: 70px; height: 24px; }
}

@media (max-width: 380px) {
  .content { padding-inline: 9px; }
  .scroll-wrap, .tools-horizontal, .live-strip {
    width: calc(100% + 18px);
    margin-inline: -9px;
    padding-inline: 9px;
  }
  .app-header { height: calc(52px + var(--safe-top)); padding-inline: 7px; }
  .hdr-btn { width: 34px; height: 34px; min-width: 34px; flex: 0 0 34px; border-radius: 10px; }
  .hdr-search { height: 34px; border-radius: 10px; }
  .mobile-nav { left: 5px; right: 5px; }
  .grid-assets { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════ 45. UTILITY ═══════════════ */
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--text-muted); }
[hidden] { display: none !important; }

/* ═══════════════ 46. REDUCED MOTION ═══════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════ 47. FORM ERROR ═══════════════ */
.field-error {
  color: var(--down);
  font-size: 10.5px;
  margin-top: 3px;
  display: block;
}
.input.is-error { border-color: var(--down); }

/* ═══════════════ 48. SCROLL SMOOTHING ═══════════════ */
.scroll-row, .chips, .pills, .tools-horizontal, .hdr-ticker,
.live-strip {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

/* ═══════════════ 49. FOCUS VISIBLE ═══════════════ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}