/* ===== 作物算法库与光谱配方页面样式 ===== */

/* 列表视图容器 */
.crops-view {
    padding: 0;
}

/* 搜索工具栏 */
.crops-toolbar {
    margin-bottom: 20px;
}

.search-input {
    width: 320px;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 作物卡片网格 */
.crop-list {
    min-height: 100px;
}

.crop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* 作物卡片 */
.crop-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
}

.crop-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.crop-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.crop-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.crop-id {
    font-size: 12px;
    color: #9ca3af;
    font-family: monospace;
}

/* 光谱条 */
.crop-spectrum {
    margin-bottom: 12px;
}

.spectrum-bar {
    display: flex;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    background: #f3f4f6;
}

.spectrum-bar.large {
    height: 24px;
    border-radius: 12px;
}

.spectrum-segment {
    height: 100%;
    transition: width 0.3s;
}

.spectrum-segment.red {
    background: #ef4444;
}

.spectrum-segment.blue {
    background: #3b82f6;
}

.spectrum-segment.white {
    background: #e5e7eb;
    border-left: 1px solid #d1d5db;
    border-right: 1px solid #d1d5db;
}

.spectrum-segment.far-red {
    background: #b91c1c;
}

/* 光谱图例 */
.spectrum-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    font-size: 12px;
    color: #4b5563;
}

.spectrum-legend.large {
    font-size: 13px;
    gap: 16px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.legend-color {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.legend-color.red {
    background: #ef4444;
}

.legend-color.blue {
    background: #3b82f6;
}

.legend-color.white {
    background: #e5e7eb;
    border: 1px solid #d1d5db;
}

.legend-color.far-red {
    background: #b91c1c;
}

/* 作物卡片中的阶段标签 */
.crop-stages {
    font-size: 13px;
    color: #6b7280;
}

.stage-label {
    font-weight: 500;
    color: #374151;
}

.stage-names {
    color: #6b7280;
}

/* ===== 作物详情视图 ===== */
.crop-detail-view {
    min-height: 200px;
}

.crop-detail {
    max-width: 900px;
}

.crop-detail-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}

.crop-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.crop-detail-id {
    font-size: 13px;
    color: #9ca3af;
    font-family: monospace;
}

.crop-detail-section {
    margin-bottom: 28px;
}

/* 光谱详情区域 */
.spectrum-detail {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

.spectrum-total {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-align: right;
}

/* 阶段参数表格 */
.stages-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.stages-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.stages-table thead th {
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.stages-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
}

.stages-table tbody tr:last-child td {
    border-bottom: none;
}

.stages-table tbody tr:hover {
    background: #f9fafb;
}

.stage-name {
    font-weight: 600;
    color: #111827;
}
