/**
 * Page-specific styles: Reports (donut chart), Shamsi date picker, About page
 */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
}
.month-nav button {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-surface-2);
  display: flex; align-items: center; justify-content: center;
}
.month-nav span { font-weight: 700; font-size: 1rem; }

.donut-wrapper { display: flex; justify-content: center; padding: var(--space-4) 0; }
.donut-chart {
  width: 200px; height: 200px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-elevation);
}
.donut-chart__hole {
  width: 130px; height: 130px;
  border-radius: 50%;
  background: var(--bg-base);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
}
.donut-chart__hole span { font-weight: 700; font-size: 1rem; }
.donut-chart__hole small { color: var(--text-tertiary); font-size: 0.7rem; }

.report-list { display: flex; flex-direction: column; gap: var(--space-2); }
.report-row {
  display: flex; align-items: center; gap: var(--space-2);
  background: var(--bg-surface);
  padding: var(--space-3);
  border-radius: var(--radius-md);
}
.report-row__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.report-row__name { flex: 1; font-size: 0.88rem; }
.report-row__pct { font-size: 0.8rem; color: var(--text-secondary); }
.report-row__amount { font-weight: 700; font-size: 0.88rem; min-width: 80px; text-align: left; }

/* Shamsi Date Picker */
.shamsi-picker {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.shamsi-picker__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-2);
}
.shamsi-picker__nav {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-surface-2);
  display: flex; align-items: center; justify-content: center;
}
.shamsi-picker__title { font-weight: 700; font-size: 0.92rem; }
.shamsi-picker__weekdays, .shamsi-picker__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.shamsi-picker__weekdays span {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  padding-bottom: 4px;
}
.shamsi-picker__day {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: background var(--transition-fast);
}
.shamsi-picker__day:hover { background: var(--bg-surface-2); }
.shamsi-picker__day--selected { background: var(--accent); color: #000000; font-weight: 700; }

/* About page */
.about-page { gap: var(--space-4); }
.about-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-3);
  text-align: center;
}
.about-card__avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent);
  color: #000000;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto;
}
.about-card__avatar--dev { background: var(--announce); color: #ffffff; }
.about-card h2 { font-size: 1.3rem; font-weight: 700; }
.about-card h3 { font-size: 1.05rem; font-weight: 700; text-align: right; }
.about-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; text-align: right; }
.about-list { display: flex; flex-direction: column; gap: var(--space-2); text-align: right; }
.about-list li { display: flex; align-items: center; gap: var(--space-2); font-size: 0.88rem; color: var(--text-secondary); }
.about-list li i { color: var(--accent); }
.dev-name { font-size: 1.1rem; font-weight: 700; color: var(--text-base); text-align: center; }
.dev-role { font-size: 0.8rem; color: var(--text-tertiary); text-align: center; margin-top: -8px; }


/* ---------- Desktop scaling ---------- */
@media (min-width: 896px) {
  .donut-chart { width: 260px; height: 260px; }
  .donut-chart__hole { width: 170px; height: 170px; }
  .donut-chart__hole span { font-size: 1.2rem; }
  .report-row { padding: var(--space-4); font-size: 0.95rem; }
  .report-row__name { font-size: 0.95rem; }

  .shamsi-picker { padding: var(--space-4); }
  .shamsi-picker__day { font-size: 0.95rem; }

  .about-card { padding: var(--space-6); }
  .about-card__avatar { width: 80px; height: 80px; font-size: 2rem; }
  .about-card h2 { font-size: 1.6rem; }
}

@media (min-width: 1024px) {
  .about-page { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); align-items: start; }
  .about-page .about-card:first-child { grid-column: 1 / -1; }
}

/* Market Prices Page */
.market-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.market-toolbar__updated { font-size: 0.75rem; color: var(--text-tertiary); }
.unit-switch { display: flex; background: var(--bg-surface-2); border-radius: var(--radius-pill); padding: 4px; }
.unit-switch__opt { padding: 6px 14px; border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); cursor: pointer; }
.unit-switch__opt--active { background: var(--accent); color: #000000; }

.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.price-card { background: var(--bg-surface); border-radius: var(--radius-md); padding: var(--space-3); display: flex; flex-direction: column; gap: 6px; }
.price-card__label { font-size: 0.78rem; color: var(--text-secondary); }
.price-card__value { font-size: 1.05rem; font-weight: 700; }
.price-card--unavailable .price-card__value { color: var(--text-tertiary); font-size: 0.85rem; font-weight: 500; }

.price-table-wrap { max-height: 420px; overflow-y: auto; border-radius: var(--radius-md); background: var(--bg-surface); }
.price-table__row { display: flex; justify-content: space-between; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--separator); font-size: 0.85rem; }
.price-table__key { color: var(--text-secondary); }
.price-table__value { font-weight: 700; }

/* Assets Page */
.asset-total-card { background: linear-gradient(135deg, var(--bg-card), var(--bg-card-alt)); border-radius: var(--radius-lg); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); box-shadow: var(--shadow-elevation); }
.asset-total-card__label { font-size: 0.85rem; color: var(--text-secondary); }
.asset-total-card__amount { font-size: 1.8rem; font-weight: 700; }

.asset-list { display: flex; flex-direction: column; gap: var(--space-2); }
.asset-item { display: flex; align-items: center; gap: var(--space-3); background: var(--bg-surface); border-radius: var(--radius-md); padding: var(--space-3); }
.asset-item__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.asset-item__title { font-weight: 600; font-size: 0.92rem; }
.asset-item__meta { font-size: 0.75rem; color: var(--text-tertiary); }
.asset-item__value { font-weight: 700; font-size: 0.88rem; white-space: nowrap; }
.asset-item__value--warning { color: var(--warning); font-weight: 500; font-size: 0.78rem; }
.asset-item__value--manual::after { content: ' (دستی)'; font-size: 0.7rem; color: var(--text-tertiary); font-weight: 400; }
.asset-item__actions { display: flex; gap: var(--space-2); }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg-surface-2); color: var(--text-secondary); }
.icon-btn--danger { color: var(--negative); }

/* Asset Form Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: var(--space-4); }
.modal { background: var(--bg-base); border-radius: var(--radius-lg); padding: var(--space-5); width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-3); }
.modal__title { font-size: 1.1rem; font-weight: 700; }
.modal__actions { display: flex; gap: var(--space-3); margin-top: var(--space-2); }
.modal__actions .btn { flex: 1; }
.form-hint { font-size: 0.75rem; color: var(--warning); line-height: 1.6; }

@media (min-width: 896px) {
  .price-grid { grid-template-columns: repeat(4, 1fr); }
}

.price-table-wrap { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-2); }

#price-all-wrap[hidden] { display: none !important; }