@import url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/misc/Farsi-Digits/Vazirmatn-FD-font-face.css");

.fund-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.content.fund-content-host {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.vp-mobile .layout--fund .content.fund-content-host {
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0)) !important;
}

/* Hero balance + CTA */
.fund-hero {
  padding: 16px;
  background: linear-gradient(135deg, #ffffff 0%, rgba(214, 169, 79, 0.08) 100%);
  border: 1px solid rgba(214, 169, 79, 0.22);
}

.fund-hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.fund-hero__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(200, 169, 104, 0.14);
}

.fund-hero__body {
  flex: 1 1 160px;
  min-width: 0;
}

.fund-hero__label {
  display: block;
  font-size: 0.84rem;
  color: #64748b;
  margin-bottom: 4px;
}

.fund-hero__value {
  display: block;
  font-family: "Vazirmatn FD", "Vazirmatn", Tahoma, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.fund-hero__cta {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.86rem;
  white-space: nowrap;
}

/* Month KPIs */
.fund-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fund-kpi {
  padding: 12px 14px;
}

.fund-kpi__label {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 4px;
}

.fund-kpi__value {
  display: block;
  font-family: "Vazirmatn FD", "Vazirmatn", Tahoma, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.fund-kpi--in .fund-kpi__value {
  color: #10b981;
}

.fund-kpi--out .fund-kpi__value {
  color: #ef4444;
}

/* Filters */
.fund-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fund-filters__tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.fund-filters__tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #e6ecf2;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-family: Vazirmatn, inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}

.fund-filters__tab.is-active {
  border-color: rgba(214, 169, 79, 0.55);
  background: rgba(214, 169, 79, 0.12);
  color: #0f172a;
}

.fund-filters__search.ch-search-row__wrap {
  min-height: 44px;
  height: 44px;
  padding: 0 10px;
  box-sizing: border-box;
  border: 1.5px solid rgba(214, 169, 79, 0.3);
  border-radius: var(--ch-radius-input, 14px);
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.fund-filters__search .ch-search-row__input {
  padding: 0 !important;
  min-height: 0 !important;
  font-size: 13px;
}

/* Transaction list */
.fund-list {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.fund-day-group__head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  background: rgba(247, 249, 252, 0.96);
  border-bottom: 1px solid #f3f4f6;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fund-tx {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
}

.fund-day-group__items .fund-tx:last-child {
  border-bottom: none;
}

.fund-tx__start {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.fund-tx__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.fund-tx__icon--in {
  background: rgba(16, 185, 129, 0.12);
}

.fund-tx__icon--out {
  background: rgba(239, 68, 68, 0.1);
}

.fund-tx__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fund-tx__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.45;
  word-break: break-word;
}

.fund-tx__badge {
  display: inline-flex;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
}

.fund-tx__end {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: end;
}

.fund-tx__amount {
  font-family: "Vazirmatn FD", "Vazirmatn", Tahoma, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fund-tx__amount--in {
  color: #10b981;
}

.fund-tx__amount--out {
  color: #ef4444;
}

.fund-tx__amount--muted {
  color: #94a3b8;
  font-weight: 600;
}

.fund-tx__balance {
  font-family: "Vazirmatn FD", "Vazirmatn", Tahoma, sans-serif;
  font-size: 0.78rem;
  color: #6b7280;
  white-space: nowrap;
}

.fund-tx__balance-label {
  font-weight: 500;
}

.fund-empty .empty {
  margin: 0;
}

@media (min-width: 640px) {
  .fund-hero__top {
    flex-wrap: nowrap;
  }

  .fund-hero__cta {
    margin-inline-start: auto;
  }
}
