/* 个税计算器页面样式 */

.tax-section {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}

.tax-section-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-light);
}

/* 专项附加扣除 */
.tax-deduction-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tax-deduction-item {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tax-deduction-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.tax-deduction-header:hover {
  background: var(--color-bg-subtle);
}

.tax-deduction-name {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.tax-deduction-input {
  width: 100px;
  text-align: right;
  flex-shrink: 0;
}

.tax-deduction-toggle {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.tax-deduction-item.expanded .tax-deduction-toggle {
  transform: rotate(180deg);
}

.tax-deduction-detail {
  display: none;
  padding: 0 var(--space-4) var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  padding-left: calc(var(--space-4) + 16px + var(--space-3));
}

.tax-deduction-item.expanded .tax-deduction-detail {
  display: block;
}

/* 结果区域 */
.tax-result-area {
  margin-top: var(--space-6);
}

.tax-annual-summary {
  margin-top: var(--space-6);
}

.tax-annual-summary h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

/* 逐月明细 */
.tax-monthly-detail {
  margin-top: var(--space-6);
}

.tax-monthly-detail h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.tax-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.tax-table-wrap .result-table {
  min-width: 600px;
}

.tax-table-wrap .result-table th,
.tax-table-wrap .result-table td {
  white-space: nowrap;
}

.tax-table-wrap .result-table tbody tr:hover {
  background: var(--color-primary-bg);
}

/* 响应式 */
@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .tax-deduction-input {
    width: 80px;
  }
}
