/* ===== 计算器页面通用样式 ===== */
.calc-page {
    min-height: 100vh;
    background: #f8fafc;
}

/* 页面头部 */
.calc-header {
    position: relative;
    padding: 60px 40px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: white;
}

.calc-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: radial-gradient(circle at 20% 80%, white 2px, transparent 2px),
                      radial-gradient(circle at 80% 20%, white 2px, transparent 2px);
    background-size: 100px 100px;
}

.calc-header-content {
    position: relative;
    text-align: center;
}

.calc-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.calc-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
}

.calc-desc {
    font-size: 16px;
    opacity: 0.9;
}

/* 计算器主体 */
.calc-container {
    max-width: 1200px;
    margin: -40px auto 0;
    padding: 0 40px 60px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    position: relative;
    z-index: 1;
}

.calc-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 表单卡片 */
.calc-form-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.form-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.form-card-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.form-tip {
    font-size: 14px;
    color: #6b7280;
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.form-row.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.label-icon {
    font-size: 16px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.2s;
    background: white;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.input-unit {
    position: absolute;
    right: 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

/* 利率预设按钮 */
.rate-presets {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.rate-btn {
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.rate-btn:hover, .rate-btn.active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

/* 按钮组 */
.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.btn-calc {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-calc:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37,99,235,0.4);
}

.btn-icon {
    font-size: 20px;
}

.btn-reset {
    padding: 16px 24px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset:hover {
    background: #e5e7eb;
}

/* 结果卡片 */
.calc-result-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.result-card-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.result-tabs {
    display: flex;
    gap: 8px;
}

.result-tab {
    padding: 8px 20px;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.result-tab.active {
    background: #2563eb;
    color: white;
}

/* 高亮结果 */
.result-highlight {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.highlight-grid.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.highlight-item {
    text-align: center;
}

.highlight-item.main .highlight-label {
    font-size: 16px;
    color: #2563eb;
    margin-bottom: 8px;
}

.highlight-item.main .highlight-value {
    font-size: 48px;
    font-weight: 800;
    color: #1e40af;
}

.highlight-item.main .highlight-unit {
    font-size: 16px;
    color: #6b7280;
    margin-top: 4px;
}

.highlight-item.sub .highlight-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 6px;
}

.highlight-item.sub .highlight-value {
    font-size: 28px;
    font-weight: 700;
    color: #2563eb;
}

.highlight-item.sub .highlight-unit {
    font-size: 14px;
    color: #9ca3af;
}

/* 结果网格 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.result-grid.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.result-grid.two-cols {
    grid-template-columns: repeat(2, 1fr);
}

.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.result-icon {
    font-size: 24px;
}

.result-info {
    flex: 1;
}

.result-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}

.result-value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

/* 会员提示 */
.member-tip {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    margin-top: 24px;
}

.tip-icon {
    font-size: 32px;
}

.tip-content {
    flex: 1;
}

.tip-title {
    font-size: 15px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 4px;
}

.tip-desc {
    font-size: 13px;
    color: #b45309;
}

.btn-login-tip {
    padding: 10px 20px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-login-tip:hover {
    background: #d97706;
}

/* 明细表格 */
.detail-table-wrapper {
    max-height: 400px;
    overflow-y: auto;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th {
    padding: 12px 16px;
    background: #f3f4f6;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    border-bottom: 2px solid #e5e7eb;
}

.detail-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #4b5563;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.detail-table tbody tr:hover {
    background: #f8fafc;
}

/* 侧边栏 */
.calc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-icon {
    font-size: 20px;
}

.sidebar-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.sidebar-content {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.info-item {
    margin-bottom: 16px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item strong {
    color: #374151;
    display: block;
    margin-bottom: 6px;
}

.rate-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.rate-name {
    font-size: 13px;
    color: #4b5563;
}

.rate-value {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
}

.rate-note {
    margin-top: 12px;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

/* 响应式 */
@media (max-width: 1024px) {
    .calc-container {
        grid-template-columns: 1fr;
    }
    
    .calc-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .calc-header {
        padding: 40px 20px;
    }
    
    .calc-title {
        font-size: 28px;
    }
    
    .calc-container {
        padding: 0 20px 40px;
    }
    
    .calc-form-card, .calc-result-card {
        padding: 24px;
    }
    
    .form-row, .form-row.three-cols {
        grid-template-columns: 1fr;
    }
    
    .result-grid, .result-grid.three-cols, .result-grid.two-cols {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .highlight-grid, .highlight-grid.three-cols {
        grid-template-columns: 1fr;
    }
    
    .member-tip {
        flex-direction: column;
        text-align: center;
    }
}