/* ============================================
   定价策略辅助工具 — 页面专属样式
   ============================================ */

/* ── 定价建议卡片网格 ── */
.pricing-suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.suggestion-card {
    background: var(--card-bg, #fff);
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.suggestion-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
}

.suggestion-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* 颜色变体 */
.suggestion-card.gray  { border-color: #d1d5db; }
.suggestion-card.gray::before  { background: #9ca3af; }
.suggestion-card.gray  .sug-price { color: #4b5563; }

.suggestion-card.blue  { border-color: #93c5fd; }
.suggestion-card.blue::before  { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.suggestion-card.blue  .sug-price { color: #1d4ed8; }

.suggestion-card.purple { border-color: #c4b5fd; }
.suggestion-card.purple::before { background: linear-gradient(90deg, #6366f1, #a78bfa); }
.suggestion-card.purple .sug-price { color: #4f46e5; }

.suggestion-card.green { border-color: #6ee7b7; }
.suggestion-card.green::before { background: linear-gradient(90deg, #10b981, #34d399); }
.suggestion-card.green .sug-price { color: #059669; }

.sug-icon {
    font-size: 22px;
    margin-bottom: 6px;
    display: block;
}
.suggestion-card.gray   .sug-icon { color: #9ca3af; }
.suggestion-card.blue   .sug-icon { color: #3b82f6; }
.suggestion-card.purple .sug-icon { color: #6366f1; }
.suggestion-card.green  .sug-icon { color: #10b981; }

.sug-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.sug-price {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 4px;
}

.sug-price-unit {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted, #9ca3af);
}

.sug-profit {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    margin: 6px 0 2px;
}

.sug-profit .profit-val {
    font-weight: 600;
}

.sug-profit .profit-val.positive { color: #10b981; }
.sug-profit .profit-val.negative { color: #ef4444; }

.sug-desc {
    font-size: 11px;
    color: var(--text-muted, #9ca3af);
    margin-top: 6px;
    line-height: 1.4;
}

/* ── 竞品价格区间输入 ── */
.range-input-group {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.range-sep {
    font-size: 13px;
    color: var(--text-muted, #9ca3af);
    text-align: center;
    flex-shrink: 0;
}

/* ── 利润率指示器 ── */
.profit-rate-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.profit-rate-track {
    flex: 1;
    height: 6px;
    background: var(--bg-secondary, #f3f4f6);
    border-radius: 3px;
    overflow: hidden;
}

.profit-rate-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
    background: linear-gradient(90deg, #10b981, #6366f1);
}

.profit-rate-fill.negative {
    background: #ef4444;
}

.profit-rate-text {
    font-size: 12px;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

/* ── 利润预测表增强 ── */
.price-table-highlight {
    background: rgba(99, 102, 241, 0.06) !important;
    font-weight: 600;
}

.price-tag-badge {
    display: inline-block;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    font-weight: 600;
}

.price-tag-badge.breakeven { background: #f3f4f6; color: #6b7280; }
.price-tag-badge.competitive { background: #dbeafe; color: #1d4ed8; }
.price-tag-badge.premium { background: #ede9fe; color: #4f46e5; }
.price-tag-badge.target { background: #d1fae5; color: #059669; }

/* ── 利润趋势图容器 ── */
.chart-container {
    width: 100%;
    height: 320px;
}

/* ── 竞品区间可视化条 ── */
.competitor-range-visual {
    margin: 10px 0 4px;
    padding: 10px 12px;
    background: #eff6ff;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
    font-size: 12px;
    color: #1d4ed8;
    display: none;
}

.competitor-range-visual.visible { display: block; }

.comp-range-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.comp-range-track {
    flex: 1;
    height: 8px;
    background: #dbeafe;
    border-radius: 4px;
    position: relative;
}

.comp-range-fill {
    position: absolute;
    top: 0; bottom: 0;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    border-radius: 4px;
    left: 10%; right: 30%;
}

/* ── 策略说明 intro ── */
.strategy-intro {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0f9ff, #eff6ff);
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #bae6fd;
}

.strategy-intro i {
    font-size: 20px;
    color: #0ea5e9;
    flex-shrink: 0;
    margin-top: 1px;
}

.strategy-intro-text h4 {
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
    margin: 0 0 4px;
}

.strategy-intro-text p {
    font-size: 12px;
    color: #0284c7;
    margin: 0;
    line-height: 1.5;
}

/* ── 空态提示面板 ── */
.calc-hint-panel {
    background: var(--card-bg, #fff);
    border-radius: 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-self: start;
}

.hint-hero {
    text-align: center;
    padding: 20px 0;
}

.hint-hero i {
    font-size: 48px;
    color: #6366f1;
    opacity: 0.6;
    display: block;
    margin-bottom: 12px;
}

.hint-hero h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0 0 8px;
}

.hint-hero p {
    font-size: 13px;
    color: var(--text-muted, #9ca3af);
    margin: 0;
    line-height: 1.6;
}

.hint-tips {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hint-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
}

.hint-tip i {
    color: #10b981;
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

.hint-rates {
    background: var(--bg-secondary, #f9fafb);
    border-radius: 8px;
    padding: 14px 16px;
}

.hint-rates-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hint-rate-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hint-rate-list span {
    font-size: 12px;
    padding: 3px 10px;
    background: #fff;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 20px;
    color: var(--text-secondary, #6b7280);
}

/* ── 响应式 ── */
@media (max-width: 768px) {
    .pricing-suggestions {
        grid-template-columns: repeat(2, 1fr);
    }
    .sug-price {
        font-size: 22px;
    }
    .range-input-group {
        grid-template-columns: 1fr;
    }
    .range-sep { display: none; }
}

@media (max-width: 480px) {
    .pricing-suggestions {
        grid-template-columns: 1fr;
    }
}
