/* ===== Theme tokens ===== */
:root {
  --revenue-blue: #1a4d7c;
  --revenue-yellow: #fdef11;
  --revenue-border: #eee;
  --revenue-soft: #f9f9f9;
  --revenue-text: #1a4d7c;
  --revenue-black: #333;
}

/* ===== Base wrapper ===== */
.revenue {
  direction: rtl;
  font-family: "iransans", Vazirmatn, Tahoma, sans-serif;
  color: var(--revenue-black);
  width: 100%;
}

/* Switch: desktop vs mobile */
.revenue__desktop {
  display: block;
  width: 100%;
}

.revenue__mobile {
  display: none;
}

/* ===== Desktop Layout ===== */
.revenue__container {
  max-width: 1000px;
  margin: 50px auto;
  padding: 0 20px;
}

.revenue__table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ===== Desktop Table ===== */
.finance-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.finance-table thead {
  background: var(--revenue-blue);
}

.finance-table thead th {
  background: var(--revenue-blue);
  color: var(--revenue-yellow);
  font-weight: 650;
  text-align: center;
  vertical-align: middle;
  padding: 15px 10px;
  line-height: 1.6;
  border: none;
  font-size: 15px;
}

.finance-table thead tr:last-child th,
.finance-table thead tr:first-child th[rowspan="2"] {
  border-bottom: 3px solid var(--revenue-yellow);
}

.finance-table__side {
  width: 40%;
}

.finance-table__top {
  font-size: 15px;
}

.finance-table tbody td {
  padding: 18px 15px;
  border-bottom: 1px solid var(--revenue-border);
  color: #333;
  font-size: 13px;
  text-align: center;
  background-color: #fff;
  transition: background-color 0.25s ease;
}

/* ستون اول دیتای جدول با بک‌گراند طوسی خیلی کمرنگ */
.finance-table__label {
  text-align: right !important;
  font-weight: 600;
  width: 40%;
  background-color: #f9f9f9;
  color: var(--revenue-blue) !important;
}
.finance-table tbody tr .finance-table__label {
  background-color: #f9f9f9;
}

/* هاور روی کل ردیف دیتا */
.finance-table tbody tr:hover td {
  background-color: rgba(26, 77, 124, 0.03);
}

/* حفظ تفاوت خیلی ظریف ستون اول هنگام هاور */
.finance-table tbody tr:hover .finance-table__label {
  background-color: #f3f5f7;
}

.finance-table tbody tr:last-child td {
  border-bottom: none;
}

/* ===== Mobile Cards ===== */
@media (max-width: 768px) {
  .revenue__desktop {
    display: none;
  }

  .revenue__mobile {
    display: block;
    padding: 15px 50px;
    
  }

  .revenue__title {
    margin: 0 0 14px 0;
    padding: 10px 12px;
    color: var(--revenue-text);
    font-weight: 800;
    text-align: center;
  }

  .income-card {
    margin: 0 0 18px 0;
    background: #fff;
    padding: 0px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #dfdfdf;
  }

  .income-card__title {
    margin: 0;
    padding: 12px 14px;
    background: #f5f7fa;
    color: var(--revenue-text);
    font-weight: 800;
    text-align: center;
    border-bottom: 2px solid var(--revenue-yellow);
    line-height: 1.8;
    width: 100%;
  }

  .income-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #ddd;
    gap: 50px;
  }

  .income-row__value {
    min-width: 64px;
    text-align: center;
    color: var(--revenue-black);
    font-weight: 400;
    white-space: nowrap;
  }

  .income-row__label {
    flex: 1;
    text-align: right;
    color: var(--revenue-text);
    font-weight: 700;
    line-height: 1.8;
  }
}
