/* 结果展示区域样式 */
.result-wrapper {
    display: none;
    animation: fadeIn 0.5s ease;
    margin-top: 25px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pest-name {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    display: inline-block;
}

.pest-name::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.control-card,
.pesticide-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 25px;
    transition: var(--transition-default);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.control-card:hover,
.pesticide-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.control-card::before,
.pesticide-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
}

.card-title {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.control-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.control-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    line-height: 1.7;
    color: var(--text-primary);
    font-size: 15px;
    padding: 16px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    transition: var(--transition-default);
    border: 1px solid var(--border-color);
}

.control-item:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.control-item .num {
    min-width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.method-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.method-type {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.method-type.type-agricultural {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
}
.method-type.type-physical {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}
.method-type.type-biological {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}
.method-type.type-chemical {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}
.method-type.type-general {
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
}

.method-text {
    color: var(--text-primary);
    line-height: 1.7;
    font-weight: 500;
}

.method-extra {
    margin-top: 8px;
    padding: 10px 12px;
    background: #eff6ff;

    border-radius: var(--radius-md);
    color: var(--primary-dark);
    font-size: 14px;
}

.pesticide-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pesticide-item {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 20px;

    box-shadow: var(--shadow-sm);
    margin-bottom: 15px;
    transition: var(--transition-default);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.pesticide-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pesticide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.pesticide-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.pesticide-type {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.pesticide-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    background: #f1f5f9;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 500;
}

.pill-primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-color: rgba(37, 99, 235, 0.2);
}
.pill-optional {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border-color: rgba(245, 158, 11, 0.2);
}
.pill-interval {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-color);
    border-color: rgba(139, 92, 246, 0.2);
}
.pill-scene {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
    border-color: rgba(16, 185, 129, 0.2);
}

.pesticide-adaptation {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.pesticide-brief {
    margin: 10px 0 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
}

.pesticide-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.pesticide-info-grid div {
    background: #f8fafc;
    padding: 12px 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.pesticide-info-grid strong {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 4px;
    font-weight: 600;
}

.pesticide-info-grid span {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
}

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

.pesticide-notes div {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 12px 15px;
    border: 1px dashed var(--border-color);
}

.pesticide-notes span {
    color: var(--text-secondary);
    font-size: 13px;
    display: block;
    font-weight: 500;
}

.pesticide-notes em {
    font-style: normal;
    color: var(--text-primary);
    font-weight: 600;
}

.pesticide-tips {
    margin-top: 12px;
    padding: 12px 15px;
    background: #fffbeb;

    border-radius: var(--radius-md);
    color: #92400e;
    font-size: 14px;
}

.pesticide-info {
    line-height: 1.8;
    font-size: 15px;
    color: var(--text-primary);
}

.pesticide-info span {
    color: var(--text-secondary);
    margin-right: 8px;
    font-weight: 600;
}

.pesticide-effectiveness {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.effectiveness-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-right: 12px;
    font-weight: 500;
    min-width: 80px;
}

.effectiveness-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.effectiveness-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.8s ease-out;
}

/* 农药详情卡片样式 */
.pesticide-detail-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 25px;
    transition: var(--transition-default);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.pesticide-detail-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.pesticide-detail-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
}

.pesticide-detail-name {
    color: var(--text-primary);
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    display: inline-block;
}

.pesticide-detail-name::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.pesticide-detail-info,
.pesticide-detail-usage,
.pesticide-detail-notes,
.pesticide-detail-targets {
    line-height: 1.8;
    font-size: 15px;
    color: var(--text-primary);
}

.pesticide-detail-info div,
.pesticide-detail-usage div,
.pesticide-detail-notes div,
.pesticide-detail-targets div {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: var(--radius-md);
}

.pesticide-detail-info span,
.pesticide-detail-usage span,
.pesticide-detail-notes span,
.pesticide-detail-targets span {
    /* color: var(--text-secondary); */
    margin-right: 10px;
    font-weight: 600;
}

.pesticide-target-item {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    margin: 5px;
    font-weight: 500;
}

/* 我的方案样式 */
.plans-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.plans-header h2 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.plans-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.plan-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition-default);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.plan-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.plan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.plan-card-title {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.plan-card-date {
    color: var(--text-secondary);
    font-size: 12px;
    background: #f1f5f9;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.plan-card-info {
    margin-bottom: 15px;
}

.plan-card-info-item {
    display: flex;
    margin-bottom: 10px;
    font-size: 14px;
}

.plan-card-info-label {
    color: var(--text-secondary);
    font-weight: 600;
    min-width: 90px;
}

.plan-card-info-value {
    color: var(--text-primary);
    flex: 1;
    font-weight: 500;
}

.plan-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .plan-detail-header {
        flex-direction: row;
    }
}

.plan-detail-header h2 {
    color: var(--text-primary);
    font-size: 26px;
    font-weight: 800;
    margin: 0;
}

.plan-detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.plan-detail-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.plan-info-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    transition: var(--transition-default);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.plan-info-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.plan-info-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.plan-info-card h3 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.plan-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
}

.plan-info-item {
    display: flex;
    flex-direction: column;
}

.plan-info-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.plan-info-value {
    color: var(--text-primary);
    font-size: 15px;
    background: #f8fafc;
    padding: 12px 15px;
    border-radius: var(--radius-md);

    font-weight: 500;
}

.plan-measures,
.plan-pesticides,
.plan-schedule {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.measure-item,
.pesticide-item,
.schedule-item {
    background: #f8fafc;
    padding: 15px;
    border-radius: var(--radius-md);
}

.measure-title,
.pesticide-title,
.schedule-title {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 16px;
}

.measure-content,
.pesticide-content,
.schedule-content {
    color: var(--text-primary);
    line-height: 1.7;
    font-weight: 500;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .history-header {
        flex-direction: row;
    }
}

.history-header h2 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.history-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-controls select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-color);
    font-size: 14px;
    color: var(--text-primary);
    min-width: 120px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.history-item {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition-default);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.history-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.history-item-type {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-type-search {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.history-type-pesticide {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
}

.history-type-camera {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-color);
}

.history-item-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.history-item-content {
    margin-bottom: 15px;
}

.history-item-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 17px;
}

.history-item-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.history-item-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.history-item-actions button {
    padding: 8px 14px;
    font-size: 13px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-default);
    font-weight: 500;
}

.history-view-btn {
    background: var(--primary-color);
    color: white;
}

.history-delete-btn {
    background: #fee2e2;
    color: #ef4444;
}

.history-view-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.history-delete-btn:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
}

/* 统计数据样式 */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .stats-header {
        flex-direction: row;
    }
}

.stats-header h2 {
    color: var(--text-primary);
    font-size: 26px;
    font-weight: 800;
    margin: 0;
}

.stats-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 35px;
}

.stats-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition-default);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stats-card h3 {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-value {
    color: var(--text-primary);
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 5px;
}

.stats-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.stats-section {
    margin-bottom: 35px;
}

.stats-section h3 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.stats-table-container {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.stats-table th,
.stats-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.stats-table th {
    background: #f8fafc;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
}

.stats-table td {
    color: var(--text-primary);
    font-size: 14px;
}

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

.stats-table tr:hover {
    background: #f8fafc;
}
