/* 2026智能KPI绩效计算器样式 */

.page-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.header-content h1 {
    margin: 0 0 8px 0;
    font-size: 2em;
    font-weight: 300;
}

.subtitle {
    font-size: 1em;
    opacity: 0.9;
    margin: 0;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-icon {
    font-size: 1.5em;
    margin-right: 10px;
}

.card-content h3 {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 0.9em;
}

.metric-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
}

/* 上下布局结构调整 */
.section-panel {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.section-top {
    /* 指标配置区 */
}

.section-bottom {
    /* 结果展示区 */
}

/* 确保底部面板内容不会过度拉伸 */
.section-bottom .overview-section,
.section-bottom .results-section,
.section-bottom .ai-insights,
.section-bottom .export-section {
    margin-bottom: 12px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.panel-header h2 {
    margin: 0;
    color: #333;
}

.actions {
    display: flex;
    gap: 10px;
}

.btn-primary, .btn-success, .btn-secondary, .btn-export {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #2196F3;
    color: white;
}

.btn-primary:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
}

.btn-success {
    background-color: #4CAF50;
    color: white;
}

.btn-success:hover {
    background-color: #388E3C;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #9E9E9E;
    color: white;
}

.btn-secondary:hover {
    background-color: #757575;
    transform: translateY(-2px);
}

.btn-export {
    background-color: #FF9800;
    color: white;
    padding: 8px 16px;
}

.btn-export:hover {
    background-color: #F57C00;
    transform: translateY(-2px);
}

.config-section {
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.control-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.control-group {
    margin-bottom: 12px;
}

.help-text {
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-left: 3px solid #2196F3;
    border-radius: 0 4px 4px 0;
}

.instructions {
    margin-bottom: 15px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 3px solid #2196F3;
}

.instruction-list {
    margin: 8px 0;
    padding-left: 20px;
    font-size: 0.9em;
    color: #555;
}

.instruction-list li {
    margin-bottom: 4px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.control-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.indicators-container-wrapper {
    max-height: 300px;
    min-height: 100px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 8px;
}

.indicator-item {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    position: relative;
}

.indicator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.indicator-title {
    font-weight: bold;
    color: #333;
}

.delete-indicator {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-indicator:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.indicator-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    align-items: center;
}

.indicator-field {
    display: flex;
    flex-direction: column;
}

.indicator-field label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.indicator-field input, .indicator-field select {
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

.indicator-name {
    grid-column: 1 / -1;
}

.overview-section {
    background: #f0f8ff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #2196F3;
}

.grade-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.excellent { background-color: #E8F5E8; color: #2E7D32; }
.good { background-color: #FFF8E1; color: #F57F17; }
.satisfactory { background-color: #E3F2FD; color: #1976D2; }
.improvement-needed { background-color: #FFEBEE; color: #C62828; }

.results-section {
    margin-bottom: 15px;
}

.details-table {
    overflow-x: auto;
}

.results-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.details-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.details-table th, .details-table td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: left;
}

.details-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.ai-insights {
    margin-bottom: 15px;
    padding: 12px;
    background: #fff3cd;
    border-radius: 6px;
    border-left: 3px solid #ffc107;
}

.ai-insights h3 {
    margin-top: 0;
    color: #856404;
}

.suggestions-list {
    margin: 0;
}

.placeholder {
    color: #6c757d;
    font-style: italic;
}

.export-section h3 {
    margin-bottom: 12px;
    color: #333;
}

.export-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 12px;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover {
    color: #000;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.template-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.template-item:hover {
    border-color: #2196F3;
    background-color: #f0f8ff;
    transform: translateY(-2px);
}

.template-item h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.template-item p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .control-group-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .overview-stats {
        grid-template-columns: 1fr;
    }
    
    .indicator-fields {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .export-options {
        flex-direction: column;
    }
    
    .header-content h1 {
        font-size: 2em;
    }
}