/* ============================================================================
   economy_scene.css — صحنهٔ تمام‌صفحهٔ «اقتصاد ملی» (نسخهٔ تصویری)
   ----------------------------------------------------------------------------
   جایگزین نمای فهرست/کیبوردی اقتصاد با یک رابط بازی‌گونه: خزانهٔ زنده، کارت‌های
   تصویری منابع، پروژه‌های عمرانی و پنل بازار. رنگ‌ها همان توکن‌های تم فعلی‌اند.
   ============================================================================ */

#eco-overlay {
  position: fixed; inset: 0; z-index: 9990;
  display: flex; flex-direction: column;
  background:
    radial-gradient(circle at 88% -12%, rgba(99, 182, 200, .16), transparent 30rem),
    #0b121b;
  color: var(--text, #edf5f7);
  animation: eco-in .22s ease-out;
}
@keyframes eco-in { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

#eco-overlay .eco-head {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  border-bottom: 1px solid var(--gs-line, rgba(183, 205, 220, .16));
  background: linear-gradient(180deg, #12202c, #0d1a24);
}
#eco-overlay .eco-head__txt { flex: 1; min-width: 0; }
#eco-overlay .eco-head h2 { margin: 0; font-size: 15px; }
#eco-overlay .eco-head small { display: block; margin-top: 2px; font-size: 10px; color: var(--muted, #91a6b2); }
.eco-back, .eco-refresh {
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 10px; border: 1px solid var(--gs-line, rgba(183, 205, 220, .16));
  background: #182836; color: #d8e4ea; display: grid; place-items: center; font-size: 16px;
}
.eco-back:active, .eco-refresh:active { transform: scale(.94); }

.eco-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 14px calc(26px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px;
}

/* ------------------------------------------------------------------- خزانه */
.eco-hero {
  position: relative; overflow: hidden;
  border-radius: 16px; border: 1px solid var(--gs-line, rgba(183, 205, 220, .16));
  min-height: 138px; padding: 16px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.eco-hero__art { position: absolute; inset: 0; background: url('/assets/img/equipment_a.webp') center/cover; opacity: .3; }
.eco-hero__veil { position: absolute; inset: 0; background: linear-gradient(150deg, rgba(11, 18, 27, .35), rgba(11, 18, 27, .95)); }
.eco-hero__body { position: relative; z-index: 2; }
.eco-hero__k { font-size: 10px; color: var(--muted, #91a6b2); }
.eco-hero__v { font-size: 27px; font-weight: 800; color: var(--gs-gold, #e5bd67); line-height: 1.35; }
.eco-hero__v small { font-size: 12px; font-weight: 500; color: var(--muted, #91a6b2); margin-inline-start: 4px; }
.eco-hero__row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.eco-mini { font-size: 10px; color: var(--muted, #91a6b2); }
.eco-mini b { display: block; margin-top: 2px; font-size: 13px; color: var(--text, #edf5f7); }

/* ------------------------------------------------------------------- تب‌ها */
.eco-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px;
  border: 1px solid var(--gs-line, rgba(183, 205, 220, .16));
  border-radius: 14px; background: #0f1c26;
}
.eco-tabs button {
  min-height: 36px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted, #91a6b2); font-size: 12px; font-weight: 600;
}
.eco-tabs button.active { background: #1d2f3d; color: var(--gs-gold, #e5bd67); }

/* ---------------------------------------------------------------- کارت‌ها */
.eco-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.eco-card {
  position: relative; overflow: hidden; text-align: right;
  border: 1px solid var(--gs-line, rgba(183, 205, 220, .16));
  border-radius: 14px; background: linear-gradient(160deg, #16283a, #101d29);
  padding: 12px; min-height: 114px;
  display: flex; flex-direction: column; gap: 6px;
  color: var(--text, #edf5f7);
  animation: eco-rise .42s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes eco-rise { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }
.eco-card:active { transform: scale(.975); }
.eco-card__mark { position: absolute; inset-inline-end: -8px; bottom: -14px; font-size: 58px; opacity: .1; }
.eco-card__name { position: relative; font-size: 12px; font-weight: 700; }
.eco-card__amt { position: relative; font-size: 19px; font-weight: 800; color: var(--gs-cyan, #63b6c8); }
.eco-card__amt small { font-size: 10px; font-weight: 500; color: var(--muted, #91a6b2); margin-inline-start: 3px; }
.eco-card__foot {
  position: relative; margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: 10px; color: var(--muted, #91a6b2);
}
.eco-tier { font-size: 9px; padding: 2px 7px; border-radius: 20px; border: 1px solid var(--gs-line, rgba(183, 205, 220, .16)); color: var(--gs-gold, #e5bd67); }
.eco-lvl { position: relative; height: 5px; border-radius: 5px; background: rgba(183, 205, 220, .14); overflow: hidden; }
.eco-lvl i { display: block; height: 100%; background: linear-gradient(90deg, var(--gs-cyan, #63b6c8), var(--gs-gold, #e5bd67)); }

/* --------------------------------------------------------------- شیت فروش */
.eco-sheet-backdrop { position: fixed; inset: 0; z-index: 9994; background: #000a; }
.eco-sheet {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 9995;
  background: #111d2a; border-top: 1px solid var(--gs-line, rgba(183, 205, 220, .16));
  border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -18px 50px #0009;
  animation: eco-sheet .25s ease-out;
}
@keyframes eco-sheet { from { transform: translateY(100%) } to { transform: none } }
.eco-sheet__head { display: flex; align-items: center; gap: 10px; }
.eco-sheet__head b { flex: 1; font-size: 14px; }
.eco-sheet__close { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--gs-line, rgba(183, 205, 220, .16)); background: #182836; color: var(--text, #edf5f7); }
.eco-stepper { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; }
.eco-stepper button {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px;
  border: 1px solid var(--gs-line, rgba(183, 205, 220, .16)); background: #182836; color: var(--text, #edf5f7); font-size: 18px;
}
.eco-stepper button:active { transform: scale(.94); }
.eco-stepper input {
  flex: 1; min-width: 0; height: 44px; border-radius: 12px;
  border: 1px solid var(--gs-line, rgba(183, 205, 220, .16));
  background: #0f1c26; color: var(--text, #edf5f7); text-align: center; font-size: 15px;
}
.eco-quick { display: flex; gap: 7px; margin-bottom: 12px; }
.eco-quick button {
  flex: 1; min-height: 32px; border-radius: 10px; font-size: 11px;
  border: 1px solid var(--gs-line, rgba(183, 205, 220, .16)); background: #14212e; color: var(--muted, #91a6b2);
}
.eco-btn {
  width: 100%; min-height: 47px; border: 0; border-radius: 13px;
  background: linear-gradient(140deg, #e8cd96, #a37c41); color: #14202a;
  font-weight: 800; font-size: 13px;
}
.eco-btn:disabled { opacity: .55; }
.eco-btn--ghost { background: #182836; color: var(--text, #edf5f7); border: 1px solid var(--gs-line, rgba(183, 205, 220, .16)); font-weight: 600; }
.eco-note { font-size: 10px; line-height: 1.9; color: var(--muted, #91a6b2); margin: 8px 0 0; }

/* -------------------------------------------------------------- پیام و بار */
.eco-toast {
  position: fixed; inset-inline: 14px; bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 9999; padding: 11px 14px; border-radius: 13px; text-align: center;
  background: #17342a; color: #dff5e6; border: 1px solid #2c6a4f; font-size: 12px;
  animation: eco-in .2s ease-out;
}
.eco-toast.error { background: #3a1f22; color: #ffd9d7; border-color: #7a3b3b; }
.eco-loader { height: 2px; overflow: hidden; background: rgba(183, 205, 220, .12); }
.eco-loader i { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, var(--gs-gold, #e5bd67), transparent); animation: eco-load 1.05s linear infinite; }
@keyframes eco-load { from { transform: translateX(-110%) } to { transform: translateX(300%) } }
.eco-empty { padding: 22px 12px; text-align: center; font-size: 11px; color: var(--muted, #91a6b2); }

@media (min-width: 620px) {
  .eco-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  #eco-overlay, .eco-card, .eco-sheet, .eco-toast, .eco-loader i { animation: none !important; }
}
