/* 提示/加载/弹窗 */
.tip-container {
    text-align: center;
    padding: 1.5625rem 0;
    color: var(--gray-600);
    font-size: 1rem;
    display: none;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin: 1.25rem 0;
}

.loading {
    color: var(--primary-500);
    font-weight: 500;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--primary-500);
    border-radius: var(--radius-full);
    margin-left: 0.625rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    display: none; /* 确保模态框默认隐藏 */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.25rem;
}

.modal-content {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 1.875rem;
    width: 90%;
    max-width: 34.375rem;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-2xl);
    border: 1px solid var(--gray-200);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-1.25rem) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.plan-modal-content {
    max-width: 56.25rem;
}

.required {
    color: var(--danger-500);
    font-weight: bold;
}

.form-tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1.5625rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.form-tabs::-webkit-scrollbar {
    display: none;
}

.form-tab-btn {
    padding: 0.875rem 1.25rem;
    border: none;
    background: none;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition-all);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    position: relative;
}

.form-tab-btn.active {
    color: var(--primary-500);
    border-bottom-color: var(--primary-500);
    font-weight: 600;
}

.form-tab-btn:hover:not(.active) {
    color: var(--primary-500);
    background: rgba(59, 130, 246, 0.05);
}
.form-tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-500);
    border-radius: 3px;
}
.form-tab-btn:hover:not(.active) {
    color: var(--primary-500);
    background: rgba(59, 130, 246, 0.05);
}

.form-tab-content {
    display: none;
}

.form-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pesticide-list,
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5625rem;
}

.pesticide-item-form,
.schedule-item-form {
    background: var(--gray-50);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    position: relative;
    transition: var(--transition-all);
}
.pesticide-item-form:hover,
.schedule-item-form:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

.remove-pesticide-btn,
.remove-schedule-btn {
    margin-top: 0.9375rem;
    text-align: right;
}
.remove-pesticide-btn .danger-btn,
.remove-schedule-btn .danger-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background: var(--danger-100);
    color: var(--danger-600);
    border: 1px solid var(--danger-200);
}
.remove-pesticide-btn .danger-btn:hover,
.remove-schedule-btn .danger-btn:hover {
    background: var(--danger-500);
    color: white;
    border-color: var(--danger-500);
}
.modal-title {
    color: var(--gray-900);
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1.5625rem;
    text-align: center;
    padding-bottom: 0.9375rem;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
}
.modal-title::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 5rem;
    height: 3px;
    background: var(--primary-500);
    border-radius: 3px;
}
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
    font-weight: 500;
    font-size: 0.9375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 0.9375rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: var(--transition-all);
    background: white;
    color: var(--gray-900);
    box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.form-group textarea {
    min-height: 6.25rem;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-btns {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5625rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gray-200);
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: var(--transition-all);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.cancel-btn {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.cancel-btn:hover {
    background: var(--gray-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.confirm-btn {
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));

    box-shadow: var(--shadow);
}

.confirm-btn:hover {
    background: linear-gradient(90deg, var(--primary-600), var(--primary-700));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* 登录/注册标签 */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1.5625rem;
}

.auth-tab {
    padding: 0.875rem 1.25rem;
    border: none;
    background: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition-all);
    position: relative;
}

.auth-tab.active {
    color: var(--primary-500);
    font-weight: 600;
}

.auth-tab.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-500);
    border-radius: 3px 3px 0 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--gray-700);
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
}

#error,
#success {
    padding: 0.75rem 0.9375rem;
    border-radius: var(--radius);
    margin-top: 0.9375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

#error {
    background: var(--danger-50);
    color: var(--danger-600);
    border: 1px solid var(--danger-200);
}

#success {
    background: var(--success-50);
    color: var(--success-600);
    border: 1px solid var(--success-200);
}
