/* 配煤方案管理样式 */

.tl-mt-blending-container {
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

/* 头部 */
.tl-mt-blending-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tl-mt-blending-title {
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.tl-mt-blending-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.tl-mt-blending-btn.primary {
    background: #0ea5e9;
    color: white;
}

.tl-mt-blending-btn.primary:hover {
    background: #0284c7;
}

.tl-mt-blending-btn .material-symbols-outlined {
    font-size: 18px;
}

/* 方案卡片网格 */
.tl-mt-blending-schemes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.tl-mt-blending-scheme-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.tl-mt-blending-scheme-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tl-mt-blending-scheme-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.tl-mt-blending-scheme-title-wrapper {
    flex: 1;
}

.tl-mt-blending-scheme-name {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.tl-mt-blending-scheme-type {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tl-mt-blending-scheme-type.standard {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.tl-mt-blending-scheme-type.emergency {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.tl-mt-blending-scheme-type.optimal {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.tl-mt-blending-scheme-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tl-mt-blending-scheme-status.draft {
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
}

.tl-mt-blending-scheme-status.active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.tl-mt-blending-scheme-status.archived {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

.tl-mt-blending-scheme-body {
    margin-bottom: 16px;
}

/* 目标指标 */
.tl-mt-blending-targets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.tl-mt-blending-target-item {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.tl-mt-blending-target-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.tl-mt-blending-target-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

/* 配煤比例 */
.tl-mt-blending-ratios {
    margin-bottom: 16px;
}

.tl-mt-blending-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 12px 0;
}

.tl-mt-blending-ratio-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.tl-mt-blending-ratio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tl-mt-blending-coal-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.tl-mt-blending-ratio-value {
    font-size: 14px;
    font-weight: 700;
    color: #0ea5e9;
}

.tl-mt-blending-ratio-bar-wrapper {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.tl-mt-blending-ratio-bar {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9, #06b6d4);
    transition: width 0.3s;
}

.tl-mt-blending-ratio-info {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #64748b;
}

/* 预计结果 */
.tl-mt-blending-results {
    margin-bottom: 16px;
}

.tl-mt-blending-result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.tl-mt-blending-result-item {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
}

.tl-mt-blending-result-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.tl-mt-blending-result-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
}

.tl-mt-blending-result-value.success {
    color: #22c55e;
}

.tl-mt-blending-result-value.warning {
    color: #eab308;
}

.tl-mt-blending-result-value.danger {
    color: #ef4444;
}

.tl-mt-blending-deviation {
    font-size: 13px;
    font-weight: 400;
    margin-left: 4px;
}

/* 可行性徽章 */
.tl-mt-blending-feasibility {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.tl-mt-blending-feasibility.feasible {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.tl-mt-blending-feasibility.suboptimal {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.tl-mt-blending-feasibility.infeasible {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* 采购建议 */
.tl-mt-blending-advice {
    display: flex;
    gap: 12px;
    background: rgba(234, 179, 8, 0.1);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #eab308;
}

.tl-mt-blending-advice-icon {
    color: #eab308;
}

.tl-mt-blending-advice-icon .material-symbols-outlined {
    font-size: 20px;
}

.tl-mt-blending-advice-text {
    flex: 1;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

/* 方案底部操作 */
.tl-mt-blending-scheme-footer {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.tl-mt-blending-scheme-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
}

.tl-mt-blending-scheme-btn .material-symbols-outlined {
    font-size: 16px;
}

.tl-mt-blending-scheme-btn:hover {
    background: #f8fafc;
}

.tl-mt-blending-scheme-btn.primary {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}

.tl-mt-blending-scheme-btn.primary:hover {
    background: #0284c7;
}

.tl-mt-blending-scheme-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: #ef4444;
}

.tl-mt-blending-scheme-btn.success {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.tl-mt-blending-scheme-btn.success:hover {
    background: #16a34a;
    border-color: #16a34a;
}

/* 设计对话框 */
.tl-mt-modal-content.extra-large {
    max-width: 1200px;
}

.tl-mt-blending-design-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.tl-mt-blending-design-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 16px 0;
}

.tl-mt-blending-design-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* 煤种选择器 */
.tl-mt-blending-coal-selector {
    margin-bottom: 16px;
}

.tl-mt-blending-add-coal-btn {
    width: 100%;
    padding: 12px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: white;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.tl-mt-blending-add-coal-btn:hover {
    border-color: #0ea5e9;
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.05);
}

/* 煤种设计项 */
.tl-mt-blending-design-coal-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.tl-mt-blending-design-coal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tl-mt-blending-design-coal-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.tl-mt-blending-remove-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tl-mt-blending-remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

.tl-mt-blending-remove-btn .material-symbols-outlined {
    font-size: 16px;
}

.tl-mt-blending-design-coal-info {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
}

.tl-mt-blending-design-ratio-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tl-mt-blending-design-ratio-control label {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.tl-mt-blending-ratio-input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.tl-mt-blending-ratio-slider {
    flex: 1;
}

.tl-mt-blending-total-ratio {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    font-weight: 600;
    margin-top: 12px;
}

.tl-mt-blending-total-value.success {
    color: #22c55e;
    font-size: 18px;
}

.tl-mt-blending-total-value.danger {
    color: #ef4444;
    font-size: 18px;
}

/* 预测结果 */
.tl-mt-blending-prediction-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.tl-mt-blending-prediction-item {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.tl-mt-blending-prediction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tl-mt-blending-prediction-label {
    font-size: 13px;
    color: #64748b;
}

.tl-mt-blending-prediction-status {
    font-size: 12px;
    font-weight: 500;
}

.tl-mt-blending-prediction-status.success {
    color: #22c55e;
}

.tl-mt-blending-prediction-status.warning {
    color: #eab308;
}

.tl-mt-blending-prediction-status.danger {
    color: #ef4444;
}

.tl-mt-blending-prediction-value {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.tl-mt-blending-prediction-deviation {
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
}

.tl-mt-blending-feasibility-badge {
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
}

.tl-mt-blending-feasibility-badge.feasible {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.tl-mt-blending-feasibility-badge.suboptimal {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.tl-mt-blending-feasibility-badge.infeasible {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.tl-mt-blending-feasibility-badge.pending {
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
}

/* 采购建议框 */
.tl-mt-blending-advice-box {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.tl-mt-blending-advice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #ef4444;
    margin-bottom: 12px;
}

.tl-mt-blending-advice-list {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #475569;
    line-height: 1.8;
}

/* 煤种列表选择器 */
.tl-mt-coal-list {
    max-height: 400px;
    overflow-y: auto;
}

.tl-mt-coal-list-item {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.tl-mt-coal-list-item:hover {
    background: #f8fafc;
    border-color: #0ea5e9;
}

.tl-mt-coal-list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tl-mt-coal-list-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.tl-mt-coal-list-item-stock {
    font-size: 13px;
    color: #64748b;
}

.tl-mt-coal-list-item-info {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #64748b;
}

/* 响应式 */
@media (max-width: 1024px) {
    .tl-mt-blending-schemes-grid {
        grid-template-columns: 1fr;
    }
    
    .tl-mt-blending-design-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tl-mt-blending-container {
        padding: 16px;
    }
    
    .tl-mt-blending-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .tl-mt-blending-targets {
        grid-template-columns: 1fr;
    }
    
    .tl-mt-blending-prediction-grid {
        grid-template-columns: 1fr;
    }
}

/* 深色模式 */
body.dark .tl-mt-blending-title {
    color: #f1f5f9;
}

body.dark .tl-mt-blending-scheme-card {
    background: #1e293b;
}

body.dark .tl-mt-blending-scheme-header {
    border-color: #334155;
}

body.dark .tl-mt-blending-scheme-name,
body.dark .tl-mt-blending-target-value,
body.dark .tl-mt-blending-coal-name,
body.dark .tl-mt-blending-design-coal-name,
body.dark .tl-mt-blending-coal-list-item-name,
body.dark .tl-mt-blending-prediction-value {
    color: #f1f5f9;
}

body.dark .tl-mt-blending-target-item,
body.dark .tl-mt-blending-ratio-item,
body.dark .tl-mt-blending-design-section {
    background: #0f172a;
}

body.dark .tl-mt-blending-result-item {
    background: #0f172a;
}

body.dark .tl-mt-blending-design-coal-item,
body.dark .tl-mt-blending-prediction-item {
    background: #0f172a;
    border-color: #334155;
}

body.dark .tl-mt-blending-scheme-footer {
    border-color: #334155;
}

body.dark .tl-mt-blending-scheme-btn {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark .tl-mt-blending-scheme-btn:hover {
    background: #1e293b;
}

body.dark .tl-mt-blending-add-coal-btn {
    background: #0f172a;
    border-color: #334155;
}

body.dark .tl-mt-coal-list-item {
    background: #1e293b;
    border-color: #334155;
}

body.dark .tl-mt-coal-list-item:hover {
    background: #0f172a;
}

body.dark .tl-mt-blending-section-title {
    color: #94a3b8;
}

body.dark .tl-mt-blending-design-title {
    color: #f1f5f9;
}

body.dark .tl-mt-blending-ratio-bar-wrapper {
    background: #334155;
}

body.dark .tl-mt-blending-total-ratio {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

/* 数据来源标签 */
.tl-mt-coal-list-item-source {
    padding-top: 4px;
    margin-top: 4px;
    border-top: 1px solid #e2e8f0;
}

.dark-mode .tl-mt-coal-list-item-source {
    border-top-color: #334155;
}

/* 方案不可行提示框 */
.tl-mt-blending-infeasibility-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.03) 100%);
    border: 2px solid #fecaca;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

.tl-mt-blending-infeasibility-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #fecaca;
}

.tl-mt-blending-infeasibility-header .material-symbols-outlined {
    font-size: 24px;
    animation: pulse-attention 2s ease-in-out infinite;
}

@keyframes pulse-attention {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.tl-mt-blending-infeasibility-reasons {
    margin: 0 0 20px 0;
    padding-left: 24px;
    list-style: none;
}

.tl-mt-blending-infeasibility-reasons li {
    position: relative;
    font-size: 14px;
    color: #991b1b;
    line-height: 1.8;
    margin-bottom: 8px;
    padding-left: 8px;
}

.tl-mt-blending-infeasibility-reasons li::before {
    content: '✗';
    position: absolute;
    left: -20px;
    color: #ef4444;
    font-weight: bold;
    font-size: 16px;
}

.tl-mt-blending-suggestions-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #0ea5e9;
    margin-bottom: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.tl-mt-blending-suggestions-header .material-symbols-outlined {
    font-size: 20px;
}

.tl-mt-blending-suggestions-list {
    margin: 0;
    padding-left: 24px;
    list-style: none;
}

.tl-mt-blending-suggestions-list li {
    position: relative;
    font-size: 14px;
    color: #0f766e;
    line-height: 1.8;
    margin-bottom: 8px;
    padding-left: 8px;
    font-weight: 500;
}

.tl-mt-blending-suggestions-list li::before {
    content: '→';
    position: absolute;
    left: -20px;
    color: #0ea5e9;
    font-weight: bold;
    font-size: 16px;
}

/* 深色模式下的不可行提示框 */
body.dark .tl-mt-blending-infeasibility-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
    border-color: #7f1d1d;
}

body.dark .tl-mt-blending-infeasibility-header {
    color: #fca5a5;
    border-bottom-color: #7f1d1d;
}

body.dark .tl-mt-blending-infeasibility-reasons li {
    color: #fca5a5;
}

body.dark .tl-mt-blending-suggestions-header {
    color: #67e8f9;
    border-top-color: #334155;
}

body.dark .tl-mt-blending-suggestions-list li {
    color: #5eead4;
}
