/* ============================================
   个人所得税计算器样式
   ============================================ */

.tc-page-header { margin-bottom: 24px; }
.tc-page-title { font-size: 28px; font-weight: 700; color: #111827; margin: 0 0 8px 0; letter-spacing: -0.5px; }
.tc-page-desc { font-size: 15px; color: #6b7280; margin: 0 0 12px 0; }
.tc-feature-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-tag { display: inline-block; padding: 3px 10px; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 12px; font-size: 12px; color: #4b5563; }

/* 表单卡片 */
.tc-form-card { margin-bottom: 20px; padding: 24px; }
.tc-form-tabs { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 2px solid #f3f4f6; padding-bottom: 12px; }
.tc-form-tab { padding: 8px 20px; border: none; border-radius: 8px; background: transparent; font-size: 14px; font-weight: 500; color: #6b7280; cursor: pointer; transition: all 0.2s ease; }
.tc-form-tab:hover { background: #f9fafb; color: #374151; }
.tc-form-tab.active { background: #eff6ff; color: #3b82f6; }

.tc-form-section { margin-bottom: 24px; }
.tc-form-section:last-child { margin-bottom: 0; }
.tc-section-title { font-size: 16px; font-weight: 600; color: #111827; margin: 0 0 16px 0; }
.tc-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.tc-deduction-total { font-size: 14px; color: #6b7280; }
.tc-deduction-total strong { color: #10b981; font-size: 18px; }

.tc-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tc-form-field { display: flex; flex-direction: column; gap: 6px; }
.tc-form-label { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 500; color: #374151; }
.tc-form-unit { font-size: 12px; color: #9ca3af; }
.tc-form-hint { font-size: 11px; color: #9ca3af; font-weight: normal; }
.tc-form-input { width: 100%; padding: 12px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 14px; transition: all 0.2s ease; }
.tc-form-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.tc-form-input::placeholder { color: #9ca3af; }

.tc-form-options { margin-top: 12px; }
.tc-checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7280; cursor: pointer; }
.tc-checkbox input { margin: 0; }

/* 专项附加扣除 */
.tc-deduction-section { padding: 20px; background: #f9fafb; border-radius: 12px; }
.tc-deduction-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.tc-deduction-item { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px; }
.tc-deduction-item.tc-deduction-full { grid-column: 1 / -1; }
.tc-deduction-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tc-deduction-icon { font-size: 20px; }
.tc-deduction-name { font-size: 14px; font-weight: 600; color: #111827; }
.tc-deduction-amount { font-size: 12px; color: #10b981; margin-top: 4px; }
.tc-deduction-control { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tc-deduction-btn { width: 28px; height: 28px; border: 1px solid #e5e7eb; border-radius: 6px; background: #ffffff; cursor: pointer; font-size: 16px; font-weight: 600; color: #374151; transition: all 0.2s ease; }
.tc-deduction-btn:hover { background: #f3f4f6; }
.tc-deduction-value { font-size: 18px; font-weight: 700; color: #111827; min-width: 30px; text-align: center; }
.tc-deduction-unit { font-size: 12px; color: #9ca3af; }
.tc-deduction-select { flex: 1; padding: 8px 12px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 13px; }
.tc-deduction-select:focus { outline: none; border-color: #3b82f6; }

.tc-deduction-checkbox { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; cursor: pointer; }
.tc-deduction-checkbox input { margin: 0; }

.tc-deduction-toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.tc-deduction-toggle input { opacity: 0; width: 0; height: 0; }
.tc-toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .3s; border-radius: 24px; }
.tc-toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
.tc-deduction-toggle input:checked + .tc-toggle-slider { background-color: #10b981; }
.tc-deduction-toggle input:checked + .tc-toggle-slider:before { transform: translateX(20px); }

.tc-deduction-radio { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #374151; cursor: pointer; }
.tc-deduction-radio input { margin: 0; }

/* 表单按钮 */
.tc-form-actions { display: flex; gap: 12px; margin-top: 24px; }
.tc-calc-btn { flex: 1; }
.tc-reset-btn { flex: 0 0 auto; }

/* 结果区域 */
.tc-result-section { margin-bottom: 20px; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.tc-result-main { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.tc-result-card { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; text-align: center; }
.tc-result-label { font-size: 13px; color: #6b7280; margin-bottom: 8px; }
.tc-result-value { font-size: 28px; font-weight: 700; color: #111827; }
.tc-net-card .tc-result-value { color: #10b981; }
.tc-tax-card .tc-result-value { color: #ef4444; }
.tc-result-rate { font-size: 12px; color: #9ca3af; margin-top: 4px; }

.tc-detail-card { padding: 20px; }
.tc-detail-list { display: flex; flex-direction: column; gap: 12px; }
.tc-detail-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.tc-detail-item:last-child { border-bottom: none; }
.tc-detail-label { font-size: 14px; color: #374151; }
.tc-detail-value { font-family: 'SF Mono', Monaco, monospace; font-size: 14px; font-weight: 500; color: #111827; }
.tc-detail-item.tc-minus .tc-detail-label { color: #6b7280; }
.tc-detail-item.tc-minus .tc-detail-value { color: #ef4444; }
.tc-detail-item.tc-total { padding-top: 16px; border-top: 2px solid #e5e7eb; }
.tc-detail-item.tc-total .tc-detail-label { font-weight: 600; color: #111827; }
.tc-detail-item.tc-total .tc-detail-value { font-weight: 700; color: #3b82f6; }
.tc-detail-item.tc-tax .tc-detail-value { color: #ef4444; font-weight: 600; }
.tc-detail-item.tc-net { background: #ecfdf5; padding: 16px; border-radius: 8px; margin-top: 8px; }
.tc-detail-item.tc-net .tc-detail-label { font-weight: 600; color: #111827; }
.tc-detail-item.tc-net .tc-detail-value { font-size: 18px; font-weight: 700; color: #10b981; }

/* 税率表 */
.tc-bracket-table-wrapper { overflow-x: auto; }
.tc-bracket-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tc-bracket-table th, .tc-bracket-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #e5e7eb; }
.tc-bracket-table th { background: #f9fafb; font-weight: 600; color: #374151; }
.tc-bracket-table td { color: #374151; }
.tc-bracket-table tr:hover { background: #f9fafb; }
.tc-bracket-table tr:last-child td { border-bottom: none; }

/* 使用说明 */
.tc-guide-content { font-size: 14px; line-height: 1.8; color: #374151; }
.tc-guide-content h4 { font-size: 15px; font-weight: 600; color: #111827; margin: 20px 0 12px 0; }
.tc-formula { background: #f9fafb; padding: 16px; border-radius: 8px; font-family: 'SF Mono', Monaco, monospace; font-size: 13px; line-height: 1.8; color: #374151; margin-bottom: 20px; }
.tc-guide-list { margin: 0 0 16px 0; padding-left: 20px; }
.tc-guide-list li { margin-bottom: 8px; }
.tc-guide-list strong { color: #111827; }

/* 响应式 */
@media (max-width: 768px) {
    .tc-page-title { font-size: 22px; }
    .tc-result-main { grid-template-columns: 1fr; }
    .tc-form-grid { grid-template-columns: 1fr; }
    .tc-deduction-grid { grid-template-columns: 1fr; }
    .tc-bracket-table { font-size: 12px; }
    .tc-bracket-table th, .tc-bracket-table td { padding: 8px 12px; }
}

/* 暗色主题 */
@media (prefers-color-scheme: dark) {
    .tc-tag { background: #374151; border-color: #4b5563; color: #d1d5db; }
    .tc-form-input { background: #1f2937; border-color: #374151; color: #f9fafb; }
    .tc-deduction-section { background: #1f2937; }
    .tc-deduction-item { background: #111827; border-color: #374151; }
    .tc-deduction-btn { background: #374151; border-color: #4b5563; color: #f9fafb; }
    .tc-deduction-select { background: #1f2937; border-color: #374151; color: #f9fafb; }
    .tc-result-card { background: #1f2937; border-color: #374151; }
    .tc-bracket-table th { background: #374151; }
    .tc-bracket-table tr:hover { background: #374151; }
    .tc-formula { background: #1f2937; }
}
